File image_data.pb.cc
File List > calculators > util > image_data.pb.cc
Go to the documentation of this file
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mediapipe/calculators/util/image_data.proto
#include "mediapipe/calculators/util/image_data.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 ImageData::ImageData(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: frame_id_(uint64_t{0u})
, first_person_(false)
, image_type_(2u)
, width_(uint64_t{640u})
, height_(uint64_t{480u}){}
struct ImageDataDefaultTypeInternal {
constexpr ImageDataDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~ImageDataDefaultTypeInternal() {}
union {
ImageData _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ImageDataDefaultTypeInternal _ImageData_default_instance_;
} // namespace mediapipe
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_mediapipe_2fcalculators_2futil_2fimage_5fdata_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_mediapipe_2fcalculators_2futil_2fimage_5fdata_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_mediapipe_2fcalculators_2futil_2fimage_5fdata_2eproto = nullptr;
const uint32_t TableStruct_mediapipe_2fcalculators_2futil_2fimage_5fdata_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
PROTOBUF_FIELD_OFFSET(::mediapipe::ImageData, _has_bits_),
PROTOBUF_FIELD_OFFSET(::mediapipe::ImageData, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::mediapipe::ImageData, width_),
PROTOBUF_FIELD_OFFSET(::mediapipe::ImageData, height_),
PROTOBUF_FIELD_OFFSET(::mediapipe::ImageData, frame_id_),
PROTOBUF_FIELD_OFFSET(::mediapipe::ImageData, image_type_),
PROTOBUF_FIELD_OFFSET(::mediapipe::ImageData, first_person_),
3,
4,
0,
2,
1,
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, 11, -1, sizeof(::mediapipe::ImageData)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::mediapipe::_ImageData_default_instance_),
};
const char descriptor_table_protodef_mediapipe_2fcalculators_2futil_2fimage_5fdata_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n+mediapipe/calculators/util/image_data."
"proto\022\tmediapipe\"}\n\tImageData\022\022\n\005width\030\001"
" \001(\004:\003640\022\023\n\006height\030\002 \001(\004:\003480\022\023\n\010frame_"
"id\030\003 \001(\004:\0010\022\025\n\nimage_type\030\004 \001(\r:\0012\022\033\n\014fi"
"rst_person\030\005 \001(\010:\005false"
;
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_mediapipe_2fcalculators_2futil_2fimage_5fdata_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_mediapipe_2fcalculators_2futil_2fimage_5fdata_2eproto = {
false, false, 183, descriptor_table_protodef_mediapipe_2fcalculators_2futil_2fimage_5fdata_2eproto, "mediapipe/calculators/util/image_data.proto",
&descriptor_table_mediapipe_2fcalculators_2futil_2fimage_5fdata_2eproto_once, nullptr, 0, 1,
schemas, file_default_instances, TableStruct_mediapipe_2fcalculators_2futil_2fimage_5fdata_2eproto::offsets,
file_level_metadata_mediapipe_2fcalculators_2futil_2fimage_5fdata_2eproto, file_level_enum_descriptors_mediapipe_2fcalculators_2futil_2fimage_5fdata_2eproto, file_level_service_descriptors_mediapipe_2fcalculators_2futil_2fimage_5fdata_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_mediapipe_2fcalculators_2futil_2fimage_5fdata_2eproto_getter() {
return &descriptor_table_mediapipe_2fcalculators_2futil_2fimage_5fdata_2eproto;
}
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_mediapipe_2fcalculators_2futil_2fimage_5fdata_2eproto(&descriptor_table_mediapipe_2fcalculators_2futil_2fimage_5fdata_2eproto);
namespace mediapipe {
// ===================================================================
class ImageData::_Internal {
public:
using HasBits = decltype(std::declval<ImageData>()._has_bits_);
static void set_has_width(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static void set_has_height(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static void set_has_frame_id(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_image_type(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_first_person(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
};
ImageData::ImageData(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:mediapipe.ImageData)
}
ImageData::ImageData(const ImageData& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&frame_id_, &from.frame_id_,
static_cast<size_t>(reinterpret_cast<char*>(&height_) -
reinterpret_cast<char*>(&frame_id_)) + sizeof(height_));
// @@protoc_insertion_point(copy_constructor:mediapipe.ImageData)
}
inline void ImageData::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&frame_id_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&first_person_) -
reinterpret_cast<char*>(&frame_id_)) + sizeof(first_person_));
image_type_ = 2u;
width_ = uint64_t{640u};
height_ = uint64_t{480u};
}
ImageData::~ImageData() {
// @@protoc_insertion_point(destructor:mediapipe.ImageData)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void ImageData::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void ImageData::ArenaDtor(void* object) {
ImageData* _this = reinterpret_cast< ImageData* >(object);
(void)_this;
}
void ImageData::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ImageData::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void ImageData::Clear() {
// @@protoc_insertion_point(message_clear_start:mediapipe.ImageData)
uint32_t 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 & 0x0000001fu) {
::memset(&frame_id_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&first_person_) -
reinterpret_cast<char*>(&frame_id_)) + sizeof(first_person_));
image_type_ = 2u;
width_ = uint64_t{640u};
height_ = uint64_t{480u};
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* ImageData::_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) {
// optional uint64 width = 1 [default = 640];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_width(&has_bits);
width_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint64 height = 2 [default = 480];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_height(&has_bits);
height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint64 frame_id = 3 [default = 0];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_frame_id(&has_bits);
frame_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 image_type = 4 [default = 2];
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_Internal::set_has_image_type(&has_bits);
image_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool first_person = 5 [default = false];
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
_Internal::set_has_first_person(&has_bits);
first_person_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(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* ImageData::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:mediapipe.ImageData)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional uint64 width = 1 [default = 640];
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(1, this->_internal_width(), target);
}
// optional uint64 height = 2 [default = 480];
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(2, this->_internal_height(), target);
}
// optional uint64 frame_id = 3 [default = 0];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(3, this->_internal_frame_id(), target);
}
// optional uint32 image_type = 4 [default = 2];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(4, this->_internal_image_type(), target);
}
// optional bool first_person = 5 [default = false];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_first_person(), target);
}
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.ImageData)
return target;
}
size_t ImageData::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:mediapipe.ImageData)
size_t total_size = 0;
uint32_t 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 & 0x0000001fu) {
// optional uint64 frame_id = 3 [default = 0];
if (cached_has_bits & 0x00000001u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64SizePlusOne(this->_internal_frame_id());
}
// optional bool first_person = 5 [default = false];
if (cached_has_bits & 0x00000002u) {
total_size += 1 + 1;
}
// optional uint32 image_type = 4 [default = 2];
if (cached_has_bits & 0x00000004u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_image_type());
}
// optional uint64 width = 1 [default = 640];
if (cached_has_bits & 0x00000008u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64SizePlusOne(this->_internal_width());
}
// optional uint64 height = 2 [default = 480];
if (cached_has_bits & 0x00000010u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64SizePlusOne(this->_internal_height());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ImageData::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
ImageData::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ImageData::GetClassData() const { return &_class_data_; }
void ImageData::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<ImageData *>(to)->MergeFrom(
static_cast<const ImageData &>(from));
}
void ImageData::MergeFrom(const ImageData& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:mediapipe.ImageData)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000001fu) {
if (cached_has_bits & 0x00000001u) {
frame_id_ = from.frame_id_;
}
if (cached_has_bits & 0x00000002u) {
first_person_ = from.first_person_;
}
if (cached_has_bits & 0x00000004u) {
image_type_ = from.image_type_;
}
if (cached_has_bits & 0x00000008u) {
width_ = from.width_;
}
if (cached_has_bits & 0x00000010u) {
height_ = from.height_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ImageData::CopyFrom(const ImageData& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:mediapipe.ImageData)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ImageData::IsInitialized() const {
return true;
}
void ImageData::InternalSwap(ImageData* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(ImageData, first_person_)
+ sizeof(ImageData::first_person_)
- PROTOBUF_FIELD_OFFSET(ImageData, frame_id_)>(
reinterpret_cast<char*>(&frame_id_),
reinterpret_cast<char*>(&other->frame_id_));
swap(image_type_, other->image_type_);
swap(width_, other->width_);
swap(height_, other->height_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ImageData::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_mediapipe_2fcalculators_2futil_2fimage_5fdata_2eproto_getter, &descriptor_table_mediapipe_2fcalculators_2futil_2fimage_5fdata_2eproto_once,
file_level_metadata_mediapipe_2fcalculators_2futil_2fimage_5fdata_2eproto[0]);
}
// @@protoc_insertion_point(namespace_scope)
} // namespace mediapipe
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::mediapipe::ImageData* Arena::CreateMaybeMessage< ::mediapipe::ImageData >(Arena* arena) {
return Arena::CreateMessageInternal< ::mediapipe::ImageData >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>