Skip to content

File labels_to_render_data_calculator.pb.cc

File List > calculators > util > labels_to_render_data_calculator.pb.cc

Go to the documentation of this file

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: mediapipe/calculators/util/labels_to_render_data_calculator.proto

#include "mediapipe/calculators/util/labels_to_render_data_calculator.pb.h"

#include <algorithm>

#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>

PROTOBUF_PRAGMA_INIT_SEG
namespace mediapipe {
constexpr LabelsToRenderDataCalculatorOptions::LabelsToRenderDataCalculatorOptions(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : color_()
  , outline_color_()
  , font_face_(0)
  , location_(0)

  , horizontal_offset_px_(0)
  , vertical_offset_px_(0)
  , outline_thickness_(0)
  , use_display_name_(false)
  , display_classification_score_(false)
  , thickness_(2)
  , font_height_px_(50)
  , max_num_labels_(1){}
struct LabelsToRenderDataCalculatorOptionsDefaultTypeInternal {
  constexpr LabelsToRenderDataCalculatorOptionsDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~LabelsToRenderDataCalculatorOptionsDefaultTypeInternal() {}
  union {
    LabelsToRenderDataCalculatorOptions _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LabelsToRenderDataCalculatorOptionsDefaultTypeInternal _LabelsToRenderDataCalculatorOptions_default_instance_;
}  // namespace mediapipe
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto[1];
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto = nullptr;

const uint32_t TableStruct_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  PROTOBUF_FIELD_OFFSET(::mediapipe::LabelsToRenderDataCalculatorOptions, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::LabelsToRenderDataCalculatorOptions, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::mediapipe::LabelsToRenderDataCalculatorOptions, color_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::LabelsToRenderDataCalculatorOptions, thickness_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::LabelsToRenderDataCalculatorOptions, outline_color_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::LabelsToRenderDataCalculatorOptions, outline_thickness_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::LabelsToRenderDataCalculatorOptions, font_height_px_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::LabelsToRenderDataCalculatorOptions, horizontal_offset_px_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::LabelsToRenderDataCalculatorOptions, vertical_offset_px_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::LabelsToRenderDataCalculatorOptions, max_num_labels_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::LabelsToRenderDataCalculatorOptions, font_face_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::LabelsToRenderDataCalculatorOptions, location_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::LabelsToRenderDataCalculatorOptions, use_display_name_),
  PROTOBUF_FIELD_OFFSET(::mediapipe::LabelsToRenderDataCalculatorOptions, display_classification_score_),
  ~0u,
  7,
  ~0u,
  4,
  8,
  2,
  3,
  9,
  0,
  1,
  5,
  6,
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, 18, -1, sizeof(::mediapipe::LabelsToRenderDataCalculatorOptions)},
};

static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::mediapipe::_LabelsToRenderDataCalculatorOptions_default_instance_),
};

const char descriptor_table_protodef_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\nAmediapipe/calculators/util/labels_to_r"
  "ender_data_calculator.proto\022\tmediapipe\032$"
  "mediapipe/framework/calculator.proto\032\032me"
  "diapipe/util/color.proto\"\332\004\n#LabelsToRen"
  "derDataCalculatorOptions\022\037\n\005color\030\001 \003(\0132"
  "\020.mediapipe.Color\022\024\n\tthickness\030\002 \001(\001:\0012\022"
  "\'\n\routline_color\030\014 \003(\0132\020.mediapipe.Color"
  "\022\031\n\021outline_thickness\030\013 \001(\001\022\032\n\016font_heig"
  "ht_px\030\003 \001(\005:\00250\022\037\n\024horizontal_offset_px\030"
  "\007 \001(\005:\0010\022\035\n\022vertical_offset_px\030\010 \001(\005:\0010\022"
  "\031\n\016max_num_labels\030\004 \001(\005:\0011\022\024\n\tfont_face\030"
  "\005 \001(\005:\0010\022S\n\010location\030\006 \001(\01627.mediapipe.L"
  "abelsToRenderDataCalculatorOptions.Locat"
  "ion:\010TOP_LEFT\022\037\n\020use_display_name\030\t \001(\010:"
  "\005false\022+\n\034display_classification_score\030\n"
  " \001(\010:\005false\")\n\010Location\022\014\n\010TOP_LEFT\020\000\022\017\n"
  "\013BOTTOM_LEFT\020\0012]\n\003ext\022\034.mediapipe.Calcul"
  "atorOptions\030\314\352\304\201\001 \001(\0132..mediapipe.Labels"
  "ToRenderDataCalculatorOptions"
  ;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto_deps[2] = {
  &::descriptor_table_mediapipe_2fframework_2fcalculator_2eproto,
  &::descriptor_table_mediapipe_2futil_2fcolor_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto = {
  false, false, 749, descriptor_table_protodef_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto, "mediapipe/calculators/util/labels_to_render_data_calculator.proto", 
  &descriptor_table_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto_once, descriptor_table_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto_deps, 2, 1,
  schemas, file_default_instances, TableStruct_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto::offsets,
  file_level_metadata_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto, file_level_enum_descriptors_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto, file_level_service_descriptors_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto_getter() {
  return &descriptor_table_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto(&descriptor_table_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto);
namespace mediapipe {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* LabelsToRenderDataCalculatorOptions_Location_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto);
  return file_level_enum_descriptors_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto[0];
}
bool LabelsToRenderDataCalculatorOptions_Location_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr LabelsToRenderDataCalculatorOptions_Location LabelsToRenderDataCalculatorOptions::TOP_LEFT;
constexpr LabelsToRenderDataCalculatorOptions_Location LabelsToRenderDataCalculatorOptions::BOTTOM_LEFT;
constexpr LabelsToRenderDataCalculatorOptions_Location LabelsToRenderDataCalculatorOptions::Location_MIN;
constexpr LabelsToRenderDataCalculatorOptions_Location LabelsToRenderDataCalculatorOptions::Location_MAX;
constexpr int LabelsToRenderDataCalculatorOptions::Location_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))

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

class LabelsToRenderDataCalculatorOptions::_Internal {
 public:
  using HasBits = decltype(std::declval<LabelsToRenderDataCalculatorOptions>()._has_bits_);
  static void set_has_thickness(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_outline_thickness(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_font_height_px(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static void set_has_horizontal_offset_px(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_vertical_offset_px(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_max_num_labels(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static void set_has_font_face(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_location(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_use_display_name(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_display_classification_score(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
};

void LabelsToRenderDataCalculatorOptions::clear_color() {
  color_.Clear();
}
void LabelsToRenderDataCalculatorOptions::clear_outline_color() {
  outline_color_.Clear();
}
LabelsToRenderDataCalculatorOptions::LabelsToRenderDataCalculatorOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  color_(arena),
  outline_color_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:mediapipe.LabelsToRenderDataCalculatorOptions)
}
LabelsToRenderDataCalculatorOptions::LabelsToRenderDataCalculatorOptions(const LabelsToRenderDataCalculatorOptions& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      color_(from.color_),
      outline_color_(from.outline_color_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&font_face_, &from.font_face_,
    static_cast<size_t>(reinterpret_cast<char*>(&max_num_labels_) -
    reinterpret_cast<char*>(&font_face_)) + sizeof(max_num_labels_));
  // @@protoc_insertion_point(copy_constructor:mediapipe.LabelsToRenderDataCalculatorOptions)
}

inline void LabelsToRenderDataCalculatorOptions::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&font_face_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&display_classification_score_) -
    reinterpret_cast<char*>(&font_face_)) + sizeof(display_classification_score_));
thickness_ = 2;
font_height_px_ = 50;
max_num_labels_ = 1;
}

LabelsToRenderDataCalculatorOptions::~LabelsToRenderDataCalculatorOptions() {
  // @@protoc_insertion_point(destructor:mediapipe.LabelsToRenderDataCalculatorOptions)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void LabelsToRenderDataCalculatorOptions::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void LabelsToRenderDataCalculatorOptions::ArenaDtor(void* object) {
  LabelsToRenderDataCalculatorOptions* _this = reinterpret_cast< LabelsToRenderDataCalculatorOptions* >(object);
  (void)_this;
}
void LabelsToRenderDataCalculatorOptions::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void LabelsToRenderDataCalculatorOptions::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void LabelsToRenderDataCalculatorOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:mediapipe.LabelsToRenderDataCalculatorOptions)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  color_.Clear();
  outline_color_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    ::memset(&font_face_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&display_classification_score_) -
        reinterpret_cast<char*>(&font_face_)) + sizeof(display_classification_score_));
    thickness_ = 2;
  }
  if (cached_has_bits & 0x00000300u) {
    font_height_px_ = 50;
    max_num_labels_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* LabelsToRenderDataCalculatorOptions::_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)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated .mediapipe.Color color = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_color(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else
          goto handle_unusual;
        continue;
      // optional double thickness = 2 [default = 2];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 17)) {
          _Internal::set_has_thickness(&has_bits);
          thickness_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      // optional int32 font_height_px = 3 [default = 50];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_font_height_px(&has_bits);
          font_height_px_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 max_num_labels = 4 [default = 1];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_max_num_labels(&has_bits);
          max_num_labels_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 font_face = 5 [default = 0];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_font_face(&has_bits);
          font_face_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .mediapipe.LabelsToRenderDataCalculatorOptions.Location location = 6 [default = TOP_LEFT];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::mediapipe::LabelsToRenderDataCalculatorOptions_Location_IsValid(val))) {
            _internal_set_location(static_cast<::mediapipe::LabelsToRenderDataCalculatorOptions_Location>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(6, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional int32 horizontal_offset_px = 7 [default = 0];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_horizontal_offset_px(&has_bits);
          horizontal_offset_px_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 vertical_offset_px = 8 [default = 0];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
          _Internal::set_has_vertical_offset_px(&has_bits);
          vertical_offset_px_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool use_display_name = 9 [default = false];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
          _Internal::set_has_use_display_name(&has_bits);
          use_display_name_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool display_classification_score = 10 [default = false];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
          _Internal::set_has_display_classification_score(&has_bits);
          display_classification_score_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional double outline_thickness = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 89)) {
          _Internal::set_has_outline_thickness(&has_bits);
          outline_thickness_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      // repeated .mediapipe.Color outline_color = 12;
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_outline_color(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<98>(ptr));
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* LabelsToRenderDataCalculatorOptions::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:mediapipe.LabelsToRenderDataCalculatorOptions)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .mediapipe.Color color = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_color_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, this->_internal_color(i), target, stream);
  }

  cached_has_bits = _has_bits_[0];
  // optional double thickness = 2 [default = 2];
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(2, this->_internal_thickness(), target);
  }

  // optional int32 font_height_px = 3 [default = 50];
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_font_height_px(), target);
  }

  // optional int32 max_num_labels = 4 [default = 1];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_max_num_labels(), target);
  }

  // optional int32 font_face = 5 [default = 0];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_font_face(), target);
  }

  // optional .mediapipe.LabelsToRenderDataCalculatorOptions.Location location = 6 [default = TOP_LEFT];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      6, this->_internal_location(), target);
  }

  // optional int32 horizontal_offset_px = 7 [default = 0];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->_internal_horizontal_offset_px(), target);
  }

  // optional int32 vertical_offset_px = 8 [default = 0];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(8, this->_internal_vertical_offset_px(), target);
  }

  // optional bool use_display_name = 9 [default = false];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_use_display_name(), target);
  }

  // optional bool display_classification_score = 10 [default = false];
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->_internal_display_classification_score(), target);
  }

  // optional double outline_thickness = 11;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(11, this->_internal_outline_thickness(), target);
  }

  // repeated .mediapipe.Color outline_color = 12;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_outline_color_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(12, this->_internal_outline_color(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:mediapipe.LabelsToRenderDataCalculatorOptions)
  return target;
}

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

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .mediapipe.Color color = 1;
  total_size += 1UL * this->_internal_color_size();
  for (const auto& msg : this->color_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .mediapipe.Color outline_color = 12;
  total_size += 1UL * this->_internal_outline_color_size();
  for (const auto& msg : this->outline_color_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional int32 font_face = 5 [default = 0];
    if (cached_has_bits & 0x00000001u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_font_face());
    }

    // optional .mediapipe.LabelsToRenderDataCalculatorOptions.Location location = 6 [default = TOP_LEFT];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_location());
    }

    // optional int32 horizontal_offset_px = 7 [default = 0];
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_horizontal_offset_px());
    }

    // optional int32 vertical_offset_px = 8 [default = 0];
    if (cached_has_bits & 0x00000008u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_vertical_offset_px());
    }

    // optional double outline_thickness = 11;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 + 8;
    }

    // optional bool use_display_name = 9 [default = false];
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 + 1;
    }

    // optional bool display_classification_score = 10 [default = false];
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 + 1;
    }

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

  }
  if (cached_has_bits & 0x00000300u) {
    // optional int32 font_height_px = 3 [default = 50];
    if (cached_has_bits & 0x00000100u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_font_height_px());
    }

    // optional int32 max_num_labels = 4 [default = 1];
    if (cached_has_bits & 0x00000200u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_max_num_labels());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData LabelsToRenderDataCalculatorOptions::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    LabelsToRenderDataCalculatorOptions::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*LabelsToRenderDataCalculatorOptions::GetClassData() const { return &_class_data_; }

void LabelsToRenderDataCalculatorOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<LabelsToRenderDataCalculatorOptions *>(to)->MergeFrom(
      static_cast<const LabelsToRenderDataCalculatorOptions &>(from));
}


void LabelsToRenderDataCalculatorOptions::MergeFrom(const LabelsToRenderDataCalculatorOptions& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:mediapipe.LabelsToRenderDataCalculatorOptions)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  color_.MergeFrom(from.color_);
  outline_color_.MergeFrom(from.outline_color_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      font_face_ = from.font_face_;
    }
    if (cached_has_bits & 0x00000002u) {
      location_ = from.location_;
    }
    if (cached_has_bits & 0x00000004u) {
      horizontal_offset_px_ = from.horizontal_offset_px_;
    }
    if (cached_has_bits & 0x00000008u) {
      vertical_offset_px_ = from.vertical_offset_px_;
    }
    if (cached_has_bits & 0x00000010u) {
      outline_thickness_ = from.outline_thickness_;
    }
    if (cached_has_bits & 0x00000020u) {
      use_display_name_ = from.use_display_name_;
    }
    if (cached_has_bits & 0x00000040u) {
      display_classification_score_ = from.display_classification_score_;
    }
    if (cached_has_bits & 0x00000080u) {
      thickness_ = from.thickness_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00000300u) {
    if (cached_has_bits & 0x00000100u) {
      font_height_px_ = from.font_height_px_;
    }
    if (cached_has_bits & 0x00000200u) {
      max_num_labels_ = from.max_num_labels_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void LabelsToRenderDataCalculatorOptions::InternalSwap(LabelsToRenderDataCalculatorOptions* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  color_.InternalSwap(&other->color_);
  outline_color_.InternalSwap(&other->outline_color_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(LabelsToRenderDataCalculatorOptions, display_classification_score_)
      + sizeof(LabelsToRenderDataCalculatorOptions::display_classification_score_)
      - PROTOBUF_FIELD_OFFSET(LabelsToRenderDataCalculatorOptions, font_face_)>(
          reinterpret_cast<char*>(&font_face_),
          reinterpret_cast<char*>(&other->font_face_));
  swap(thickness_, other->thickness_);
  swap(font_height_px_, other->font_height_px_);
  swap(max_num_labels_, other->max_num_labels_);
}

::PROTOBUF_NAMESPACE_ID::Metadata LabelsToRenderDataCalculatorOptions::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto_getter, &descriptor_table_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto_once,
      file_level_metadata_mediapipe_2fcalculators_2futil_2flabels_5fto_5frender_5fdata_5fcalculator_2eproto[0]);
}
#if !defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)
const int LabelsToRenderDataCalculatorOptions::kExtFieldNumber;
#endif
PROTOBUF_ATTRIBUTE_INIT_PRIORITY ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::mediapipe::CalculatorOptions,
    ::PROTOBUF_NAMESPACE_ID::internal::MessageTypeTraits< ::mediapipe::LabelsToRenderDataCalculatorOptions >, 11, false >
  LabelsToRenderDataCalculatorOptions::ext(kExtFieldNumber, ::mediapipe::LabelsToRenderDataCalculatorOptions::default_instance());

// @@protoc_insertion_point(namespace_scope)
}  // namespace mediapipe
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::mediapipe::LabelsToRenderDataCalculatorOptions* Arena::CreateMaybeMessage< ::mediapipe::LabelsToRenderDataCalculatorOptions >(Arena* arena) {
  return Arena::CreateMessageInternal< ::mediapipe::LabelsToRenderDataCalculatorOptions >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

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