diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-08-04 11:23:01 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-08-08 11:29:33 +0200 |
commit | 2d722b6638a1b925d7e9e01e45611c450bfcf7ee (patch) | |
tree | d1b1b61eda857823c33246653561fcd9738559d7 /libavcodec/cbs_internal.h | |
parent | 9638f5b1a2369aa8ab32ffb68c928bb5343932fd (diff) |
avcodec/cbs_jpeg: Use table-based alloc/free
cbs_jpeg was the last user of CBS that didn't use
CodedBitstreamUnitTypeDescriptors.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/cbs_internal.h')
-rw-r--r-- | libavcodec/cbs_internal.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/cbs_internal.h b/libavcodec/cbs_internal.h index 4030b76f1c..5ccba3c901 100644 --- a/libavcodec/cbs_internal.h +++ b/libavcodec/cbs_internal.h @@ -197,6 +197,13 @@ int ff_cbs_write_signed(CodedBitstreamContext *ctx, PutBitContext *pbc, .content_type = CBS_CONTENT_TYPE_POD, \ .content_size = sizeof(structure), \ } +#define CBS_UNIT_RANGE_POD(range_start, range_end, structure) { \ + .nb_unit_types = CBS_UNIT_TYPE_RANGE, \ + .unit_type.range.start = range_start, \ + .unit_type.range.end = range_end, \ + .content_type = CBS_CONTENT_TYPE_POD, \ + .content_size = sizeof(structure), \ + } #define CBS_UNIT_TYPES_INTERNAL_REF(types, structure, ref_field) { \ .nb_unit_types = FF_ARRAY_ELEMS((CodedBitstreamUnitType[])TYPE_LIST types), \ |