You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/cbs_sei_syntax_template: add sei message sei_display_orientation
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
This commit is contained in:
@ -2317,6 +2317,12 @@ static const SEIMessageTypeDescriptor cbs_sei_h274_types[] = {
|
||||
sizeof(SEIRawFilmGrainCharacteristics),
|
||||
SEI_MESSAGE_RW(sei, film_grain_characteristics),
|
||||
},
|
||||
{
|
||||
SEI_TYPE_DISPLAY_ORIENTATION,
|
||||
1, 0,
|
||||
sizeof(SEIRawDisplayOrientation),
|
||||
SEI_MESSAGE_RW(sei, display_orientation)
|
||||
},
|
||||
SEI_MESSAGE_TYPE_END,
|
||||
};
|
||||
|
||||
|
@ -118,6 +118,13 @@ typedef struct SEIRawFilmGrainCharacteristics {
|
||||
uint8_t fg_characteristics_persistence_flag;
|
||||
} SEIRawFilmGrainCharacteristics;
|
||||
|
||||
typedef struct SEIRawDisplayOrientation {
|
||||
uint8_t display_orientation_cancel_flag;
|
||||
uint8_t display_orientation_persistence_flag;
|
||||
uint8_t display_orientation_transform_type;
|
||||
uint8_t display_orientation_reserved_zero_3bits;
|
||||
} SEIRawDisplayOrientation;
|
||||
|
||||
typedef struct SEIRawMessage {
|
||||
uint32_t payload_type;
|
||||
uint32_t payload_size;
|
||||
|
@ -277,6 +277,24 @@ SEI_FUNC(film_grain_characteristics,
|
||||
return 0;
|
||||
}
|
||||
|
||||
SEI_FUNC(display_orientation, (CodedBitstreamContext *ctx, RWContext *rw,
|
||||
SEIRawDisplayOrientation *current,
|
||||
SEIMessageState *state))
|
||||
{
|
||||
int err;
|
||||
|
||||
HEADER("Display Orientation");
|
||||
|
||||
flag(display_orientation_cancel_flag);
|
||||
if (!current->display_orientation_cancel_flag) {
|
||||
flag(display_orientation_persistence_flag);
|
||||
u(3, display_orientation_transform_type, 0, 7);
|
||||
ub(3, display_orientation_reserved_zero_3bits);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int FUNC(message)(CodedBitstreamContext *ctx, RWContext *rw,
|
||||
SEIRawMessage *current)
|
||||
{
|
||||
|
Reference in New Issue
Block a user