]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/cbs_h264.h
avcodec/aic: fix decoding of videos which height is not multiple of 16
[ffmpeg] / libavcodec / cbs_h264.h
index 9c80e7215e5b5760565e67de0f673777cc32781f..2219d9da8d7a4b3c34608b972bc9c7a7dc7cc57e 100644 (file)
@@ -22,6 +22,7 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#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;
@@ -405,6 +408,12 @@ typedef struct H264RawSlice {
     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.
@@ -428,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 */