1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avformat/mov_muxer: Extended MOV muxer to handle APV video content

- Changes in mov_write_video_tag function to handle APV elementary stream
- Provided structure APVDecoderConfigurationRecord that specifies the decoder configuration information for APV video content

Co-Authored-by: James Almer <jamrial@gmail.com>
Signed-off-by: Dawid Kozinski <d.kozinski@samsung.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Dawid Kozinski
2025-07-14 11:18:57 +02:00
committed by James Almer
parent 585a8d5357
commit 8baa691e5f
10 changed files with 493 additions and 9 deletions

View File

@ -68,7 +68,7 @@ static void cbs_apv_derive_tile_info(APVDerivedTileInfo *ti,
#define HEADER(name) do { \
ff_cbs_trace_header(ctx, name); \
CBS_FUNC(trace_header)(ctx, name); \
} while (0)
#define CHECK(call) do { \
@ -102,7 +102,7 @@ static void cbs_apv_derive_tile_info(APVDerivedTileInfo *ti,
#define xu(width, name, var, range_min, range_max, subs, ...) do { \
uint32_t value; \
CHECK(ff_cbs_read_unsigned(ctx, rw, width, #name, \
CHECK(CBS_FUNC(read_unsigned)(ctx, rw, width, #name, \
SUBSCRIPTS(subs, __VA_ARGS__), \
&value, range_min, range_max)); \
var = value; \
@ -124,6 +124,7 @@ static void cbs_apv_derive_tile_info(APVDerivedTileInfo *ti,
#undef infer
#undef byte_alignment
#if CBS_WRITE
#define WRITE
#define READWRITE write
#define RWContext PutBitContext
@ -131,7 +132,7 @@ static void cbs_apv_derive_tile_info(APVDerivedTileInfo *ti,
#define xu(width, name, var, range_min, range_max, subs, ...) do { \
uint32_t value = var; \
CHECK(ff_cbs_write_unsigned(ctx, rw, width, #name, \
CHECK(CBS_FUNC(write_unsigned)(ctx, rw, width, #name, \
SUBSCRIPTS(subs, __VA_ARGS__), \
value, range_min, range_max)); \
} while (0)
@ -157,6 +158,7 @@ static void cbs_apv_derive_tile_info(APVDerivedTileInfo *ti,
#undef xu
#undef infer
#undef byte_alignment
#endif // CBS_WRITE
static int cbs_apv_split_fragment(CodedBitstreamContext *ctx,
@ -234,7 +236,7 @@ static int cbs_apv_split_fragment(CodedBitstreamContext *ctx,
// Could select/skip frames based on type/group_id here.
err = ff_cbs_append_unit_data(frag, pbu_header.pbu_type,
err = CBS_FUNC(append_unit_data)(frag, pbu_header.pbu_type,
data, pbu_size, frag->data_ref);
if (err < 0)
goto fail;
@ -259,7 +261,7 @@ static int cbs_apv_read_unit(CodedBitstreamContext *ctx,
if (err < 0)
return err;
err = ff_cbs_alloc_unit_content(ctx, unit);
err = CBS_FUNC(alloc_unit_content)(ctx, unit);
if (err < 0)
return err;
@ -316,6 +318,7 @@ static int cbs_apv_write_unit(CodedBitstreamContext *ctx,
CodedBitstreamUnit *unit,
PutBitContext *pbc)
{
#if CBS_WRITE
int err;
switch (unit->type) {
@ -358,6 +361,9 @@ static int cbs_apv_write_unit(CodedBitstreamContext *ctx,
}
return 0;
#else
return AVERROR(ENOSYS);
#endif
}
static int cbs_apv_assemble_fragment(CodedBitstreamContext *ctx,
@ -441,7 +447,7 @@ static const CodedBitstreamUnitTypeDescriptor cbs_apv_unit_types[] = {
CBS_UNIT_TYPE_END_OF_LIST
};
const CodedBitstreamType ff_cbs_type_apv = {
const CodedBitstreamType CBS_FUNC(type_apv) = {
.codec_id = AV_CODEC_ID_APV,
.priv_data_size = sizeof(CodedBitstreamAPVContext),