X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fcbs_mpeg2.h;h=f7075a460dcdf44b1002d499beffd1755ff57e0f;hb=d92f38c179591a608390ffa9fee59c309142e79d;hp=92caa99dc1d95ef26ecead3de39a558d03392d25;hpb=e427ba5c68a522b26a45bf7c61016d9349fab43d;p=ffmpeg diff --git a/libavcodec/cbs_mpeg2.h b/libavcodec/cbs_mpeg2.h index 92caa99dc1d..f7075a460dc 100644 --- a/libavcodec/cbs_mpeg2.h +++ b/libavcodec/cbs_mpeg2.h @@ -51,7 +51,7 @@ enum { MPEG2_EXTENSION_PICTURE_CODING = 0x8, MPEG2_EXTENSION_PICTURE_SPATIAL_SCALABLE = 0x9, MPEG2_EXTENSION_PICTURE_TEMPORAL_SCALABLE = 0xa, - MPEG2_EXTENSION_CAMAERA_PARAMETERS = 0xb, + MPEG2_EXTENSION_CAMERA_PARAMETERS = 0xb, MPEG2_EXTENSION_ITU_T = 0xc, }; @@ -76,9 +76,9 @@ typedef struct MPEG2RawSequenceHeader { typedef struct MPEG2RawUserData { uint8_t user_data_start_code; - uint8_t *user_data; - size_t user_data_length; + uint8_t *user_data; AVBufferRef *user_data_ref; + size_t user_data_length; } MPEG2RawUserData; typedef struct MPEG2RawSequenceExtension { @@ -114,6 +114,12 @@ typedef struct MPEG2RawGroupOfPicturesHeader { uint8_t broken_link; } MPEG2RawGroupOfPicturesHeader; +typedef struct MPEG2RawExtraInformation { + uint8_t *extra_information; + AVBufferRef *extra_information_ref; + size_t extra_information_length; +} MPEG2RawExtraInformation; + typedef struct MPEG2RawPictureHeader { uint8_t picture_start_code; @@ -126,7 +132,7 @@ typedef struct MPEG2RawPictureHeader { uint8_t full_pel_backward_vector; uint8_t backward_f_code; - uint8_t extra_bit_picture; + MPEG2RawExtraInformation extra_information_picture; } MPEG2RawPictureHeader; typedef struct MPEG2RawPictureCodingExtension { @@ -164,8 +170,8 @@ typedef struct MPEG2RawQuantMatrixExtension { } MPEG2RawQuantMatrixExtension; typedef struct MPEG2RawPictureDisplayExtension { - uint16_t frame_centre_horizontal_offset[3]; - uint16_t frame_centre_vertical_offset[3]; + int16_t frame_centre_horizontal_offset[3]; + int16_t frame_centre_vertical_offset[3]; } MPEG2RawPictureDisplayExtension; typedef struct MPEG2RawExtensionData { @@ -194,22 +200,22 @@ typedef struct MPEG2RawSliceHeader { uint8_t slice_picture_id_enable; uint8_t slice_picture_id; - uint8_t extra_bit_slice; - - size_t extra_information_length; - uint8_t *extra_information; - AVBufferRef *extra_information_ref; + MPEG2RawExtraInformation extra_information_slice; } MPEG2RawSliceHeader; typedef struct MPEG2RawSlice { MPEG2RawSliceHeader header; - uint8_t *data; - size_t data_size; - int data_bit_start; + uint8_t *data; AVBufferRef *data_ref; + size_t data_size; + int data_bit_start; } MPEG2RawSlice; +typedef struct MPEG2RawSequenceEnd { + uint8_t sequence_end_code; +} MPEG2RawSequenceEnd; + typedef struct CodedBitstreamMPEG2Context { // Elements stored in headers which are required for other decoding. @@ -219,10 +225,6 @@ typedef struct CodedBitstreamMPEG2Context { uint8_t scalable_mode; uint8_t progressive_sequence; uint8_t number_of_frame_centre_offsets; - - // Write buffer. - uint8_t *write_buffer; - size_t write_buffer_size; } CodedBitstreamMPEG2Context;