// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: video_decode_stats.proto

#include "video_decode_stats.pb.h"

#include <algorithm>

#include <google/protobuf/stubs/common.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
namespace media {
class DecodeStatsProtoDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<DecodeStatsProto> _instance;
} _DecodeStatsProto_default_instance_;
}  // namespace media
static void InitDefaultsscc_info_DecodeStatsProto_video_5fdecode_5fstats_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::media::_DecodeStatsProto_default_instance_;
    new (ptr) ::media::DecodeStatsProto();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::media::DecodeStatsProto::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_DecodeStatsProto_video_5fdecode_5fstats_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_DecodeStatsProto_video_5fdecode_5fstats_2eproto}, {}};

namespace media {

// ===================================================================

void DecodeStatsProto::InitAsDefaultInstance() {
}
class DecodeStatsProto::_Internal {
 public:
  using HasBits = decltype(std::declval<DecodeStatsProto>()._has_bits_);
  static void set_has_frames_decoded(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_frames_dropped(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_frames_power_efficient(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_last_write_date(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_unweighted_average_frames_dropped(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_unweighted_average_frames_efficient(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_num_unweighted_playbacks(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
};

DecodeStatsProto::DecodeStatsProto()
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:media.DecodeStatsProto)
}
DecodeStatsProto::DecodeStatsProto(const DecodeStatsProto& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _internal_metadata_(nullptr),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::memcpy(&frames_decoded_, &from.frames_decoded_,
    static_cast<size_t>(reinterpret_cast<char*>(&num_unweighted_playbacks_) -
    reinterpret_cast<char*>(&frames_decoded_)) + sizeof(num_unweighted_playbacks_));
  // @@protoc_insertion_point(copy_constructor:media.DecodeStatsProto)
}

void DecodeStatsProto::SharedCtor() {
  ::memset(&frames_decoded_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&num_unweighted_playbacks_) -
      reinterpret_cast<char*>(&frames_decoded_)) + sizeof(num_unweighted_playbacks_));
}

DecodeStatsProto::~DecodeStatsProto() {
  // @@protoc_insertion_point(destructor:media.DecodeStatsProto)
  SharedDtor();
}

void DecodeStatsProto::SharedDtor() {
}

void DecodeStatsProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const DecodeStatsProto& DecodeStatsProto::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DecodeStatsProto_video_5fdecode_5fstats_2eproto.base);
  return *internal_default_instance();
}


void DecodeStatsProto::Clear() {
// @@protoc_insertion_point(message_clear_start:media.DecodeStatsProto)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000007fu) {
    ::memset(&frames_decoded_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&num_unweighted_playbacks_) -
        reinterpret_cast<char*>(&frames_decoded_)) + sizeof(num_unweighted_playbacks_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* DecodeStatsProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // optional uint64 frames_decoded = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
          _Internal::set_has_frames_decoded(&has_bits);
          frames_decoded_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional uint64 frames_dropped = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
          _Internal::set_has_frames_dropped(&has_bits);
          frames_dropped_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional uint64 frames_power_efficient = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
          _Internal::set_has_frames_power_efficient(&has_bits);
          frames_power_efficient_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional double last_write_date = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 57)) {
          _Internal::set_has_last_write_date(&has_bits);
          last_write_date_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else goto handle_unusual;
        continue;
      // optional double unweighted_average_frames_dropped = 8 [default = 0];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 65)) {
          _Internal::set_has_unweighted_average_frames_dropped(&has_bits);
          unweighted_average_frames_dropped_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else goto handle_unusual;
        continue;
      // optional double unweighted_average_frames_efficient = 9 [default = 0];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 73)) {
          _Internal::set_has_unweighted_average_frames_efficient(&has_bits);
          unweighted_average_frames_efficient_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else goto handle_unusual;
        continue;
      // optional uint64 num_unweighted_playbacks = 10 [default = 0];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) {
          _Internal::set_has_num_unweighted_playbacks(&has_bits);
          num_unweighted_playbacks_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}
#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool DecodeStatsProto::MergePartialFromCodedStream(
    ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  ::PROTOBUF_NAMESPACE_ID::internal::LiteUnknownFieldSetter unknown_fields_setter(
      &_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::io::StringOutputStream unknown_fields_output(
      unknown_fields_setter.buffer());
  ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream unknown_fields_stream(
      &unknown_fields_output, false);
  // @@protoc_insertion_point(parse_start:media.DecodeStatsProto)
  for (;;) {
    ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional uint64 frames_decoded = 1;
      case 1: {
        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
          _Internal::set_has_frames_decoded(&_has_bits_);
          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
                   ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>(
                 input, &frames_decoded_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional uint64 frames_dropped = 2;
      case 2: {
        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) {
          _Internal::set_has_frames_dropped(&_has_bits_);
          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
                   ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>(
                 input, &frames_dropped_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional uint64 frames_power_efficient = 3;
      case 3: {
        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
          _Internal::set_has_frames_power_efficient(&_has_bits_);
          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
                   ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>(
                 input, &frames_power_efficient_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional double last_write_date = 7;
      case 7: {
        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (57 & 0xFF)) {
          _Internal::set_has_last_write_date(&_has_bits_);
          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
                   double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, &last_write_date_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional double unweighted_average_frames_dropped = 8 [default = 0];
      case 8: {
        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (65 & 0xFF)) {
          _Internal::set_has_unweighted_average_frames_dropped(&_has_bits_);
          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
                   double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, &unweighted_average_frames_dropped_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional double unweighted_average_frames_efficient = 9 [default = 0];
      case 9: {
        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (73 & 0xFF)) {
          _Internal::set_has_unweighted_average_frames_efficient(&_has_bits_);
          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
                   double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, &unweighted_average_frames_efficient_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional uint64 num_unweighted_playbacks = 10 [default = 0];
      case 10: {
        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (80 & 0xFF)) {
          _Internal::set_has_num_unweighted_playbacks(&_has_bits_);
          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
                   ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>(
                 input, &num_unweighted_playbacks_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SkipField(
            input, tag, &unknown_fields_stream));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:media.DecodeStatsProto)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:media.DecodeStatsProto)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void DecodeStatsProto::SerializeWithCachedSizes(
    ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:media.DecodeStatsProto)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional uint64 frames_decoded = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(1, this->frames_decoded(), output);
  }

  // optional uint64 frames_dropped = 2;
  if (cached_has_bits & 0x00000002u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(2, this->frames_dropped(), output);
  }

  // optional uint64 frames_power_efficient = 3;
  if (cached_has_bits & 0x00000004u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(3, this->frames_power_efficient(), output);
  }

  // optional double last_write_date = 7;
  if (cached_has_bits & 0x00000008u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(7, this->last_write_date(), output);
  }

  // optional double unweighted_average_frames_dropped = 8 [default = 0];
  if (cached_has_bits & 0x00000010u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(8, this->unweighted_average_frames_dropped(), output);
  }

  // optional double unweighted_average_frames_efficient = 9 [default = 0];
  if (cached_has_bits & 0x00000020u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(9, this->unweighted_average_frames_efficient(), output);
  }

  // optional uint64 num_unweighted_playbacks = 10 [default = 0];
  if (cached_has_bits & 0x00000040u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(10, this->num_unweighted_playbacks(), output);
  }

  output->WriteRaw(_internal_metadata_.unknown_fields().data(),
                   static_cast<int>(_internal_metadata_.unknown_fields().size()));
  // @@protoc_insertion_point(serialize_end:media.DecodeStatsProto)
}

size_t DecodeStatsProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:media.DecodeStatsProto)
  size_t total_size = 0;

  total_size += _internal_metadata_.unknown_fields().size();

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000007fu) {
    // optional uint64 frames_decoded = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
          this->frames_decoded());
    }

    // optional uint64 frames_dropped = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
          this->frames_dropped());
    }

    // optional uint64 frames_power_efficient = 3;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
          this->frames_power_efficient());
    }

    // optional double last_write_date = 7;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 + 8;
    }

    // optional double unweighted_average_frames_dropped = 8 [default = 0];
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 + 8;
    }

    // optional double unweighted_average_frames_efficient = 9 [default = 0];
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 + 8;
    }

    // optional uint64 num_unweighted_playbacks = 10 [default = 0];
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
          this->num_unweighted_playbacks());
    }

  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void DecodeStatsProto::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const DecodeStatsProto*>(
      &from));
}

void DecodeStatsProto::MergeFrom(const DecodeStatsProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:media.DecodeStatsProto)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000007fu) {
    if (cached_has_bits & 0x00000001u) {
      frames_decoded_ = from.frames_decoded_;
    }
    if (cached_has_bits & 0x00000002u) {
      frames_dropped_ = from.frames_dropped_;
    }
    if (cached_has_bits & 0x00000004u) {
      frames_power_efficient_ = from.frames_power_efficient_;
    }
    if (cached_has_bits & 0x00000008u) {
      last_write_date_ = from.last_write_date_;
    }
    if (cached_has_bits & 0x00000010u) {
      unweighted_average_frames_dropped_ = from.unweighted_average_frames_dropped_;
    }
    if (cached_has_bits & 0x00000020u) {
      unweighted_average_frames_efficient_ = from.unweighted_average_frames_efficient_;
    }
    if (cached_has_bits & 0x00000040u) {
      num_unweighted_playbacks_ = from.num_unweighted_playbacks_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void DecodeStatsProto::CopyFrom(const DecodeStatsProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:media.DecodeStatsProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DecodeStatsProto::IsInitialized() const {
  return true;
}

void DecodeStatsProto::InternalSwap(DecodeStatsProto* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  swap(frames_decoded_, other->frames_decoded_);
  swap(frames_dropped_, other->frames_dropped_);
  swap(frames_power_efficient_, other->frames_power_efficient_);
  swap(last_write_date_, other->last_write_date_);
  swap(unweighted_average_frames_dropped_, other->unweighted_average_frames_dropped_);
  swap(unweighted_average_frames_efficient_, other->unweighted_average_frames_efficient_);
  swap(num_unweighted_playbacks_, other->num_unweighted_playbacks_);
}

std::string DecodeStatsProto::GetTypeName() const {
  return "media.DecodeStatsProto";
}


// @@protoc_insertion_point(namespace_scope)
}  // namespace media
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::media::DecodeStatsProto* Arena::CreateMaybeMessage< ::media::DecodeStatsProto >(Arena* arena) {
  return Arena::CreateInternal< ::media::DecodeStatsProto >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
