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 frame_field_information
Signed-off-by: Wu Jianhua <toqsxw@outlook.com>
This commit is contained in:
@ -2323,6 +2323,12 @@ static const SEIMessageTypeDescriptor cbs_sei_h274_types[] = {
|
||||
sizeof(SEIRawDisplayOrientation),
|
||||
SEI_MESSAGE_RW(sei, display_orientation)
|
||||
},
|
||||
{
|
||||
SEI_TYPE_FRAME_FIELD_INFO,
|
||||
1, 0,
|
||||
sizeof(SEIRawFrameFieldInformation),
|
||||
SEI_MESSAGE_RW(sei, frame_field_information)
|
||||
},
|
||||
SEI_MESSAGE_TYPE_END,
|
||||
};
|
||||
|
||||
|
@ -125,6 +125,18 @@ typedef struct SEIRawDisplayOrientation {
|
||||
uint8_t display_orientation_reserved_zero_3bits;
|
||||
} SEIRawDisplayOrientation;
|
||||
|
||||
typedef struct SEIRawFrameFieldInformation {
|
||||
uint8_t ffi_field_pic_flag;
|
||||
uint8_t ffi_bottom_field_flag;
|
||||
uint8_t ffi_pairing_indicated_flag;
|
||||
uint8_t ffi_paired_with_next_field_flag;
|
||||
uint8_t ffi_display_fields_from_frame_flag;
|
||||
uint8_t ffi_top_field_first_flag;
|
||||
uint8_t ffi_display_elemental_periods_minus1;
|
||||
uint8_t ffi_source_scan_type;
|
||||
uint8_t ffi_duplicate_flag;
|
||||
} SEIRawFrameFieldInformation;
|
||||
|
||||
typedef struct SEIRawMessage {
|
||||
uint32_t payload_type;
|
||||
uint32_t payload_size;
|
||||
|
@ -295,6 +295,32 @@ SEI_FUNC(display_orientation, (CodedBitstreamContext *ctx, RWContext *rw,
|
||||
return 0;
|
||||
}
|
||||
|
||||
SEI_FUNC(frame_field_information, (CodedBitstreamContext *ctx, RWContext *rw,
|
||||
SEIRawFrameFieldInformation *current,
|
||||
SEIMessageState *state))
|
||||
{
|
||||
int err;
|
||||
|
||||
HEADER("Frame-field information");
|
||||
|
||||
flag(ffi_field_pic_flag);
|
||||
if (current->ffi_field_pic_flag) {
|
||||
flag(ffi_bottom_field_flag);
|
||||
flag(ffi_pairing_indicated_flag);
|
||||
if (current->ffi_pairing_indicated_flag)
|
||||
flag(ffi_paired_with_next_field_flag);
|
||||
} else {
|
||||
flag(ffi_display_fields_from_frame_flag);
|
||||
if (current->ffi_display_fields_from_frame_flag)
|
||||
flag(ffi_top_field_first_flag);
|
||||
u(8, ffi_display_elemental_periods_minus1, 0, 0xff);
|
||||
}
|
||||
u(2, ffi_source_scan_type, 0, 3);
|
||||
flag(ffi_duplicate_flag);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int FUNC(message)(CodedBitstreamContext *ctx, RWContext *rw,
|
||||
SEIRawMessage *current)
|
||||
{
|
||||
|
Reference in New Issue
Block a user