X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fcbs_h264.h;h=2219d9da8d7a4b3c34608b972bc9c7a7dc7cc57e;hb=c837918f50a7bbd6150afd340857ea43fe4717c7;hp=ab7dfd855fecbcac72e8d3c2643ea3a9cf13c8b8;hpb=cacb47633c043a4bafb6872716dd8c4479dc4df1;p=ffmpeg diff --git a/libavcodec/cbs_h264.h b/libavcodec/cbs_h264.h index ab7dfd855fe..2219d9da8d7 100644 --- a/libavcodec/cbs_h264.h +++ b/libavcodec/cbs_h264.h @@ -22,6 +22,7 @@ #include #include +#include "cbs.h" #include "cbs_h2645.h" #include "h264.h" @@ -194,7 +195,9 @@ typedef struct H264RawPPS { uint8_t slice_group_change_direction_flag; uint16_t slice_group_change_rate_minus1; uint16_t pic_size_in_map_units_minus1; - uint8_t slice_group_id[H264_MAX_MB_PIC_SIZE]; + + uint8_t *slice_group_id; + AVBufferRef *slice_group_id_ref; uint8_t num_ref_idx_l0_default_active_minus1; uint8_t num_ref_idx_l1_default_active_minus1; @@ -266,12 +269,14 @@ typedef struct H264RawSEIUserDataRegistered { uint8_t itu_t_t35_country_code_extension_byte; uint8_t *data; size_t data_length; + AVBufferRef *data_ref; } H264RawSEIUserDataRegistered; typedef struct H264RawSEIUserDataUnregistered { uint8_t uuid_iso_iec_11578[16]; uint8_t *data; size_t data_length; + AVBufferRef *data_ref; } H264RawSEIUserDataUnregistered; typedef struct H264RawSEIRecoveryPoint { @@ -304,6 +309,7 @@ typedef struct H264RawSEIPayload { struct { uint8_t *data; size_t data_length; + AVBufferRef *data_ref; } other; } payload; } H264RawSEIPayload; @@ -399,8 +405,15 @@ typedef struct H264RawSlice { uint8_t *data; size_t data_size; int data_bit_start; + AVBufferRef *data_ref; } H264RawSlice; +typedef struct H264RawFiller { + H264RawNALUnitHeader nal_unit_header; + + uint32_t filler_size; +} H264RawFiller; + typedef struct CodedBitstreamH264Context { // Reader/writer context in common with the H.265 implementation. @@ -424,4 +437,22 @@ typedef struct CodedBitstreamH264Context { } CodedBitstreamH264Context; +/** + * Add an SEI message to an access unit. + */ +int ff_cbs_h264_add_sei_message(CodedBitstreamContext *ctx, + CodedBitstreamFragment *access_unit, + const H264RawSEIPayload *payload); + +/** + * Delete an SEI message from an access unit. + * + * Deletes from nal_unit, which must be an SEI NAL unit. If this is the + * last message in nal_unit, also deletes it from access_unit. + */ +int ff_cbs_h264_delete_sei_message(CodedBitstreamContext *ctx, + CodedBitstreamFragment *access_unit, + CodedBitstreamUnit *nal_unit, + int position); + #endif /* AVCODEC_CBS_H264_H */