]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/cbs_internal.h
avcodec/aic: fix decoding of videos which height is not multiple of 16
[ffmpeg] / libavcodec / cbs_internal.h
index e4fe70a16a4283ed5e859bfa1bf128677947cb09..be540e2a44d3df62c548396f8eb3451bcbd97eac 100644 (file)
@@ -53,9 +53,6 @@ typedef struct CodedBitstreamType {
     int (*assemble_fragment)(CodedBitstreamContext *ctx,
                              CodedBitstreamFragment *frag);
 
-    // Free the content and data of a single unit.
-    void (*free_unit)(CodedBitstreamUnit *unit);
-
     // Free the codec internal state.
     void (*close)(CodedBitstreamContext *ctx);
 } CodedBitstreamType;
@@ -82,6 +79,10 @@ int ff_cbs_write_unsigned(CodedBitstreamContext *ctx, PutBitContext *pbc,
                           int width, const char *name, uint32_t value,
                           uint32_t range_min, uint32_t range_max);
 
+// The largest value representable in N bits, suitable for use as
+// range_max in the above functions.
+#define MAX_UINT_BITS(length) ((UINT64_C(1) << (length)) - 1)
+
 
 extern const CodedBitstreamType ff_cbs_type_h264;
 extern const CodedBitstreamType ff_cbs_type_h265;