mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
avcodec/cbs*: remove redundant const, it's already in typedef
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
This commit is contained in:
parent
9ad20839fb
commit
fe425d97d1
9 changed files with 17 additions and 17 deletions
|
|
@ -891,7 +891,7 @@ void CBS_FUNC(delete_unit)(CodedBitstreamFragment *frag,
|
||||||
|
|
||||||
static void cbs_default_free_unit_content(AVRefStructOpaque opaque, void *content)
|
static void cbs_default_free_unit_content(AVRefStructOpaque opaque, void *content)
|
||||||
{
|
{
|
||||||
const CodedBitstreamUnitTypeDescriptor *desc = opaque.c;
|
CodedBitstreamUnitTypeDescriptor *desc = opaque.c;
|
||||||
|
|
||||||
for (int i = 0; i < desc->type.ref.nb_offsets; i++) {
|
for (int i = 0; i < desc->type.ref.nb_offsets; i++) {
|
||||||
void **ptr = (void**)((char*)content + desc->type.ref.offsets[i]);
|
void **ptr = (void**)((char*)content + desc->type.ref.offsets[i]);
|
||||||
|
|
@ -899,11 +899,11 @@ static void cbs_default_free_unit_content(AVRefStructOpaque opaque, void *conten
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static const CodedBitstreamUnitTypeDescriptor
|
static CodedBitstreamUnitTypeDescriptor
|
||||||
*cbs_find_unit_type_desc(CodedBitstreamContext *ctx,
|
*cbs_find_unit_type_desc(CodedBitstreamContext *ctx,
|
||||||
CodedBitstreamUnit *unit)
|
CodedBitstreamUnit *unit)
|
||||||
{
|
{
|
||||||
const CodedBitstreamUnitTypeDescriptor *desc;
|
CodedBitstreamUnitTypeDescriptor *desc;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
if (!ctx->codec->unit_types)
|
if (!ctx->codec->unit_types)
|
||||||
|
|
@ -927,7 +927,7 @@ static const CodedBitstreamUnitTypeDescriptor
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *cbs_alloc_content(const CodedBitstreamUnitTypeDescriptor *desc)
|
static void *cbs_alloc_content(CodedBitstreamUnitTypeDescriptor *desc)
|
||||||
{
|
{
|
||||||
return av_refstruct_alloc_ext_c(desc->content_size, 0,
|
return av_refstruct_alloc_ext_c(desc->content_size, 0,
|
||||||
(AVRefStructOpaque){ .c = desc },
|
(AVRefStructOpaque){ .c = desc },
|
||||||
|
|
@ -939,7 +939,7 @@ static void *cbs_alloc_content(const CodedBitstreamUnitTypeDescriptor *desc)
|
||||||
int CBS_FUNC(alloc_unit_content)(CodedBitstreamContext *ctx,
|
int CBS_FUNC(alloc_unit_content)(CodedBitstreamContext *ctx,
|
||||||
CodedBitstreamUnit *unit)
|
CodedBitstreamUnit *unit)
|
||||||
{
|
{
|
||||||
const CodedBitstreamUnitTypeDescriptor *desc;
|
CodedBitstreamUnitTypeDescriptor *desc;
|
||||||
|
|
||||||
av_assert0(!unit->content && !unit->content_ref);
|
av_assert0(!unit->content && !unit->content_ref);
|
||||||
|
|
||||||
|
|
@ -957,7 +957,7 @@ int CBS_FUNC(alloc_unit_content)(CodedBitstreamContext *ctx,
|
||||||
|
|
||||||
static int cbs_clone_noncomplex_unit_content(void **clonep,
|
static int cbs_clone_noncomplex_unit_content(void **clonep,
|
||||||
const CodedBitstreamUnit *unit,
|
const CodedBitstreamUnit *unit,
|
||||||
const CodedBitstreamUnitTypeDescriptor *desc)
|
CodedBitstreamUnitTypeDescriptor *desc)
|
||||||
{
|
{
|
||||||
const uint8_t *src;
|
const uint8_t *src;
|
||||||
uint8_t *copy;
|
uint8_t *copy;
|
||||||
|
|
@ -1017,7 +1017,7 @@ fail:
|
||||||
static int cbs_clone_unit_content(CodedBitstreamContext *ctx,
|
static int cbs_clone_unit_content(CodedBitstreamContext *ctx,
|
||||||
CodedBitstreamUnit *unit)
|
CodedBitstreamUnit *unit)
|
||||||
{
|
{
|
||||||
const CodedBitstreamUnitTypeDescriptor *desc;
|
CodedBitstreamUnitTypeDescriptor *desc;
|
||||||
void *new_content;
|
void *new_content;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -421,7 +421,7 @@ static void cbs_apv_free_metadata(AVRefStructOpaque unused, void *content)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static const CodedBitstreamUnitTypeDescriptor cbs_apv_unit_types[] = {
|
static CodedBitstreamUnitTypeDescriptor cbs_apv_unit_types[] = {
|
||||||
{
|
{
|
||||||
.nb_unit_types = CBS_UNIT_TYPE_RANGE,
|
.nb_unit_types = CBS_UNIT_TYPE_RANGE,
|
||||||
.unit_type.range = {
|
.unit_type.range = {
|
||||||
|
|
|
||||||
|
|
@ -1312,7 +1312,7 @@ static void cbs_av1_free_metadata(AVRefStructOpaque unused, void *content)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const CodedBitstreamUnitTypeDescriptor cbs_av1_unit_types[] = {
|
static CodedBitstreamUnitTypeDescriptor cbs_av1_unit_types[] = {
|
||||||
CBS_UNIT_TYPE_POD(AV1_OBU_SEQUENCE_HEADER, AV1RawOBU),
|
CBS_UNIT_TYPE_POD(AV1_OBU_SEQUENCE_HEADER, AV1RawOBU),
|
||||||
CBS_UNIT_TYPE_POD(AV1_OBU_TEMPORAL_DELIMITER, AV1RawOBU),
|
CBS_UNIT_TYPE_POD(AV1_OBU_TEMPORAL_DELIMITER, AV1RawOBU),
|
||||||
CBS_UNIT_TYPE_POD(AV1_OBU_FRAME_HEADER, AV1RawOBU),
|
CBS_UNIT_TYPE_POD(AV1_OBU_FRAME_HEADER, AV1RawOBU),
|
||||||
|
|
|
||||||
|
|
@ -1997,7 +1997,7 @@ static void cbs_h264_free_sei(AVRefStructOpaque unused, void *content)
|
||||||
ff_cbs_sei_free_message_list(&sei->message_list);
|
ff_cbs_sei_free_message_list(&sei->message_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const CodedBitstreamUnitTypeDescriptor cbs_h264_unit_types[] = {
|
static CodedBitstreamUnitTypeDescriptor cbs_h264_unit_types[] = {
|
||||||
CBS_UNIT_TYPE_POD(H264_NAL_SPS, H264RawSPS),
|
CBS_UNIT_TYPE_POD(H264_NAL_SPS, H264RawSPS),
|
||||||
CBS_UNIT_TYPE_POD(H264_NAL_SPS_EXT, H264RawSPSExtension),
|
CBS_UNIT_TYPE_POD(H264_NAL_SPS_EXT, H264RawSPSExtension),
|
||||||
|
|
||||||
|
|
@ -2023,7 +2023,7 @@ static void cbs_h265_free_sei(AVRefStructOpaque unused, void *content)
|
||||||
ff_cbs_sei_free_message_list(&sei->message_list);
|
ff_cbs_sei_free_message_list(&sei->message_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const CodedBitstreamUnitTypeDescriptor cbs_h265_unit_types[] = {
|
static CodedBitstreamUnitTypeDescriptor cbs_h265_unit_types[] = {
|
||||||
CBS_UNIT_TYPE_INTERNAL_REF(HEVC_NAL_VPS, H265RawVPS, extension_data.data),
|
CBS_UNIT_TYPE_INTERNAL_REF(HEVC_NAL_VPS, H265RawVPS, extension_data.data),
|
||||||
CBS_UNIT_TYPE_INTERNAL_REF(HEVC_NAL_SPS, H265RawSPS, extension_data.data),
|
CBS_UNIT_TYPE_INTERNAL_REF(HEVC_NAL_SPS, H265RawSPS, extension_data.data),
|
||||||
CBS_UNIT_TYPE_INTERNAL_REF(HEVC_NAL_PPS, H265RawPPS, extension_data.data),
|
CBS_UNIT_TYPE_INTERNAL_REF(HEVC_NAL_PPS, H265RawPPS, extension_data.data),
|
||||||
|
|
@ -2060,7 +2060,7 @@ static void cbs_h266_free_sei(AVRefStructOpaque unused, void *content)
|
||||||
ff_cbs_sei_free_message_list(&sei->message_list);
|
ff_cbs_sei_free_message_list(&sei->message_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const CodedBitstreamUnitTypeDescriptor cbs_h266_unit_types[] = {
|
static CodedBitstreamUnitTypeDescriptor cbs_h266_unit_types[] = {
|
||||||
CBS_UNIT_TYPE_INTERNAL_REF(VVC_DCI_NUT, H266RawDCI, extension_data.data),
|
CBS_UNIT_TYPE_INTERNAL_REF(VVC_DCI_NUT, H266RawDCI, extension_data.data),
|
||||||
CBS_UNIT_TYPE_INTERNAL_REF(VVC_OPI_NUT, H266RawOPI, extension_data.data),
|
CBS_UNIT_TYPE_INTERNAL_REF(VVC_OPI_NUT, H266RawOPI, extension_data.data),
|
||||||
CBS_UNIT_TYPE_INTERNAL_REF(VVC_VPS_NUT, H266RawVPS, extension_data.data),
|
CBS_UNIT_TYPE_INTERNAL_REF(VVC_VPS_NUT, H266RawVPS, extension_data.data),
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ typedef struct CodedBitstreamType {
|
||||||
|
|
||||||
// List of unit type descriptors for this codec.
|
// List of unit type descriptors for this codec.
|
||||||
// Terminated by a descriptor with nb_unit_types equal to zero.
|
// Terminated by a descriptor with nb_unit_types equal to zero.
|
||||||
const CodedBitstreamUnitTypeDescriptor *unit_types;
|
CodedBitstreamUnitTypeDescriptor *unit_types;
|
||||||
|
|
||||||
// Split frag->data into coded bitstream units, creating the
|
// Split frag->data into coded bitstream units, creating the
|
||||||
// frag->units array. Fill data but not content on each unit.
|
// frag->units array. Fill data but not content on each unit.
|
||||||
|
|
|
||||||
|
|
@ -417,7 +417,7 @@ static int cbs_jpeg_assemble_fragment(CodedBitstreamContext *ctx,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const CodedBitstreamUnitTypeDescriptor cbs_jpeg_unit_types[] = {
|
static CodedBitstreamUnitTypeDescriptor cbs_jpeg_unit_types[] = {
|
||||||
CBS_UNIT_RANGE_POD(JPEG_MARKER_SOF0, JPEG_MARKER_SOF3, JPEGRawFrameHeader),
|
CBS_UNIT_RANGE_POD(JPEG_MARKER_SOF0, JPEG_MARKER_SOF3, JPEGRawFrameHeader),
|
||||||
|
|
||||||
CBS_UNIT_RANGE_INTERNAL_REF(JPEG_MARKER_APPN, JPEG_MARKER_APPN + 15,
|
CBS_UNIT_RANGE_INTERNAL_REF(JPEG_MARKER_APPN, JPEG_MARKER_APPN + 15,
|
||||||
|
|
|
||||||
|
|
@ -397,7 +397,7 @@ static int cbs_mpeg2_assemble_fragment(CodedBitstreamContext *ctx,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const CodedBitstreamUnitTypeDescriptor cbs_mpeg2_unit_types[] = {
|
static CodedBitstreamUnitTypeDescriptor cbs_mpeg2_unit_types[] = {
|
||||||
CBS_UNIT_TYPE_INTERNAL_REF(MPEG2_START_PICTURE, MPEG2RawPictureHeader,
|
CBS_UNIT_TYPE_INTERNAL_REF(MPEG2_START_PICTURE, MPEG2RawPictureHeader,
|
||||||
extra_information_picture.extra_information),
|
extra_information_picture.extra_information),
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -366,7 +366,7 @@ static int cbs_vp8_assemble_fragment(CodedBitstreamContext *ctx,
|
||||||
return AVERROR_PATCHWELCOME;
|
return AVERROR_PATCHWELCOME;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const CodedBitstreamUnitTypeDescriptor cbs_vp8_unit_types[] = {
|
static CodedBitstreamUnitTypeDescriptor cbs_vp8_unit_types[] = {
|
||||||
CBS_UNIT_TYPE_INTERNAL_REF(0, VP8RawFrame, data),
|
CBS_UNIT_TYPE_INTERNAL_REF(0, VP8RawFrame, data),
|
||||||
CBS_UNIT_TYPE_END_OF_LIST,
|
CBS_UNIT_TYPE_END_OF_LIST,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -594,7 +594,7 @@ static av_cold void cbs_vp9_flush(CodedBitstreamContext *ctx)
|
||||||
memset(vp9->ref, 0, sizeof(vp9->ref));
|
memset(vp9->ref, 0, sizeof(vp9->ref));
|
||||||
}
|
}
|
||||||
|
|
||||||
static const CodedBitstreamUnitTypeDescriptor cbs_vp9_unit_types[] = {
|
static CodedBitstreamUnitTypeDescriptor cbs_vp9_unit_types[] = {
|
||||||
CBS_UNIT_TYPE_INTERNAL_REF(0, VP9RawFrame, data),
|
CBS_UNIT_TYPE_INTERNAL_REF(0, VP9RawFrame, data),
|
||||||
CBS_UNIT_TYPE_END_OF_LIST
|
CBS_UNIT_TYPE_END_OF_LIST
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue