mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/codec_internal: Add FFCodec, hide internal part of AVCodec
Up until now, codec.h contains both public and private parts of AVCodec. This exposes the internals of AVCodec to users and leads them into the temptation of actually using them and forces us to forward-declare structures and types that users can't use at all. This commit changes this by adding a new structure FFCodec to codec_internal.h that extends AVCodec, i.e. contains the public AVCodec as first member; the private fields of AVCodec are moved to this structure, leaving codec.h clean. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
a688f3c13c
commit
20f9727018
6
configure
vendored
6
configure
vendored
@ -3985,8 +3985,8 @@ OUTDEV_LIST=$(find_things_extern muxer AVOutputFormat libavdevice/alldevices.c o
|
|||||||
INDEV_LIST=$(find_things_extern demuxer AVInputFormat libavdevice/alldevices.c indev)
|
INDEV_LIST=$(find_things_extern demuxer AVInputFormat libavdevice/alldevices.c indev)
|
||||||
MUXER_LIST=$(find_things_extern muxer AVOutputFormat libavformat/allformats.c)
|
MUXER_LIST=$(find_things_extern muxer AVOutputFormat libavformat/allformats.c)
|
||||||
DEMUXER_LIST=$(find_things_extern demuxer AVInputFormat libavformat/allformats.c)
|
DEMUXER_LIST=$(find_things_extern demuxer AVInputFormat libavformat/allformats.c)
|
||||||
ENCODER_LIST=$(find_things_extern encoder AVCodec libavcodec/allcodecs.c)
|
ENCODER_LIST=$(find_things_extern encoder FFCodec libavcodec/allcodecs.c)
|
||||||
DECODER_LIST=$(find_things_extern decoder AVCodec libavcodec/allcodecs.c)
|
DECODER_LIST=$(find_things_extern decoder FFCodec libavcodec/allcodecs.c)
|
||||||
CODEC_LIST="
|
CODEC_LIST="
|
||||||
$ENCODER_LIST
|
$ENCODER_LIST
|
||||||
$DECODER_LIST
|
$DECODER_LIST
|
||||||
@ -7867,7 +7867,7 @@ print_enabled_components(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_enabled_components libavfilter/filter_list.c AVFilter filter_list $FILTER_LIST
|
print_enabled_components libavfilter/filter_list.c AVFilter filter_list $FILTER_LIST
|
||||||
print_enabled_components libavcodec/codec_list.c AVCodec codec_list $CODEC_LIST
|
print_enabled_components libavcodec/codec_list.c FFCodec codec_list $CODEC_LIST
|
||||||
print_enabled_components libavcodec/parser_list.c AVCodecParser parser_list $PARSER_LIST
|
print_enabled_components libavcodec/parser_list.c AVCodecParser parser_list $PARSER_LIST
|
||||||
print_enabled_components libavcodec/bsf_list.c AVBitStreamFilter bitstream_filters $BSF_LIST
|
print_enabled_components libavcodec/bsf_list.c AVBitStreamFilter bitstream_filters $BSF_LIST
|
||||||
print_enabled_components libavformat/demuxer_list.c AVInputFormat demuxer_list $DEMUXER_LIST
|
print_enabled_components libavformat/demuxer_list.c AVInputFormat demuxer_list $DEMUXER_LIST
|
||||||
|
@ -145,13 +145,13 @@ static int zero12v_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
return avpkt->size;
|
return avpkt->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_zero12v_decoder = {
|
const FFCodec ff_zero12v_decoder = {
|
||||||
.name = "012v",
|
.p.name = "012v",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_012V,
|
.p.id = AV_CODEC_ID_012V,
|
||||||
.init = zero12v_decode_init,
|
.init = zero12v_decode_init,
|
||||||
.decode = zero12v_decode_frame,
|
.decode = zero12v_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -1027,15 +1027,15 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_fourxm_decoder = {
|
const FFCodec ff_fourxm_decoder = {
|
||||||
.name = "4xm",
|
.p.name = "4xm",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("4X Movie"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("4X Movie"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_4XM,
|
.p.id = AV_CODEC_ID_4XM,
|
||||||
.priv_data_size = sizeof(FourXContext),
|
.priv_data_size = sizeof(FourXContext),
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
.close = decode_end,
|
.close = decode_end,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
@ -174,14 +174,14 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_eightbps_decoder = {
|
const FFCodec ff_eightbps_decoder = {
|
||||||
.name = "8bps",
|
.p.name = "8bps",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("QuickTime 8BPS video"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("QuickTime 8BPS video"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_8BPS,
|
.p.id = AV_CODEC_ID_8BPS,
|
||||||
.priv_data_size = sizeof(EightBpsContext),
|
.priv_data_size = sizeof(EightBpsContext),
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -188,33 +188,33 @@ static av_cold int eightsvx_decode_close(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_EIGHTSVX_FIB_DECODER
|
#if CONFIG_EIGHTSVX_FIB_DECODER
|
||||||
const AVCodec ff_eightsvx_fib_decoder = {
|
const FFCodec ff_eightsvx_fib_decoder = {
|
||||||
.name = "8svx_fib",
|
.p.name = "8svx_fib",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("8SVX fibonacci"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("8SVX fibonacci"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_8SVX_FIB,
|
.p.id = AV_CODEC_ID_8SVX_FIB,
|
||||||
.priv_data_size = sizeof (EightSvxContext),
|
.priv_data_size = sizeof (EightSvxContext),
|
||||||
.init = eightsvx_decode_init,
|
.init = eightsvx_decode_init,
|
||||||
.decode = eightsvx_decode_frame,
|
.decode = eightsvx_decode_frame,
|
||||||
.close = eightsvx_decode_close,
|
.close = eightsvx_decode_close,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
|
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_EIGHTSVX_EXP_DECODER
|
#if CONFIG_EIGHTSVX_EXP_DECODER
|
||||||
const AVCodec ff_eightsvx_exp_decoder = {
|
const FFCodec ff_eightsvx_exp_decoder = {
|
||||||
.name = "8svx_exp",
|
.p.name = "8svx_exp",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("8SVX exponential"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("8SVX exponential"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_8SVX_EXP,
|
.p.id = AV_CODEC_ID_8SVX_EXP,
|
||||||
.priv_data_size = sizeof (EightSvxContext),
|
.priv_data_size = sizeof (EightSvxContext),
|
||||||
.init = eightsvx_decode_init,
|
.init = eightsvx_decode_init,
|
||||||
.decode = eightsvx_decode_frame,
|
.decode = eightsvx_decode_frame,
|
||||||
.close = eightsvx_decode_close,
|
.close = eightsvx_decode_close,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
|
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -393,32 +393,32 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_A64MULTI_ENCODER
|
#if CONFIG_A64MULTI_ENCODER
|
||||||
const AVCodec ff_a64multi_encoder = {
|
const FFCodec ff_a64multi_encoder = {
|
||||||
.name = "a64multi",
|
.p.name = "a64multi",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_A64_MULTI,
|
.p.id = AV_CODEC_ID_A64_MULTI,
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
|
||||||
.priv_data_size = sizeof(A64Context),
|
.priv_data_size = sizeof(A64Context),
|
||||||
.init = a64multi_encode_init,
|
.init = a64multi_encode_init,
|
||||||
.encode2 = a64multi_encode_frame,
|
.encode2 = a64multi_encode_frame,
|
||||||
.close = a64multi_close_encoder,
|
.close = a64multi_close_encoder,
|
||||||
.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
|
.p.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_A64MULTI5_ENCODER
|
#if CONFIG_A64MULTI5_ENCODER
|
||||||
const AVCodec ff_a64multi5_encoder = {
|
const FFCodec ff_a64multi5_encoder = {
|
||||||
.name = "a64multi5",
|
.p.name = "a64multi5",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64, extended with 5th color (colram)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64, extended with 5th color (colram)"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_A64_MULTI5,
|
.p.id = AV_CODEC_ID_A64_MULTI5,
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
|
||||||
.priv_data_size = sizeof(A64Context),
|
.priv_data_size = sizeof(A64Context),
|
||||||
.init = a64multi_encode_init,
|
.init = a64multi_encode_init,
|
||||||
.encode2 = a64multi_encode_frame,
|
.encode2 = a64multi_encode_frame,
|
||||||
.close = a64multi_close_encoder,
|
.close = a64multi_close_encoder,
|
||||||
.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
|
.p.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -552,27 +552,27 @@ static av_cold int latm_decode_init(AVCodecContext *avctx)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_aac_decoder = {
|
const FFCodec ff_aac_decoder = {
|
||||||
.name = "aac",
|
.p.name = "aac",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_AAC,
|
.p.id = AV_CODEC_ID_AAC,
|
||||||
.priv_data_size = sizeof(AACContext),
|
.priv_data_size = sizeof(AACContext),
|
||||||
.init = aac_decode_init,
|
.init = aac_decode_init,
|
||||||
.close = aac_decode_close,
|
.close = aac_decode_close,
|
||||||
.decode = aac_decode_frame,
|
.decode = aac_decode_frame,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) {
|
.p.sample_fmts = (const enum AVSampleFormat[]) {
|
||||||
AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE
|
AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE
|
||||||
},
|
},
|
||||||
.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||||
.channel_layouts = aac_channel_layout,
|
.p.channel_layouts = aac_channel_layout,
|
||||||
#endif
|
#endif
|
||||||
.ch_layouts = aac_ch_layout,
|
.p.ch_layouts = aac_ch_layout,
|
||||||
.flush = flush,
|
.flush = flush,
|
||||||
.priv_class = &aac_decoder_class,
|
.p.priv_class = &aac_decoder_class,
|
||||||
.profiles = NULL_IF_CONFIG_SMALL(ff_aac_profiles),
|
.p.profiles = NULL_IF_CONFIG_SMALL(ff_aac_profiles),
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -580,24 +580,24 @@ const AVCodec ff_aac_decoder = {
|
|||||||
in MPEG transport streams which only contain one program.
|
in MPEG transport streams which only contain one program.
|
||||||
To do a more complex LATM demuxing a separate LATM demuxer should be used.
|
To do a more complex LATM demuxing a separate LATM demuxer should be used.
|
||||||
*/
|
*/
|
||||||
const AVCodec ff_aac_latm_decoder = {
|
const FFCodec ff_aac_latm_decoder = {
|
||||||
.name = "aac_latm",
|
.p.name = "aac_latm",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("AAC LATM (Advanced Audio Coding LATM syntax)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("AAC LATM (Advanced Audio Coding LATM syntax)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_AAC_LATM,
|
.p.id = AV_CODEC_ID_AAC_LATM,
|
||||||
.priv_data_size = sizeof(struct LATMContext),
|
.priv_data_size = sizeof(struct LATMContext),
|
||||||
.init = latm_decode_init,
|
.init = latm_decode_init,
|
||||||
.close = aac_decode_close,
|
.close = aac_decode_close,
|
||||||
.decode = latm_decode_frame,
|
.decode = latm_decode_frame,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) {
|
.p.sample_fmts = (const enum AVSampleFormat[]) {
|
||||||
AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE
|
AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE
|
||||||
},
|
},
|
||||||
.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||||
.channel_layouts = aac_channel_layout,
|
.p.channel_layouts = aac_channel_layout,
|
||||||
#endif
|
#endif
|
||||||
.ch_layouts = aac_ch_layout,
|
.p.ch_layouts = aac_ch_layout,
|
||||||
.flush = flush,
|
.flush = flush,
|
||||||
.profiles = NULL_IF_CONFIG_SMALL(ff_aac_profiles),
|
.p.profiles = NULL_IF_CONFIG_SMALL(ff_aac_profiles),
|
||||||
};
|
};
|
||||||
|
@ -450,24 +450,24 @@ static void apply_independent_coupling_fixed(AACContext *ac,
|
|||||||
|
|
||||||
#include "aacdec_template.c"
|
#include "aacdec_template.c"
|
||||||
|
|
||||||
const AVCodec ff_aac_fixed_decoder = {
|
const FFCodec ff_aac_fixed_decoder = {
|
||||||
.name = "aac_fixed",
|
.p.name = "aac_fixed",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_AAC,
|
.p.id = AV_CODEC_ID_AAC,
|
||||||
.priv_data_size = sizeof(AACContext),
|
.priv_data_size = sizeof(AACContext),
|
||||||
.init = aac_decode_init,
|
.init = aac_decode_init,
|
||||||
.close = aac_decode_close,
|
.close = aac_decode_close,
|
||||||
.decode = aac_decode_frame,
|
.decode = aac_decode_frame,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) {
|
.p.sample_fmts = (const enum AVSampleFormat[]) {
|
||||||
AV_SAMPLE_FMT_S32P, AV_SAMPLE_FMT_NONE
|
AV_SAMPLE_FMT_S32P, AV_SAMPLE_FMT_NONE
|
||||||
},
|
},
|
||||||
.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||||
.channel_layouts = aac_channel_layout,
|
.p.channel_layouts = aac_channel_layout,
|
||||||
#endif
|
#endif
|
||||||
.ch_layouts = aac_ch_layout,
|
.p.ch_layouts = aac_ch_layout,
|
||||||
.profiles = NULL_IF_CONFIG_SMALL(ff_aac_profiles),
|
.p.profiles = NULL_IF_CONFIG_SMALL(ff_aac_profiles),
|
||||||
.flush = flush,
|
.flush = flush,
|
||||||
};
|
};
|
||||||
|
@ -1137,20 +1137,20 @@ static const AVCodecDefault aac_encode_defaults[] = {
|
|||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
const AVCodec ff_aac_encoder = {
|
const FFCodec ff_aac_encoder = {
|
||||||
.name = "aac",
|
.p.name = "aac",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_AAC,
|
.p.id = AV_CODEC_ID_AAC,
|
||||||
.priv_data_size = sizeof(AACEncContext),
|
.priv_data_size = sizeof(AACEncContext),
|
||||||
.init = aac_encode_init,
|
.init = aac_encode_init,
|
||||||
.encode2 = aac_encode_frame,
|
.encode2 = aac_encode_frame,
|
||||||
.close = aac_encode_end,
|
.close = aac_encode_end,
|
||||||
.defaults = aac_encode_defaults,
|
.defaults = aac_encode_defaults,
|
||||||
.supported_samplerates = ff_mpeg4audio_sample_rates,
|
.p.supported_samplerates = ff_mpeg4audio_sample_rates,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
.capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_DELAY,
|
.p.capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_DELAY,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
|
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.priv_class = &aacenc_class,
|
.p.priv_class = &aacenc_class,
|
||||||
};
|
};
|
||||||
|
@ -150,15 +150,15 @@ static av_cold int aasc_decode_end(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_aasc_decoder = {
|
const FFCodec ff_aasc_decoder = {
|
||||||
.name = "aasc",
|
.p.name = "aasc",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Autodesk RLE"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Autodesk RLE"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_AASC,
|
.p.id = AV_CODEC_ID_AASC,
|
||||||
.priv_data_size = sizeof(AascContext),
|
.priv_data_size = sizeof(AascContext),
|
||||||
.init = aasc_decode_init,
|
.init = aasc_decode_init,
|
||||||
.close = aasc_decode_end,
|
.close = aasc_decode_end,
|
||||||
.decode = aasc_decode_frame,
|
.decode = aasc_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -169,19 +169,19 @@ static const AVClass ac3_decoder_class = {
|
|||||||
.version = LIBAVUTIL_VERSION_INT,
|
.version = LIBAVUTIL_VERSION_INT,
|
||||||
};
|
};
|
||||||
|
|
||||||
const AVCodec ff_ac3_fixed_decoder = {
|
const FFCodec ff_ac3_fixed_decoder = {
|
||||||
.name = "ac3_fixed",
|
.p.name = "ac3_fixed",
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
|
||||||
.id = AV_CODEC_ID_AC3,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
|
.p.id = AV_CODEC_ID_AC3,
|
||||||
|
.p.priv_class = &ac3_decoder_class,
|
||||||
.priv_data_size = sizeof (AC3DecodeContext),
|
.priv_data_size = sizeof (AC3DecodeContext),
|
||||||
.init = ac3_decode_init,
|
.init = ac3_decode_init,
|
||||||
.close = ac3_decode_end,
|
.close = ac3_decode_end,
|
||||||
.decode = ac3_decode_frame,
|
.decode = ac3_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
|
.p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
|
||||||
AV_CODEC_CAP_DR1,
|
AV_CODEC_CAP_DR1,
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
|
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
|
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.priv_class = &ac3_decoder_class,
|
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
@ -59,38 +59,38 @@ static const AVClass ac3_eac3_decoder_class = {
|
|||||||
.version = LIBAVUTIL_VERSION_INT,
|
.version = LIBAVUTIL_VERSION_INT,
|
||||||
};
|
};
|
||||||
|
|
||||||
const AVCodec ff_ac3_decoder = {
|
const FFCodec ff_ac3_decoder = {
|
||||||
.name = "ac3",
|
.p.name = "ac3",
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_AC3,
|
.p.id = AV_CODEC_ID_AC3,
|
||||||
.priv_data_size = sizeof (AC3DecodeContext),
|
.priv_data_size = sizeof (AC3DecodeContext),
|
||||||
.init = ac3_decode_init,
|
.init = ac3_decode_init,
|
||||||
.close = ac3_decode_end,
|
.close = ac3_decode_end,
|
||||||
.decode = ac3_decode_frame,
|
.decode = ac3_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
|
.p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
|
||||||
AV_CODEC_CAP_DR1,
|
AV_CODEC_CAP_DR1,
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
|
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.priv_class = &ac3_eac3_decoder_class,
|
.p.priv_class = &ac3_eac3_decoder_class,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
|
||||||
#if CONFIG_EAC3_DECODER
|
#if CONFIG_EAC3_DECODER
|
||||||
const AVCodec ff_eac3_decoder = {
|
const FFCodec ff_eac3_decoder = {
|
||||||
.name = "eac3",
|
.p.name = "eac3",
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_EAC3,
|
.p.id = AV_CODEC_ID_EAC3,
|
||||||
.priv_data_size = sizeof (AC3DecodeContext),
|
.priv_data_size = sizeof (AC3DecodeContext),
|
||||||
.init = ac3_decode_init,
|
.init = ac3_decode_init,
|
||||||
.close = ac3_decode_end,
|
.close = ac3_decode_end,
|
||||||
.decode = ac3_decode_frame,
|
.decode = ac3_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
|
.p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
|
||||||
AV_CODEC_CAP_DR1,
|
AV_CODEC_CAP_DR1,
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52B (AC-3, E-AC-3)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52B (AC-3, E-AC-3)"),
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
|
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.priv_class = &ac3_eac3_decoder_class,
|
.p.priv_class = &ac3_eac3_decoder_class,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -120,25 +120,25 @@ static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
|
|
||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
FF_DISABLE_DEPRECATION_WARNINGS
|
||||||
const AVCodec ff_ac3_fixed_encoder = {
|
const FFCodec ff_ac3_fixed_encoder = {
|
||||||
.name = "ac3_fixed",
|
.p.name = "ac3_fixed",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_AC3,
|
.p.id = AV_CODEC_ID_AC3,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.priv_data_size = sizeof(AC3EncodeContext),
|
.priv_data_size = sizeof(AC3EncodeContext),
|
||||||
.init = ac3_fixed_encode_init,
|
.init = ac3_fixed_encode_init,
|
||||||
.encode2 = ff_ac3_fixed_encode_frame,
|
.encode2 = ff_ac3_fixed_encode_frame,
|
||||||
.close = ff_ac3_encode_close,
|
.close = ff_ac3_encode_close,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32P,
|
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32P,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.priv_class = &ff_ac3enc_class,
|
.p.priv_class = &ff_ac3enc_class,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
.supported_samplerates = ff_ac3_sample_rate_tab,
|
.p.supported_samplerates = ff_ac3_sample_rate_tab,
|
||||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||||
.channel_layouts = ff_ac3_channel_layouts,
|
.p.channel_layouts = ff_ac3_channel_layouts,
|
||||||
#endif
|
#endif
|
||||||
.ch_layouts = ff_ac3_ch_layouts,
|
.p.ch_layouts = ff_ac3_ch_layouts,
|
||||||
.defaults = ff_ac3_enc_defaults,
|
.defaults = ff_ac3_enc_defaults,
|
||||||
};
|
};
|
||||||
FF_ENABLE_DEPRECATION_WARNINGS
|
FF_ENABLE_DEPRECATION_WARNINGS
|
||||||
|
@ -124,24 +124,24 @@ av_cold int ff_ac3_float_encode_init(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
FF_DISABLE_DEPRECATION_WARNINGS
|
||||||
const AVCodec ff_ac3_encoder = {
|
const FFCodec ff_ac3_encoder = {
|
||||||
.name = "ac3",
|
.p.name = "ac3",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_AC3,
|
.p.id = AV_CODEC_ID_AC3,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.priv_data_size = sizeof(AC3EncodeContext),
|
.priv_data_size = sizeof(AC3EncodeContext),
|
||||||
.init = ff_ac3_float_encode_init,
|
.init = ff_ac3_float_encode_init,
|
||||||
.encode2 = ff_ac3_float_encode_frame,
|
.encode2 = ff_ac3_float_encode_frame,
|
||||||
.close = ff_ac3_encode_close,
|
.close = ff_ac3_encode_close,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
|
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.priv_class = &ff_ac3enc_class,
|
.p.priv_class = &ff_ac3enc_class,
|
||||||
.supported_samplerates = ff_ac3_sample_rate_tab,
|
.p.supported_samplerates = ff_ac3_sample_rate_tab,
|
||||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||||
.channel_layouts = ff_ac3_channel_layouts,
|
.p.channel_layouts = ff_ac3_channel_layouts,
|
||||||
#endif
|
#endif
|
||||||
.ch_layouts = ff_ac3_ch_layouts,
|
.p.ch_layouts = ff_ac3_ch_layouts,
|
||||||
.defaults = ff_ac3_enc_defaults,
|
.defaults = ff_ac3_enc_defaults,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
@ -2286,17 +2286,17 @@ static const enum AVSampleFormat sample_fmts_both[] = { AV_SAMPLE_FMT_S16,
|
|||||||
|
|
||||||
#define ADPCM_DECODER_0(id_, sample_fmts_, name_, long_name_)
|
#define ADPCM_DECODER_0(id_, sample_fmts_, name_, long_name_)
|
||||||
#define ADPCM_DECODER_1(id_, sample_fmts_, name_, long_name_) \
|
#define ADPCM_DECODER_1(id_, sample_fmts_, name_, long_name_) \
|
||||||
const AVCodec ff_ ## name_ ## _decoder = { \
|
const FFCodec ff_ ## name_ ## _decoder = { \
|
||||||
.name = #name_, \
|
.p.name = #name_, \
|
||||||
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
|
.p.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
|
||||||
.type = AVMEDIA_TYPE_AUDIO, \
|
.p.type = AVMEDIA_TYPE_AUDIO, \
|
||||||
.id = id_, \
|
.p.id = id_, \
|
||||||
|
.p.capabilities = AV_CODEC_CAP_DR1, \
|
||||||
|
.p.sample_fmts = sample_fmts_, \
|
||||||
.priv_data_size = sizeof(ADPCMDecodeContext), \
|
.priv_data_size = sizeof(ADPCMDecodeContext), \
|
||||||
.init = adpcm_decode_init, \
|
.init = adpcm_decode_init, \
|
||||||
.decode = adpcm_decode_frame, \
|
.decode = adpcm_decode_frame, \
|
||||||
.flush = adpcm_flush, \
|
.flush = adpcm_flush, \
|
||||||
.capabilities = AV_CODEC_CAP_DR1, \
|
|
||||||
.sample_fmts = sample_fmts_, \
|
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, \
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, \
|
||||||
};
|
};
|
||||||
#define ADPCM_DECODER_2(enabled, codec_id, name, sample_fmts, long_name) \
|
#define ADPCM_DECODER_2(enabled, codec_id, name, sample_fmts, long_name) \
|
||||||
|
@ -996,20 +996,20 @@ static const AVClass adpcm_encoder_class = {
|
|||||||
|
|
||||||
#define ADPCM_ENCODER_0(id_, name_, sample_fmts_, capabilities_, long_name_)
|
#define ADPCM_ENCODER_0(id_, name_, sample_fmts_, capabilities_, long_name_)
|
||||||
#define ADPCM_ENCODER_1(id_, name_, sample_fmts_, capabilities_, long_name_) \
|
#define ADPCM_ENCODER_1(id_, name_, sample_fmts_, capabilities_, long_name_) \
|
||||||
const AVCodec ff_ ## name_ ## _encoder = { \
|
const FFCodec ff_ ## name_ ## _encoder = { \
|
||||||
.name = #name_, \
|
.p.name = #name_, \
|
||||||
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
|
.p.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
|
||||||
.type = AVMEDIA_TYPE_AUDIO, \
|
.p.type = AVMEDIA_TYPE_AUDIO, \
|
||||||
.id = id_, \
|
.p.id = id_, \
|
||||||
|
.p.sample_fmts = sample_fmts_, \
|
||||||
|
.p.ch_layouts = ch_layouts, \
|
||||||
|
.p.capabilities = capabilities_ | AV_CODEC_CAP_DR1, \
|
||||||
|
.p.priv_class = &adpcm_encoder_class, \
|
||||||
.priv_data_size = sizeof(ADPCMEncodeContext), \
|
.priv_data_size = sizeof(ADPCMEncodeContext), \
|
||||||
.init = adpcm_encode_init, \
|
.init = adpcm_encode_init, \
|
||||||
.encode2 = adpcm_encode_frame, \
|
.encode2 = adpcm_encode_frame, \
|
||||||
.close = adpcm_encode_close, \
|
.close = adpcm_encode_close, \
|
||||||
.sample_fmts = sample_fmts_, \
|
|
||||||
.ch_layouts = ch_layouts, \
|
|
||||||
.capabilities = capabilities_ | AV_CODEC_CAP_DR1, \
|
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE, \
|
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE, \
|
||||||
.priv_class = &adpcm_encoder_class, \
|
|
||||||
};
|
};
|
||||||
#define ADPCM_ENCODER_2(enabled, codec_id, name, sample_fmts, capabilities, long_name) \
|
#define ADPCM_ENCODER_2(enabled, codec_id, name, sample_fmts, capabilities, long_name) \
|
||||||
ADPCM_ENCODER_ ## enabled(codec_id, name, sample_fmts, capabilities, long_name)
|
ADPCM_ENCODER_ ## enabled(codec_id, name, sample_fmts, capabilities, long_name)
|
||||||
|
@ -191,18 +191,18 @@ static void adx_decode_flush(AVCodecContext *avctx)
|
|||||||
c->eof = 0;
|
c->eof = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_adpcm_adx_decoder = {
|
const FFCodec ff_adpcm_adx_decoder = {
|
||||||
.name = "adpcm_adx",
|
.p.name = "adpcm_adx",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_ADPCM_ADX,
|
.p.id = AV_CODEC_ID_ADPCM_ADX,
|
||||||
.priv_data_size = sizeof(ADXContext),
|
.priv_data_size = sizeof(ADXContext),
|
||||||
.init = adx_decode_init,
|
.init = adx_decode_init,
|
||||||
.decode = adx_decode_frame,
|
.decode = adx_decode_frame,
|
||||||
.flush = adx_decode_flush,
|
.flush = adx_decode_flush,
|
||||||
.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
|
.p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
|
||||||
AV_CODEC_CAP_DR1,
|
AV_CODEC_CAP_DR1,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
|
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -189,16 +189,16 @@ static int adx_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_adpcm_adx_encoder = {
|
const FFCodec ff_adpcm_adx_encoder = {
|
||||||
.name = "adpcm_adx",
|
.p.name = "adpcm_adx",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_ADPCM_ADX,
|
.p.id = AV_CODEC_ID_ADPCM_ADX,
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
|
||||||
.priv_data_size = sizeof(ADXContext),
|
.priv_data_size = sizeof(ADXContext),
|
||||||
.init = adx_encode_init,
|
.init = adx_encode_init,
|
||||||
.encode2 = adx_encode_frame,
|
.encode2 = adx_encode_frame,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16,
|
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -1286,17 +1286,17 @@ static av_cold int decode_close(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_agm_decoder = {
|
const FFCodec ff_agm_decoder = {
|
||||||
.name = "agm",
|
.p.name = "agm",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Amuse Graphics Movie"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Amuse Graphics Movie"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_AGM,
|
.p.id = AV_CODEC_ID_AGM,
|
||||||
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.priv_data_size = sizeof(AGMContext),
|
.priv_data_size = sizeof(AGMContext),
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
.close = decode_close,
|
.close = decode_close,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.flush = decode_flush,
|
.flush = decode_flush,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
|
||||||
FF_CODEC_CAP_INIT_CLEANUP |
|
FF_CODEC_CAP_INIT_CLEANUP |
|
||||||
FF_CODEC_CAP_EXPORTS_CROPPING,
|
FF_CODEC_CAP_EXPORTS_CROPPING,
|
||||||
|
@ -495,15 +495,15 @@ static av_cold int aic_decode_close(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_aic_decoder = {
|
const FFCodec ff_aic_decoder = {
|
||||||
.name = "aic",
|
.p.name = "aic",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Apple Intermediate Codec"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Apple Intermediate Codec"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_AIC,
|
.p.id = AV_CODEC_ID_AIC,
|
||||||
.priv_data_size = sizeof(AICContext),
|
.priv_data_size = sizeof(AICContext),
|
||||||
.init = aic_decode_init,
|
.init = aic_decode_init,
|
||||||
.close = aic_decode_close,
|
.close = aic_decode_close,
|
||||||
.decode = aic_decode_frame,
|
.decode = aic_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -611,16 +611,16 @@ static const AVClass alac_class = {
|
|||||||
.version = LIBAVUTIL_VERSION_INT,
|
.version = LIBAVUTIL_VERSION_INT,
|
||||||
};
|
};
|
||||||
|
|
||||||
const AVCodec ff_alac_decoder = {
|
const FFCodec ff_alac_decoder = {
|
||||||
.name = "alac",
|
.p.name = "alac",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_ALAC,
|
.p.id = AV_CODEC_ID_ALAC,
|
||||||
.priv_data_size = sizeof(ALACContext),
|
.priv_data_size = sizeof(ALACContext),
|
||||||
.init = alac_decode_init,
|
.init = alac_decode_init,
|
||||||
.close = alac_decode_close,
|
.close = alac_decode_close,
|
||||||
.decode = alac_decode_frame,
|
.decode = alac_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_CHANNEL_CONF,
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_CHANNEL_CONF,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
.priv_class = &alac_class
|
.p.priv_class = &alac_class
|
||||||
};
|
};
|
||||||
|
@ -649,22 +649,22 @@ static const AVClass alacenc_class = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
FF_DISABLE_DEPRECATION_WARNINGS
|
||||||
const AVCodec ff_alac_encoder = {
|
const FFCodec ff_alac_encoder = {
|
||||||
.name = "alac",
|
.p.name = "alac",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_ALAC,
|
.p.id = AV_CODEC_ID_ALAC,
|
||||||
.priv_data_size = sizeof(AlacEncodeContext),
|
.priv_data_size = sizeof(AlacEncodeContext),
|
||||||
.priv_class = &alacenc_class,
|
.p.priv_class = &alacenc_class,
|
||||||
.init = alac_encode_init,
|
.init = alac_encode_init,
|
||||||
.encode2 = alac_encode_frame,
|
.encode2 = alac_encode_frame,
|
||||||
.close = alac_encode_close,
|
.close = alac_encode_close,
|
||||||
.capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME,
|
.p.capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME,
|
||||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||||
.channel_layouts = alac_channel_layouts,
|
.p.channel_layouts = alac_channel_layouts,
|
||||||
#endif
|
#endif
|
||||||
.ch_layouts = ff_alac_ch_layouts,
|
.p.ch_layouts = ff_alac_ch_layouts,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32P,
|
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32P,
|
||||||
AV_SAMPLE_FMT_S16P,
|
AV_SAMPLE_FMT_S16P,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "bytestream.h"
|
#include "bytestream.h"
|
||||||
|
#include "codec_internal.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
||||||
#define ALIAS_HEADER_SIZE 10
|
#define ALIAS_HEADER_SIZE 10
|
||||||
@ -121,11 +122,11 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
|
|||||||
return avpkt->size;
|
return avpkt->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_alias_pix_decoder = {
|
const FFCodec ff_alias_pix_decoder = {
|
||||||
.name = "alias_pix",
|
.p.name = "alias_pix",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Alias/Wavefront PIX image"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Alias/Wavefront PIX image"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_ALIAS_PIX,
|
.p.id = AV_CODEC_ID_ALIAS_PIX,
|
||||||
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
|
||||||
};
|
};
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "bytestream.h"
|
#include "bytestream.h"
|
||||||
|
#include "codec_internal.h"
|
||||||
#include "encode.h"
|
#include "encode.h"
|
||||||
|
|
||||||
#define ALIAS_HEADER_SIZE 10
|
#define ALIAS_HEADER_SIZE 10
|
||||||
@ -100,13 +101,13 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_alias_pix_encoder = {
|
const FFCodec ff_alias_pix_encoder = {
|
||||||
.name = "alias_pix",
|
.p.name = "alias_pix",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Alias/Wavefront PIX image"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Alias/Wavefront PIX image"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_ALIAS_PIX,
|
.p.id = AV_CODEC_ID_ALIAS_PIX,
|
||||||
.encode2 = encode_frame,
|
.encode2 = encode_frame,
|
||||||
.pix_fmts = (const enum AVPixelFormat[]) {
|
.p.pix_fmts = (const enum AVPixelFormat[]) {
|
||||||
AV_PIX_FMT_BGR24, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE
|
AV_PIX_FMT_BGR24, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -2176,16 +2176,16 @@ static av_cold void flush(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const AVCodec ff_als_decoder = {
|
const FFCodec ff_als_decoder = {
|
||||||
.name = "als",
|
.p.name = "als",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 Audio Lossless Coding (ALS)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 Audio Lossless Coding (ALS)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_MP4ALS,
|
.p.id = AV_CODEC_ID_MP4ALS,
|
||||||
.priv_data_size = sizeof(ALSDecContext),
|
.priv_data_size = sizeof(ALSDecContext),
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
.close = decode_end,
|
.close = decode_end,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.flush = flush,
|
.flush = flush,
|
||||||
.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
|
.p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
@ -378,21 +378,21 @@ static const AVClass h264_amf_class = {
|
|||||||
.version = LIBAVUTIL_VERSION_INT,
|
.version = LIBAVUTIL_VERSION_INT,
|
||||||
};
|
};
|
||||||
|
|
||||||
const AVCodec ff_h264_amf_encoder = {
|
const FFCodec ff_h264_amf_encoder = {
|
||||||
.name = "h264_amf",
|
.p.name = "h264_amf",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("AMD AMF H.264 Encoder"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("AMD AMF H.264 Encoder"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_H264,
|
.p.id = AV_CODEC_ID_H264,
|
||||||
.init = amf_encode_init_h264,
|
.init = amf_encode_init_h264,
|
||||||
.receive_packet = ff_amf_receive_packet,
|
.receive_packet = ff_amf_receive_packet,
|
||||||
.close = ff_amf_encode_close,
|
.close = ff_amf_encode_close,
|
||||||
.priv_data_size = sizeof(AmfContext),
|
.priv_data_size = sizeof(AmfContext),
|
||||||
.priv_class = &h264_amf_class,
|
.p.priv_class = &h264_amf_class,
|
||||||
.defaults = defaults,
|
.defaults = defaults,
|
||||||
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
|
.p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
|
||||||
AV_CODEC_CAP_DR1,
|
AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
.pix_fmts = ff_amf_pix_fmts,
|
.p.pix_fmts = ff_amf_pix_fmts,
|
||||||
.wrapper_name = "amf",
|
.p.wrapper_name = "amf",
|
||||||
.hw_configs = ff_amfenc_hw_configs,
|
.hw_configs = ff_amfenc_hw_configs,
|
||||||
};
|
};
|
||||||
|
@ -310,21 +310,21 @@ static const AVClass hevc_amf_class = {
|
|||||||
.version = LIBAVUTIL_VERSION_INT,
|
.version = LIBAVUTIL_VERSION_INT,
|
||||||
};
|
};
|
||||||
|
|
||||||
const AVCodec ff_hevc_amf_encoder = {
|
const FFCodec ff_hevc_amf_encoder = {
|
||||||
.name = "hevc_amf",
|
.p.name = "hevc_amf",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("AMD AMF HEVC encoder"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("AMD AMF HEVC encoder"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_HEVC,
|
.p.id = AV_CODEC_ID_HEVC,
|
||||||
.init = amf_encode_init_hevc,
|
.init = amf_encode_init_hevc,
|
||||||
.receive_packet = ff_amf_receive_packet,
|
.receive_packet = ff_amf_receive_packet,
|
||||||
.close = ff_amf_encode_close,
|
.close = ff_amf_encode_close,
|
||||||
.priv_data_size = sizeof(AmfContext),
|
.priv_data_size = sizeof(AmfContext),
|
||||||
.priv_class = &hevc_amf_class,
|
.p.priv_class = &hevc_amf_class,
|
||||||
.defaults = defaults,
|
.defaults = defaults,
|
||||||
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
|
.p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE |
|
||||||
AV_CODEC_CAP_DR1,
|
AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
.pix_fmts = ff_amf_pix_fmts,
|
.p.pix_fmts = ff_amf_pix_fmts,
|
||||||
.wrapper_name = "amf",
|
.p.wrapper_name = "amf",
|
||||||
.hw_configs = ff_amfenc_hw_configs,
|
.hw_configs = ff_amfenc_hw_configs,
|
||||||
};
|
};
|
||||||
|
@ -1097,16 +1097,16 @@ static int amrnb_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const AVCodec ff_amrnb_decoder = {
|
const FFCodec ff_amrnb_decoder = {
|
||||||
.name = "amrnb",
|
.p.name = "amrnb",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("AMR-NB (Adaptive Multi-Rate NarrowBand)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("AMR-NB (Adaptive Multi-Rate NarrowBand)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_AMR_NB,
|
.p.id = AV_CODEC_ID_AMR_NB,
|
||||||
.priv_data_size = sizeof(AMRChannelsContext),
|
.priv_data_size = sizeof(AMRChannelsContext),
|
||||||
.init = amrnb_decode_init,
|
.init = amrnb_decode_init,
|
||||||
.decode = amrnb_decode_frame,
|
.decode = amrnb_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
|
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -1293,16 +1293,16 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
return avpkt->size;
|
return avpkt->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_amrwb_decoder = {
|
const FFCodec ff_amrwb_decoder = {
|
||||||
.name = "amrwb",
|
.p.name = "amrwb",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("AMR-WB (Adaptive Multi-Rate WideBand)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("AMR-WB (Adaptive Multi-Rate WideBand)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_AMR_WB,
|
.p.id = AV_CODEC_ID_AMR_WB,
|
||||||
.priv_data_size = sizeof(AMRWBChannelsContext),
|
.priv_data_size = sizeof(AMRWBChannelsContext),
|
||||||
.init = amrwb_decode_init,
|
.init = amrwb_decode_init,
|
||||||
.decode = amrwb_decode_frame,
|
.decode = amrwb_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
|
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -190,15 +190,15 @@ static av_cold int decode_end(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_anm_decoder = {
|
const FFCodec ff_anm_decoder = {
|
||||||
.name = "anm",
|
.p.name = "anm",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Deluxe Paint Animation"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Deluxe Paint Animation"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_ANM,
|
.p.id = AV_CODEC_ID_ANM,
|
||||||
.priv_data_size = sizeof(AnmContext),
|
.priv_data_size = sizeof(AnmContext),
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
.close = decode_end,
|
.close = decode_end,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -481,16 +481,16 @@ static const AVCodecDefault ansi_defaults[] = {
|
|||||||
{ NULL },
|
{ NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
const AVCodec ff_ansi_decoder = {
|
const FFCodec ff_ansi_decoder = {
|
||||||
.name = "ansi",
|
.p.name = "ansi",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ASCII/ANSI art"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("ASCII/ANSI art"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_ANSI,
|
.p.id = AV_CODEC_ID_ANSI,
|
||||||
.priv_data_size = sizeof(AnsiContext),
|
.priv_data_size = sizeof(AnsiContext),
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
.close = decode_close,
|
.close = decode_close,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
.defaults = ansi_defaults,
|
.defaults = ansi_defaults,
|
||||||
};
|
};
|
||||||
|
@ -1659,22 +1659,22 @@ static const AVClass ape_decoder_class = {
|
|||||||
.version = LIBAVUTIL_VERSION_INT,
|
.version = LIBAVUTIL_VERSION_INT,
|
||||||
};
|
};
|
||||||
|
|
||||||
const AVCodec ff_ape_decoder = {
|
const FFCodec ff_ape_decoder = {
|
||||||
.name = "ape",
|
.p.name = "ape",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Monkey's Audio"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Monkey's Audio"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_APE,
|
.p.id = AV_CODEC_ID_APE,
|
||||||
.priv_data_size = sizeof(APEContext),
|
.priv_data_size = sizeof(APEContext),
|
||||||
.init = ape_decode_init,
|
.init = ape_decode_init,
|
||||||
.close = ape_decode_close,
|
.close = ape_decode_close,
|
||||||
.decode = ape_decode_frame,
|
.decode = ape_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY |
|
.p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY |
|
||||||
AV_CODEC_CAP_DR1,
|
AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
.flush = ape_flush,
|
.flush = ape_flush,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
|
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
|
||||||
AV_SAMPLE_FMT_S16P,
|
AV_SAMPLE_FMT_S16P,
|
||||||
AV_SAMPLE_FMT_S32P,
|
AV_SAMPLE_FMT_S32P,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.priv_class = &ape_decoder_class,
|
.p.priv_class = &ape_decoder_class,
|
||||||
};
|
};
|
||||||
|
@ -175,41 +175,41 @@ static int aptx_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_APTX_DECODER
|
#if CONFIG_APTX_DECODER
|
||||||
const AVCodec ff_aptx_decoder = {
|
const FFCodec ff_aptx_decoder = {
|
||||||
.name = "aptx",
|
.p.name = "aptx",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("aptX (Audio Processing Technology for Bluetooth)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("aptX (Audio Processing Technology for Bluetooth)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_APTX,
|
.p.id = AV_CODEC_ID_APTX,
|
||||||
.priv_data_size = sizeof(AptXContext),
|
.priv_data_size = sizeof(AptXContext),
|
||||||
.init = ff_aptx_init,
|
.init = ff_aptx_init,
|
||||||
.decode = aptx_decode_frame,
|
.decode = aptx_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||||
.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
|
.p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
|
||||||
#endif
|
#endif
|
||||||
.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
|
.p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
|
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_APTX_HD_DECODER
|
#if CONFIG_APTX_HD_DECODER
|
||||||
const AVCodec ff_aptx_hd_decoder = {
|
const FFCodec ff_aptx_hd_decoder = {
|
||||||
.name = "aptx_hd",
|
.p.name = "aptx_hd",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("aptX HD (Audio Processing Technology for Bluetooth)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("aptX HD (Audio Processing Technology for Bluetooth)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_APTX_HD,
|
.p.id = AV_CODEC_ID_APTX_HD,
|
||||||
.priv_data_size = sizeof(AptXContext),
|
.priv_data_size = sizeof(AptXContext),
|
||||||
.init = ff_aptx_init,
|
.init = ff_aptx_init,
|
||||||
.decode = aptx_decode_frame,
|
.decode = aptx_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||||
.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
|
.p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
|
||||||
#endif
|
#endif
|
||||||
.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
|
.p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
|
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -245,45 +245,45 @@ static av_cold int aptx_close(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_APTX_ENCODER
|
#if CONFIG_APTX_ENCODER
|
||||||
const AVCodec ff_aptx_encoder = {
|
const FFCodec ff_aptx_encoder = {
|
||||||
.name = "aptx",
|
.p.name = "aptx",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("aptX (Audio Processing Technology for Bluetooth)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("aptX (Audio Processing Technology for Bluetooth)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_APTX,
|
.p.id = AV_CODEC_ID_APTX,
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
|
||||||
.priv_data_size = sizeof(AptXContext),
|
.priv_data_size = sizeof(AptXContext),
|
||||||
.init = ff_aptx_init,
|
.init = ff_aptx_init,
|
||||||
.encode2 = aptx_encode_frame,
|
.encode2 = aptx_encode_frame,
|
||||||
.close = aptx_close,
|
.close = aptx_close,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||||
.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
|
.p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
|
||||||
#endif
|
#endif
|
||||||
.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
|
.p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
|
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.supported_samplerates = (const int[]) {8000, 16000, 24000, 32000, 44100, 48000, 0},
|
.p.supported_samplerates = (const int[]) {8000, 16000, 24000, 32000, 44100, 48000, 0},
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_APTX_HD_ENCODER
|
#if CONFIG_APTX_HD_ENCODER
|
||||||
const AVCodec ff_aptx_hd_encoder = {
|
const FFCodec ff_aptx_hd_encoder = {
|
||||||
.name = "aptx_hd",
|
.p.name = "aptx_hd",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("aptX HD (Audio Processing Technology for Bluetooth)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("aptX HD (Audio Processing Technology for Bluetooth)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_APTX_HD,
|
.p.id = AV_CODEC_ID_APTX_HD,
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
|
||||||
.priv_data_size = sizeof(AptXContext),
|
.priv_data_size = sizeof(AptXContext),
|
||||||
.init = ff_aptx_init,
|
.init = ff_aptx_init,
|
||||||
.encode2 = aptx_encode_frame,
|
.encode2 = aptx_encode_frame,
|
||||||
.close = aptx_close,
|
.close = aptx_close,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||||
.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
|
.p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_STEREO, 0},
|
||||||
#endif
|
#endif
|
||||||
.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
|
.p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_STEREO, { 0 } },
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
|
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S32P,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.supported_samplerates = (const int[]) {8000, 16000, 24000, 32000, 44100, 48000, 0},
|
.p.supported_samplerates = (const int[]) {8000, 16000, 24000, 32000, 44100, 48000, 0},
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -212,16 +212,16 @@ static av_cold int decode_close(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_arbc_decoder = {
|
const FFCodec ff_arbc_decoder = {
|
||||||
.name = "arbc",
|
.p.name = "arbc",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Gryphon's Anim Compressor"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Gryphon's Anim Compressor"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_ARBC,
|
.p.id = AV_CODEC_ID_ARBC,
|
||||||
.priv_data_size = sizeof(ARBCContext),
|
.priv_data_size = sizeof(ARBCContext),
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.flush = decode_flush,
|
.flush = decode_flush,
|
||||||
.close = decode_close,
|
.close = decode_close,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
@ -733,16 +733,16 @@ static av_cold int decode_close(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_argo_decoder = {
|
const FFCodec ff_argo_decoder = {
|
||||||
.name = "argo",
|
.p.name = "argo",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Argonaut Games Video"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Argonaut Games Video"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_ARGO,
|
.p.id = AV_CODEC_ID_ARGO,
|
||||||
.priv_data_size = sizeof(ArgoContext),
|
.priv_data_size = sizeof(ArgoContext),
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.flush = decode_flush,
|
.flush = decode_flush,
|
||||||
.close = decode_close,
|
.close = decode_close,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
@ -64,11 +64,11 @@ static int ass_decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_SSA_DECODER
|
#if CONFIG_SSA_DECODER
|
||||||
const AVCodec ff_ssa_decoder = {
|
const FFCodec ff_ssa_decoder = {
|
||||||
.name = "ssa",
|
.p.name = "ssa",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) subtitle"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) subtitle"),
|
||||||
.type = AVMEDIA_TYPE_SUBTITLE,
|
.p.type = AVMEDIA_TYPE_SUBTITLE,
|
||||||
.id = AV_CODEC_ID_ASS,
|
.p.id = AV_CODEC_ID_ASS,
|
||||||
.init = ass_decode_init,
|
.init = ass_decode_init,
|
||||||
.decode = ass_decode_frame,
|
.decode = ass_decode_frame,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
@ -76,11 +76,11 @@ const AVCodec ff_ssa_decoder = {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_ASS_DECODER
|
#if CONFIG_ASS_DECODER
|
||||||
const AVCodec ff_ass_decoder = {
|
const FFCodec ff_ass_decoder = {
|
||||||
.name = "ass",
|
.p.name = "ass",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) subtitle"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) subtitle"),
|
||||||
.type = AVMEDIA_TYPE_SUBTITLE,
|
.p.type = AVMEDIA_TYPE_SUBTITLE,
|
||||||
.id = AV_CODEC_ID_ASS,
|
.p.id = AV_CODEC_ID_ASS,
|
||||||
.init = ass_decode_init,
|
.init = ass_decode_init,
|
||||||
.decode = ass_decode_frame,
|
.decode = ass_decode_frame,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
|
@ -69,11 +69,11 @@ static int ass_encode_frame(AVCodecContext *avctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_SSA_ENCODER
|
#if CONFIG_SSA_ENCODER
|
||||||
const AVCodec ff_ssa_encoder = {
|
const FFCodec ff_ssa_encoder = {
|
||||||
.name = "ssa",
|
.p.name = "ssa",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) subtitle"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) subtitle"),
|
||||||
.type = AVMEDIA_TYPE_SUBTITLE,
|
.p.type = AVMEDIA_TYPE_SUBTITLE,
|
||||||
.id = AV_CODEC_ID_ASS,
|
.p.id = AV_CODEC_ID_ASS,
|
||||||
.init = ass_encode_init,
|
.init = ass_encode_init,
|
||||||
.encode_sub = ass_encode_frame,
|
.encode_sub = ass_encode_frame,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
@ -81,11 +81,11 @@ const AVCodec ff_ssa_encoder = {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_ASS_ENCODER
|
#if CONFIG_ASS_ENCODER
|
||||||
const AVCodec ff_ass_encoder = {
|
const FFCodec ff_ass_encoder = {
|
||||||
.name = "ass",
|
.p.name = "ass",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) subtitle"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SubStation Alpha) subtitle"),
|
||||||
.type = AVMEDIA_TYPE_SUBTITLE,
|
.p.type = AVMEDIA_TYPE_SUBTITLE,
|
||||||
.id = AV_CODEC_ID_ASS,
|
.p.id = AV_CODEC_ID_ASS,
|
||||||
.init = ass_encode_init,
|
.init = ass_encode_init,
|
||||||
.encode_sub = ass_encode_frame,
|
.encode_sub = ass_encode_frame,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
|
@ -329,30 +329,30 @@ static av_cold int decode_end(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_ASV1_DECODER
|
#if CONFIG_ASV1_DECODER
|
||||||
const AVCodec ff_asv1_decoder = {
|
const FFCodec ff_asv1_decoder = {
|
||||||
.name = "asv1",
|
.p.name = "asv1",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ASUS V1"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("ASUS V1"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_ASV1,
|
.p.id = AV_CODEC_ID_ASV1,
|
||||||
.priv_data_size = sizeof(ASV1Context),
|
.priv_data_size = sizeof(ASV1Context),
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
.close = decode_end,
|
.close = decode_end,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_ASV2_DECODER
|
#if CONFIG_ASV2_DECODER
|
||||||
const AVCodec ff_asv2_decoder = {
|
const FFCodec ff_asv2_decoder = {
|
||||||
.name = "asv2",
|
.p.name = "asv2",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ASUS V2"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("ASUS V2"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_ASV2,
|
.p.id = AV_CODEC_ID_ASV2,
|
||||||
.priv_data_size = sizeof(ASV1Context),
|
.priv_data_size = sizeof(ASV1Context),
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -343,30 +343,30 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_ASV1_ENCODER
|
#if CONFIG_ASV1_ENCODER
|
||||||
const AVCodec ff_asv1_encoder = {
|
const FFCodec ff_asv1_encoder = {
|
||||||
.name = "asv1",
|
.p.name = "asv1",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ASUS V1"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("ASUS V1"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_ASV1,
|
.p.id = AV_CODEC_ID_ASV1,
|
||||||
.priv_data_size = sizeof(ASV1Context),
|
.priv_data_size = sizeof(ASV1Context),
|
||||||
.init = encode_init,
|
.init = encode_init,
|
||||||
.encode2 = encode_frame,
|
.encode2 = encode_frame,
|
||||||
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
|
.p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
|
||||||
AV_PIX_FMT_NONE },
|
AV_PIX_FMT_NONE },
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_ASV2_ENCODER
|
#if CONFIG_ASV2_ENCODER
|
||||||
const AVCodec ff_asv2_encoder = {
|
const FFCodec ff_asv2_encoder = {
|
||||||
.name = "asv2",
|
.p.name = "asv2",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ASUS V2"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("ASUS V2"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_ASV2,
|
.p.id = AV_CODEC_ID_ASV2,
|
||||||
.priv_data_size = sizeof(ASV1Context),
|
.priv_data_size = sizeof(ASV1Context),
|
||||||
.init = encode_init,
|
.init = encode_init,
|
||||||
.encode2 = encode_frame,
|
.encode2 = encode_frame,
|
||||||
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
|
.p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
|
||||||
AV_PIX_FMT_NONE },
|
AV_PIX_FMT_NONE },
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -385,17 +385,17 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const AVCodec ff_atrac1_decoder = {
|
const FFCodec ff_atrac1_decoder = {
|
||||||
.name = "atrac1",
|
.p.name = "atrac1",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ATRAC1 (Adaptive TRansform Acoustic Coding)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("ATRAC1 (Adaptive TRansform Acoustic Coding)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_ATRAC1,
|
.p.id = AV_CODEC_ID_ATRAC1,
|
||||||
.priv_data_size = sizeof(AT1Ctx),
|
.priv_data_size = sizeof(AT1Ctx),
|
||||||
.init = atrac1_decode_init,
|
.init = atrac1_decode_init,
|
||||||
.close = atrac1_decode_end,
|
.close = atrac1_decode_end,
|
||||||
.decode = atrac1_decode_frame,
|
.decode = atrac1_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
|
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
@ -1017,32 +1017,32 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_atrac3_decoder = {
|
const FFCodec ff_atrac3_decoder = {
|
||||||
.name = "atrac3",
|
.p.name = "atrac3",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ATRAC3 (Adaptive TRansform Acoustic Coding 3)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("ATRAC3 (Adaptive TRansform Acoustic Coding 3)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_ATRAC3,
|
.p.id = AV_CODEC_ID_ATRAC3,
|
||||||
.priv_data_size = sizeof(ATRAC3Context),
|
.priv_data_size = sizeof(ATRAC3Context),
|
||||||
.init = atrac3_decode_init,
|
.init = atrac3_decode_init,
|
||||||
.close = atrac3_decode_close,
|
.close = atrac3_decode_close,
|
||||||
.decode = atrac3_decode_frame,
|
.decode = atrac3_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
|
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
|
||||||
const AVCodec ff_atrac3al_decoder = {
|
const FFCodec ff_atrac3al_decoder = {
|
||||||
.name = "atrac3al",
|
.p.name = "atrac3al",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ATRAC3 AL (Adaptive TRansform Acoustic Coding 3 Advanced Lossless)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("ATRAC3 AL (Adaptive TRansform Acoustic Coding 3 Advanced Lossless)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_ATRAC3AL,
|
.p.id = AV_CODEC_ID_ATRAC3AL,
|
||||||
.priv_data_size = sizeof(ATRAC3Context),
|
.priv_data_size = sizeof(ATRAC3Context),
|
||||||
.init = atrac3_decode_init,
|
.init = atrac3_decode_init,
|
||||||
.close = atrac3_decode_close,
|
.close = atrac3_decode_close,
|
||||||
.decode = atrac3al_decode_frame,
|
.decode = atrac3al_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
|
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
@ -391,12 +391,12 @@ static int atrac3p_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
return avctx->codec_id == AV_CODEC_ID_ATRAC3P ? FFMIN(avctx->block_align, avpkt->size) : avpkt->size;
|
return avctx->codec_id == AV_CODEC_ID_ATRAC3P ? FFMIN(avctx->block_align, avpkt->size) : avpkt->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_atrac3p_decoder = {
|
const FFCodec ff_atrac3p_decoder = {
|
||||||
.name = "atrac3plus",
|
.p.name = "atrac3plus",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ATRAC3+ (Adaptive TRansform Acoustic Coding 3+)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("ATRAC3+ (Adaptive TRansform Acoustic Coding 3+)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_ATRAC3P,
|
.p.id = AV_CODEC_ID_ATRAC3P,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
.priv_data_size = sizeof(ATRAC3PContext),
|
.priv_data_size = sizeof(ATRAC3PContext),
|
||||||
.init = atrac3p_decode_init,
|
.init = atrac3p_decode_init,
|
||||||
@ -404,12 +404,12 @@ const AVCodec ff_atrac3p_decoder = {
|
|||||||
.decode = atrac3p_decode_frame,
|
.decode = atrac3p_decode_frame,
|
||||||
};
|
};
|
||||||
|
|
||||||
const AVCodec ff_atrac3pal_decoder = {
|
const FFCodec ff_atrac3pal_decoder = {
|
||||||
.name = "atrac3plusal",
|
.p.name = "atrac3plusal",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ATRAC3+ AL (Adaptive TRansform Acoustic Coding 3+ Advanced Lossless)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("ATRAC3+ AL (Adaptive TRansform Acoustic Coding 3+ Advanced Lossless)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_ATRAC3PAL,
|
.p.id = AV_CODEC_ID_ATRAC3PAL,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
.priv_data_size = sizeof(ATRAC3PContext),
|
.priv_data_size = sizeof(ATRAC3PContext),
|
||||||
.init = atrac3p_decode_init,
|
.init = atrac3p_decode_init,
|
||||||
|
@ -988,16 +988,16 @@ static av_cold int atrac9_decode_init(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_atrac9_decoder = {
|
const FFCodec ff_atrac9_decoder = {
|
||||||
.name = "atrac9",
|
.p.name = "atrac9",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("ATRAC9 (Adaptive TRansform Acoustic Coding 9)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("ATRAC9 (Adaptive TRansform Acoustic Coding 9)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_ATRAC9,
|
.p.id = AV_CODEC_ID_ATRAC9,
|
||||||
.priv_data_size = sizeof(ATRAC9Context),
|
.priv_data_size = sizeof(ATRAC9Context),
|
||||||
.init = atrac9_decode_init,
|
.init = atrac9_decode_init,
|
||||||
.close = atrac9_decode_close,
|
.close = atrac9_decode_close,
|
||||||
.decode = atrac9_decode_frame,
|
.decode = atrac9_decode_frame,
|
||||||
.flush = atrac9_decode_flush,
|
.flush = atrac9_decode_flush,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
|
.p.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
|
||||||
};
|
};
|
||||||
|
@ -585,21 +585,21 @@ static av_cold int ffat_close_decoder(AVCodecContext *avctx)
|
|||||||
|
|
||||||
#define FFAT_DEC(NAME, ID, bsf_name) \
|
#define FFAT_DEC(NAME, ID, bsf_name) \
|
||||||
FFAT_DEC_CLASS(NAME) \
|
FFAT_DEC_CLASS(NAME) \
|
||||||
const AVCodec ff_##NAME##_at_decoder = { \
|
const FFCodec ff_##NAME##_at_decoder = { \
|
||||||
.name = #NAME "_at", \
|
.p.name = #NAME "_at", \
|
||||||
.long_name = NULL_IF_CONFIG_SMALL(#NAME " (AudioToolbox)"), \
|
.p.long_name = NULL_IF_CONFIG_SMALL(#NAME " (AudioToolbox)"), \
|
||||||
.type = AVMEDIA_TYPE_AUDIO, \
|
.p.type = AVMEDIA_TYPE_AUDIO, \
|
||||||
.id = ID, \
|
.p.id = ID, \
|
||||||
.priv_data_size = sizeof(ATDecodeContext), \
|
.priv_data_size = sizeof(ATDecodeContext), \
|
||||||
.init = ffat_init_decoder, \
|
.init = ffat_init_decoder, \
|
||||||
.close = ffat_close_decoder, \
|
.close = ffat_close_decoder, \
|
||||||
.decode = ffat_decode, \
|
.decode = ffat_decode, \
|
||||||
.flush = ffat_decode_flush, \
|
.flush = ffat_decode_flush, \
|
||||||
.priv_class = &ffat_##NAME##_dec_class, \
|
.p.priv_class = &ffat_##NAME##_dec_class, \
|
||||||
.bsfs = bsf_name, \
|
.bsfs = bsf_name, \
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_CHANNEL_CONF, \
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_CHANNEL_CONF, \
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, \
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, \
|
||||||
.wrapper_name = "at", \
|
.p.wrapper_name = "at", \
|
||||||
};
|
};
|
||||||
|
|
||||||
FFAT_DEC(aac, AV_CODEC_ID_AAC, "aac_adtstoasc")
|
FFAT_DEC(aac, AV_CODEC_ID_AAC, "aac_adtstoasc")
|
||||||
|
@ -613,28 +613,28 @@ static const AVOption options[] = {
|
|||||||
|
|
||||||
#define FFAT_ENC(NAME, ID, PROFILES, CAPS, CHANNEL_LAYOUTS, CH_LAYOUTS) \
|
#define FFAT_ENC(NAME, ID, PROFILES, CAPS, CHANNEL_LAYOUTS, CH_LAYOUTS) \
|
||||||
FFAT_ENC_CLASS(NAME) \
|
FFAT_ENC_CLASS(NAME) \
|
||||||
const AVCodec ff_##NAME##_at_encoder = { \
|
const FFCodec ff_##NAME##_at_encoder = { \
|
||||||
.name = #NAME "_at", \
|
.p.name = #NAME "_at", \
|
||||||
.long_name = NULL_IF_CONFIG_SMALL(#NAME " (AudioToolbox)"), \
|
.p.long_name = NULL_IF_CONFIG_SMALL(#NAME " (AudioToolbox)"), \
|
||||||
.type = AVMEDIA_TYPE_AUDIO, \
|
.p.type = AVMEDIA_TYPE_AUDIO, \
|
||||||
.id = ID, \
|
.p.id = ID, \
|
||||||
.priv_data_size = sizeof(ATDecodeContext), \
|
.priv_data_size = sizeof(ATDecodeContext), \
|
||||||
.init = ffat_init_encoder, \
|
.init = ffat_init_encoder, \
|
||||||
.close = ffat_close_encoder, \
|
.close = ffat_close_encoder, \
|
||||||
.encode2 = ffat_encode, \
|
.encode2 = ffat_encode, \
|
||||||
.flush = ffat_encode_flush, \
|
.flush = ffat_encode_flush, \
|
||||||
.priv_class = &ffat_##NAME##_enc_class, \
|
.p.priv_class = &ffat_##NAME##_enc_class, \
|
||||||
.capabilities = AV_CODEC_CAP_DELAY | \
|
.p.capabilities = AV_CODEC_CAP_DELAY | \
|
||||||
AV_CODEC_CAP_ENCODER_FLUSH CAPS, \
|
AV_CODEC_CAP_ENCODER_FLUSH CAPS, \
|
||||||
.channel_layouts= CHANNEL_LAYOUTS, \
|
.p.channel_layouts = CHANNEL_LAYOUTS, \
|
||||||
.ch_layouts = CH_LAYOUTS, \
|
.p.ch_layouts = CH_LAYOUTS, \
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) { \
|
.p.sample_fmts = (const enum AVSampleFormat[]) { \
|
||||||
AV_SAMPLE_FMT_S16, \
|
AV_SAMPLE_FMT_S16, \
|
||||||
AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_NONE \
|
AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_NONE \
|
||||||
}, \
|
}, \
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, \
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, \
|
||||||
.profiles = PROFILES, \
|
.p.profiles = PROFILES, \
|
||||||
.wrapper_name = "at", \
|
.p.wrapper_name = "at", \
|
||||||
};
|
};
|
||||||
|
|
||||||
static const AVChannelLayout aac_at_ch_layouts[] = {
|
static const AVChannelLayout aac_at_ch_layouts[] = {
|
||||||
|
@ -98,13 +98,13 @@ static int aura_decode_frame(AVCodecContext *avctx,
|
|||||||
return pkt->size;
|
return pkt->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_aura2_decoder = {
|
const FFCodec ff_aura2_decoder = {
|
||||||
.name = "aura2",
|
.p.name = "aura2",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Auravision Aura 2"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Auravision Aura 2"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_AURA2,
|
.p.id = AV_CODEC_ID_AURA2,
|
||||||
.init = aura_decode_init,
|
.init = aura_decode_init,
|
||||||
.decode = aura_decode_frame,
|
.decode = aura_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -1238,22 +1238,22 @@ static const AVClass av1_class = {
|
|||||||
.version = LIBAVUTIL_VERSION_INT,
|
.version = LIBAVUTIL_VERSION_INT,
|
||||||
};
|
};
|
||||||
|
|
||||||
const AVCodec ff_av1_decoder = {
|
const FFCodec ff_av1_decoder = {
|
||||||
.name = "av1",
|
.p.name = "av1",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Alliance for Open Media AV1"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Alliance for Open Media AV1"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_AV1,
|
.p.id = AV_CODEC_ID_AV1,
|
||||||
.priv_data_size = sizeof(AV1DecContext),
|
.priv_data_size = sizeof(AV1DecContext),
|
||||||
.init = av1_decode_init,
|
.init = av1_decode_init,
|
||||||
.close = av1_decode_free,
|
.close = av1_decode_free,
|
||||||
.decode = av1_decode_frame,
|
.decode = av1_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING,
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
|
||||||
FF_CODEC_CAP_INIT_CLEANUP |
|
FF_CODEC_CAP_INIT_CLEANUP |
|
||||||
FF_CODEC_CAP_SETS_PKT_DTS,
|
FF_CODEC_CAP_SETS_PKT_DTS,
|
||||||
.flush = av1_decode_flush,
|
.flush = av1_decode_flush,
|
||||||
.profiles = NULL_IF_CONFIG_SMALL(ff_av1_profiles),
|
.p.profiles = NULL_IF_CONFIG_SMALL(ff_av1_profiles),
|
||||||
.priv_class = &av1_class,
|
.p.priv_class = &av1_class,
|
||||||
.bsfs = "av1_frame_split",
|
.bsfs = "av1_frame_split",
|
||||||
.hw_configs = (const AVCodecHWConfigInternal *const []) {
|
.hw_configs = (const AVCodecHWConfigInternal *const []) {
|
||||||
#if CONFIG_AV1_DXVA2_HWACCEL
|
#if CONFIG_AV1_DXVA2_HWACCEL
|
||||||
|
@ -94,13 +94,13 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2,
|
|||||||
|
|
||||||
static AVMutex codec_mutex = AV_MUTEX_INITIALIZER;
|
static AVMutex codec_mutex = AV_MUTEX_INITIALIZER;
|
||||||
|
|
||||||
static void lock_avcodec(const AVCodec *codec)
|
static void lock_avcodec(const FFCodec *codec)
|
||||||
{
|
{
|
||||||
if (!(codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE) && codec->init)
|
if (!(codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE) && codec->init)
|
||||||
ff_mutex_lock(&codec_mutex);
|
ff_mutex_lock(&codec_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void unlock_avcodec(const AVCodec *codec)
|
static void unlock_avcodec(const FFCodec *codec)
|
||||||
{
|
{
|
||||||
if (!(codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE) && codec->init)
|
if (!(codec->caps_internal & FF_CODEC_CAP_INIT_THREADSAFE) && codec->init)
|
||||||
ff_mutex_unlock(&codec_mutex);
|
ff_mutex_unlock(&codec_mutex);
|
||||||
@ -140,6 +140,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
|
|||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
AVCodecInternal *avci;
|
AVCodecInternal *avci;
|
||||||
|
const FFCodec *codec2;
|
||||||
|
|
||||||
if (avcodec_is_open(avctx))
|
if (avcodec_is_open(avctx))
|
||||||
return 0;
|
return 0;
|
||||||
@ -155,6 +156,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
|
|||||||
}
|
}
|
||||||
if (!codec)
|
if (!codec)
|
||||||
codec = avctx->codec;
|
codec = avctx->codec;
|
||||||
|
codec2 = ffcodec(codec);
|
||||||
|
|
||||||
if ((avctx->codec_type == AVMEDIA_TYPE_UNKNOWN || avctx->codec_type == codec->type) &&
|
if ((avctx->codec_type == AVMEDIA_TYPE_UNKNOWN || avctx->codec_type == codec->type) &&
|
||||||
avctx->codec_id == AV_CODEC_ID_NONE) {
|
avctx->codec_id == AV_CODEC_ID_NONE) {
|
||||||
@ -194,9 +196,9 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
|
|||||||
|
|
||||||
avci->skip_samples_multiplier = 1;
|
avci->skip_samples_multiplier = 1;
|
||||||
|
|
||||||
if (codec->priv_data_size > 0) {
|
if (codec2->priv_data_size > 0) {
|
||||||
if (!avctx->priv_data) {
|
if (!avctx->priv_data) {
|
||||||
avctx->priv_data = av_mallocz(codec->priv_data_size);
|
avctx->priv_data = av_mallocz(codec2->priv_data_size);
|
||||||
if (!avctx->priv_data) {
|
if (!avctx->priv_data) {
|
||||||
ret = AVERROR(ENOMEM);
|
ret = AVERROR(ENOMEM);
|
||||||
goto free_and_end;
|
goto free_and_end;
|
||||||
@ -327,25 +329,25 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||||||
|
|
||||||
if (HAVE_THREADS
|
if (HAVE_THREADS
|
||||||
&& !(avci->frame_thread_encoder && (avctx->active_thread_type&FF_THREAD_FRAME))) {
|
&& !(avci->frame_thread_encoder && (avctx->active_thread_type&FF_THREAD_FRAME))) {
|
||||||
/* Frame-threaded decoders call AVCodec.init for their child contexts. */
|
/* Frame-threaded decoders call FFCodec.init for their child contexts. */
|
||||||
lock_avcodec(codec);
|
lock_avcodec(codec2);
|
||||||
ret = ff_thread_init(avctx);
|
ret = ff_thread_init(avctx);
|
||||||
unlock_avcodec(codec);
|
unlock_avcodec(codec2);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
goto free_and_end;
|
goto free_and_end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!HAVE_THREADS && !(codec->caps_internal & FF_CODEC_CAP_AUTO_THREADS))
|
if (!HAVE_THREADS && !(codec2->caps_internal & FF_CODEC_CAP_AUTO_THREADS))
|
||||||
avctx->thread_count = 1;
|
avctx->thread_count = 1;
|
||||||
|
|
||||||
if (!(avctx->active_thread_type & FF_THREAD_FRAME) ||
|
if (!(avctx->active_thread_type & FF_THREAD_FRAME) ||
|
||||||
avci->frame_thread_encoder) {
|
avci->frame_thread_encoder) {
|
||||||
if (avctx->codec->init) {
|
if (codec2->init) {
|
||||||
lock_avcodec(codec);
|
lock_avcodec(codec2);
|
||||||
ret = avctx->codec->init(avctx);
|
ret = codec2->init(avctx);
|
||||||
unlock_avcodec(codec);
|
unlock_avcodec(codec2);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
avci->needs_close = avctx->codec->caps_internal & FF_CODEC_CAP_INIT_CLEANUP;
|
avci->needs_close = codec2->caps_internal & FF_CODEC_CAP_INIT_CLEANUP;
|
||||||
goto free_and_end;
|
goto free_and_end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -439,8 +441,8 @@ void avcodec_flush_buffers(AVCodecContext *avctx)
|
|||||||
|
|
||||||
if (HAVE_THREADS && avctx->active_thread_type & FF_THREAD_FRAME)
|
if (HAVE_THREADS && avctx->active_thread_type & FF_THREAD_FRAME)
|
||||||
ff_thread_flush(avctx);
|
ff_thread_flush(avctx);
|
||||||
else if (avctx->codec->flush)
|
else if (ffcodec(avctx->codec)->flush)
|
||||||
avctx->codec->flush(avctx);
|
ffcodec(avctx->codec)->flush(avctx);
|
||||||
|
|
||||||
avctx->pts_correction_last_pts =
|
avctx->pts_correction_last_pts =
|
||||||
avctx->pts_correction_last_dts = INT64_MIN;
|
avctx->pts_correction_last_dts = INT64_MIN;
|
||||||
@ -484,8 +486,8 @@ av_cold int avcodec_close(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
if (HAVE_THREADS && avci->thread_ctx)
|
if (HAVE_THREADS && avci->thread_ctx)
|
||||||
ff_thread_free(avctx);
|
ff_thread_free(avctx);
|
||||||
if (avci->needs_close && avctx->codec->close)
|
if (avci->needs_close && ffcodec(avctx->codec)->close)
|
||||||
avctx->codec->close(avctx);
|
ffcodec(avctx->codec)->close(avctx);
|
||||||
avci->byte_buffer_size = 0;
|
avci->byte_buffer_size = 0;
|
||||||
av_freep(&avci->byte_buffer);
|
av_freep(&avci->byte_buffer);
|
||||||
av_frame_free(&avci->buffer_frame);
|
av_frame_free(&avci->buffer_frame);
|
||||||
|
@ -90,14 +90,14 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
return buf_size;
|
return buf_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_avrn_decoder = {
|
const FFCodec ff_avrn_decoder = {
|
||||||
.name = "avrn",
|
.p.name = "avrn",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Avid AVI Codec"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Avid AVI Codec"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_AVRN,
|
.p.id = AV_CODEC_ID_AVRN,
|
||||||
.priv_data_size = sizeof(AVRnContext),
|
.priv_data_size = sizeof(AVRnContext),
|
||||||
.init = init,
|
.init = init,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
@ -177,15 +177,15 @@ static av_cold int avs_decode_end(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const AVCodec ff_avs_decoder = {
|
const FFCodec ff_avs_decoder = {
|
||||||
.name = "avs",
|
.p.name = "avs",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("AVS (Audio Video Standard) video"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("AVS (Audio Video Standard) video"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_AVS,
|
.p.id = AV_CODEC_ID_AVS,
|
||||||
.priv_data_size = sizeof(AvsContext),
|
.priv_data_size = sizeof(AvsContext),
|
||||||
.init = avs_decode_init,
|
.init = avs_decode_init,
|
||||||
.decode = avs_decode_frame,
|
.decode = avs_decode_frame,
|
||||||
.close = avs_decode_end,
|
.close = avs_decode_end,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -120,13 +120,13 @@ static int avui_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
return avpkt->size;
|
return avpkt->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_avui_decoder = {
|
const FFCodec ff_avui_decoder = {
|
||||||
.name = "avui",
|
.p.name = "avui",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Avid Meridien Uncompressed"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Avid Meridien Uncompressed"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_AVUI,
|
.p.id = AV_CODEC_ID_AVUI,
|
||||||
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.init = avui_decode_init,
|
.init = avui_decode_init,
|
||||||
.decode = avui_decode_frame,
|
.decode = avui_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -91,14 +91,14 @@ static int avui_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_avui_encoder = {
|
const FFCodec ff_avui_encoder = {
|
||||||
.name = "avui",
|
.p.name = "avui",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Avid Meridien Uncompressed"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Avid Meridien Uncompressed"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_AVUI,
|
.p.id = AV_CODEC_ID_AVUI,
|
||||||
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_EXPERIMENTAL,
|
||||||
|
.p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_UYVY422, AV_PIX_FMT_NONE },
|
||||||
.init = avui_encode_init,
|
.init = avui_encode_init,
|
||||||
.encode2 = avui_encode_frame,
|
.encode2 = avui_encode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_EXPERIMENTAL,
|
|
||||||
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_UYVY422, AV_PIX_FMT_NONE },
|
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -159,15 +159,15 @@ static av_cold int bethsoftvid_decode_end(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_bethsoftvid_decoder = {
|
const FFCodec ff_bethsoftvid_decoder = {
|
||||||
.name = "bethsoftvid",
|
.p.name = "bethsoftvid",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Bethesda VID video"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Bethesda VID video"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_BETHSOFTVID,
|
.p.id = AV_CODEC_ID_BETHSOFTVID,
|
||||||
.priv_data_size = sizeof(BethsoftvidContext),
|
.priv_data_size = sizeof(BethsoftvidContext),
|
||||||
.init = bethsoftvid_decode_init,
|
.init = bethsoftvid_decode_init,
|
||||||
.close = bethsoftvid_decode_end,
|
.close = bethsoftvid_decode_end,
|
||||||
.decode = bethsoftvid_decode_frame,
|
.decode = bethsoftvid_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -176,15 +176,15 @@ static av_cold int bfi_decode_close(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_bfi_decoder = {
|
const FFCodec ff_bfi_decoder = {
|
||||||
.name = "bfi",
|
.p.name = "bfi",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Brute Force & Ignorance"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Brute Force & Ignorance"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_BFI,
|
.p.id = AV_CODEC_ID_BFI,
|
||||||
.priv_data_size = sizeof(BFIContext),
|
.priv_data_size = sizeof(BFIContext),
|
||||||
.init = bfi_decode_init,
|
.init = bfi_decode_init,
|
||||||
.close = bfi_decode_close,
|
.close = bfi_decode_close,
|
||||||
.decode = bfi_decode_frame,
|
.decode = bfi_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -1419,16 +1419,16 @@ static void flush(AVCodecContext *avctx)
|
|||||||
c->frame_num = 0;
|
c->frame_num = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_bink_decoder = {
|
const FFCodec ff_bink_decoder = {
|
||||||
.name = "binkvideo",
|
.p.name = "binkvideo",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Bink video"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Bink video"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_BINKVIDEO,
|
.p.id = AV_CODEC_ID_BINKVIDEO,
|
||||||
.priv_data_size = sizeof(BinkContext),
|
.priv_data_size = sizeof(BinkContext),
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
.close = decode_end,
|
.close = decode_end,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.flush = flush,
|
.flush = flush,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
@ -346,30 +346,30 @@ static void decode_flush(AVCodecContext *avctx)
|
|||||||
s->first = 1;
|
s->first = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_binkaudio_rdft_decoder = {
|
const FFCodec ff_binkaudio_rdft_decoder = {
|
||||||
.name = "binkaudio_rdft",
|
.p.name = "binkaudio_rdft",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Bink Audio (RDFT)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Bink Audio (RDFT)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_BINKAUDIO_RDFT,
|
.p.id = AV_CODEC_ID_BINKAUDIO_RDFT,
|
||||||
.priv_data_size = sizeof(BinkAudioContext),
|
.priv_data_size = sizeof(BinkAudioContext),
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
.flush = decode_flush,
|
.flush = decode_flush,
|
||||||
.close = decode_end,
|
.close = decode_end,
|
||||||
.receive_frame = binkaudio_receive_frame,
|
.receive_frame = binkaudio_receive_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
|
||||||
const AVCodec ff_binkaudio_dct_decoder = {
|
const FFCodec ff_binkaudio_dct_decoder = {
|
||||||
.name = "binkaudio_dct",
|
.p.name = "binkaudio_dct",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Bink Audio (DCT)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Bink Audio (DCT)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_BINKAUDIO_DCT,
|
.p.id = AV_CODEC_ID_BINKAUDIO_DCT,
|
||||||
.priv_data_size = sizeof(BinkAudioContext),
|
.priv_data_size = sizeof(BinkAudioContext),
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
.flush = decode_flush,
|
.flush = decode_flush,
|
||||||
.close = decode_end,
|
.close = decode_end,
|
||||||
.receive_frame = binkaudio_receive_frame,
|
.receive_frame = binkaudio_receive_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
@ -218,41 +218,41 @@ static int decode_frame(AVCodecContext *avctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_BINTEXT_DECODER
|
#if CONFIG_BINTEXT_DECODER
|
||||||
const AVCodec ff_bintext_decoder = {
|
const FFCodec ff_bintext_decoder = {
|
||||||
.name = "bintext",
|
.p.name = "bintext",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Binary text"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Binary text"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_BINTEXT,
|
.p.id = AV_CODEC_ID_BINTEXT,
|
||||||
.priv_data_size = sizeof(XbinContext),
|
.priv_data_size = sizeof(XbinContext),
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_XBIN_DECODER
|
#if CONFIG_XBIN_DECODER
|
||||||
const AVCodec ff_xbin_decoder = {
|
const FFCodec ff_xbin_decoder = {
|
||||||
.name = "xbin",
|
.p.name = "xbin",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("eXtended BINary text"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("eXtended BINary text"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_XBIN,
|
.p.id = AV_CODEC_ID_XBIN,
|
||||||
.priv_data_size = sizeof(XbinContext),
|
.priv_data_size = sizeof(XbinContext),
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_IDF_DECODER
|
#if CONFIG_IDF_DECODER
|
||||||
const AVCodec ff_idf_decoder = {
|
const FFCodec ff_idf_decoder = {
|
||||||
.name = "idf",
|
.p.name = "idf",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("iCEDraw text"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("iCEDraw text"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_IDF,
|
.p.id = AV_CODEC_ID_IDF,
|
||||||
.priv_data_size = sizeof(XbinContext),
|
.priv_data_size = sizeof(XbinContext),
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -142,15 +142,15 @@ static int bitpacked_decode(AVCodecContext *avctx, void *data, int *got_frame,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_bitpacked_decoder = {
|
const FFCodec ff_bitpacked_decoder = {
|
||||||
.name = "bitpacked",
|
.p.name = "bitpacked",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Bitpacked"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Bitpacked"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_BITPACKED,
|
.p.id = AV_CODEC_ID_BITPACKED,
|
||||||
|
.p.capabilities = AV_CODEC_CAP_FRAME_THREADS,
|
||||||
.priv_data_size = sizeof(struct BitpackedContext),
|
.priv_data_size = sizeof(struct BitpackedContext),
|
||||||
.init = bitpacked_init_decoder,
|
.init = bitpacked_init_decoder,
|
||||||
.decode = bitpacked_decode,
|
.decode = bitpacked_decode,
|
||||||
.capabilities = AV_CODEC_CAP_FRAME_THREADS,
|
|
||||||
.codec_tags = (const uint32_t []){
|
.codec_tags = (const uint32_t []){
|
||||||
MKTAG('U', 'Y', 'V', 'Y'),
|
MKTAG('U', 'Y', 'V', 'Y'),
|
||||||
FF_CODEC_TAGS_END,
|
FF_CODEC_TAGS_END,
|
||||||
|
@ -104,16 +104,16 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_bitpacked_encoder = {
|
const FFCodec ff_bitpacked_encoder = {
|
||||||
.name = "bitpacked",
|
.p.name = "bitpacked",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Bitpacked"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Bitpacked"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_BITPACKED,
|
.p.id = AV_CODEC_ID_BITPACKED,
|
||||||
.priv_data_size = sizeof(struct BitpackedContext),
|
.priv_data_size = sizeof(struct BitpackedContext),
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
|
||||||
.init = encode_init,
|
.init = encode_init,
|
||||||
.encode2 = encode_frame,
|
.encode2 = encode_frame,
|
||||||
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV422P10,
|
.p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV422P10,
|
||||||
AV_PIX_FMT_NONE },
|
AV_PIX_FMT_NONE },
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "bytestream.h"
|
#include "bytestream.h"
|
||||||
#include "bmp.h"
|
#include "bmp.h"
|
||||||
|
#include "codec_internal.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "msrledec.h"
|
#include "msrledec.h"
|
||||||
|
|
||||||
@ -365,11 +366,11 @@ static int bmp_decode_frame(AVCodecContext *avctx,
|
|||||||
return buf_size;
|
return buf_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_bmp_decoder = {
|
const FFCodec ff_bmp_decoder = {
|
||||||
.name = "bmp",
|
.p.name = "bmp",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("BMP (Windows and OS/2 bitmap)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("BMP (Windows and OS/2 bitmap)"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_BMP,
|
.p.id = AV_CODEC_ID_BMP,
|
||||||
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.decode = bmp_decode_frame,
|
.decode = bmp_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
|
||||||
};
|
};
|
||||||
|
@ -155,15 +155,15 @@ static int bmp_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_bmp_encoder = {
|
const FFCodec ff_bmp_encoder = {
|
||||||
.name = "bmp",
|
.p.name = "bmp",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("BMP (Windows and OS/2 bitmap)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("BMP (Windows and OS/2 bitmap)"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_BMP,
|
.p.id = AV_CODEC_ID_BMP,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.init = bmp_encode_init,
|
.init = bmp_encode_init,
|
||||||
.encode2 = bmp_encode_frame,
|
.encode2 = bmp_encode_frame,
|
||||||
.pix_fmts = (const enum AVPixelFormat[]){
|
.p.pix_fmts = (const enum AVPixelFormat[]){
|
||||||
AV_PIX_FMT_BGRA, AV_PIX_FMT_BGR24,
|
AV_PIX_FMT_BGRA, AV_PIX_FMT_BGR24,
|
||||||
AV_PIX_FMT_RGB565, AV_PIX_FMT_RGB555, AV_PIX_FMT_RGB444,
|
AV_PIX_FMT_RGB565, AV_PIX_FMT_RGB555, AV_PIX_FMT_RGB444,
|
||||||
AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, AV_PIX_FMT_RGB4_BYTE, AV_PIX_FMT_BGR4_BYTE, AV_PIX_FMT_GRAY8, AV_PIX_FMT_PAL8,
|
AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, AV_PIX_FMT_RGB4_BYTE, AV_PIX_FMT_BGR4_BYTE, AV_PIX_FMT_GRAY8, AV_PIX_FMT_PAL8,
|
||||||
|
@ -79,13 +79,13 @@ static int bmv_aud_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
return buf_size;
|
return buf_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_bmv_audio_decoder = {
|
const FFCodec ff_bmv_audio_decoder = {
|
||||||
.name = "bmv_audio",
|
.p.name = "bmv_audio",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Discworld II BMV audio"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Discworld II BMV audio"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_BMV_AUDIO,
|
.p.id = AV_CODEC_ID_BMV_AUDIO,
|
||||||
.init = bmv_aud_decode_init,
|
.init = bmv_aud_decode_init,
|
||||||
.decode = bmv_aud_decode_frame,
|
.decode = bmv_aud_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -286,14 +286,14 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_bmv_video_decoder = {
|
const FFCodec ff_bmv_video_decoder = {
|
||||||
.name = "bmv_video",
|
.p.name = "bmv_video",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Discworld II BMV video"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Discworld II BMV video"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_BMV_VIDEO,
|
.p.id = AV_CODEC_ID_BMV_VIDEO,
|
||||||
.priv_data_size = sizeof(BMVDecContext),
|
.priv_data_size = sizeof(BMVDecContext),
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "bytestream.h"
|
#include "bytestream.h"
|
||||||
|
#include "codec_internal.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
||||||
#define HEADER1_CHUNK 0x03
|
#define HEADER1_CHUNK 0x03
|
||||||
@ -285,11 +286,11 @@ static int pix_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
|
|||||||
return avpkt->size;
|
return avpkt->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_brender_pix_decoder = {
|
const FFCodec ff_brender_pix_decoder = {
|
||||||
.name = "brender_pix",
|
.p.name = "brender_pix",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("BRender PIX image"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("BRender PIX image"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_BRENDER_PIX,
|
.p.id = AV_CODEC_ID_BRENDER_PIX,
|
||||||
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.decode = pix_decode_frame,
|
.decode = pix_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
|
||||||
};
|
};
|
||||||
|
@ -258,15 +258,15 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
return buf_size;
|
return buf_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_c93_decoder = {
|
const FFCodec ff_c93_decoder = {
|
||||||
.name = "c93",
|
.p.name = "c93",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Interplay C93"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Interplay C93"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_C93,
|
.p.id = AV_CODEC_ID_C93,
|
||||||
.priv_data_size = sizeof(C93DecoderContext),
|
.priv_data_size = sizeof(C93DecoderContext),
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
.close = decode_end,
|
.close = decode_end,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
@ -1309,16 +1309,16 @@ static int cavs_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_cavs_decoder = {
|
const FFCodec ff_cavs_decoder = {
|
||||||
.name = "cavs",
|
.p.name = "cavs",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Chinese AVS (Audio Video Standard) (AVS1-P2, JiZhun profile)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Chinese AVS (Audio Video Standard) (AVS1-P2, JiZhun profile)"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_CAVS,
|
.p.id = AV_CODEC_ID_CAVS,
|
||||||
.priv_data_size = sizeof(AVSContext),
|
.priv_data_size = sizeof(AVSContext),
|
||||||
.init = ff_cavs_init,
|
.init = ff_cavs_init,
|
||||||
.close = ff_cavs_end,
|
.close = ff_cavs_end,
|
||||||
.decode = cavs_decode_frame,
|
.decode = cavs_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
|
||||||
.flush = cavs_flush,
|
.flush = cavs_flush,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
@ -944,17 +944,17 @@ static const AVClass ccaption_dec_class = {
|
|||||||
.version = LIBAVUTIL_VERSION_INT,
|
.version = LIBAVUTIL_VERSION_INT,
|
||||||
};
|
};
|
||||||
|
|
||||||
const AVCodec ff_ccaption_decoder = {
|
const FFCodec ff_ccaption_decoder = {
|
||||||
.name = "cc_dec",
|
.p.name = "cc_dec",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Closed Caption (EIA-608 / CEA-708)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Closed Caption (EIA-608 / CEA-708)"),
|
||||||
.type = AVMEDIA_TYPE_SUBTITLE,
|
.p.type = AVMEDIA_TYPE_SUBTITLE,
|
||||||
.id = AV_CODEC_ID_EIA_608,
|
.p.id = AV_CODEC_ID_EIA_608,
|
||||||
|
.p.priv_class = &ccaption_dec_class,
|
||||||
|
.p.capabilities = AV_CODEC_CAP_DELAY,
|
||||||
.priv_data_size = sizeof(CCaptionSubContext),
|
.priv_data_size = sizeof(CCaptionSubContext),
|
||||||
.init = init_decoder,
|
.init = init_decoder,
|
||||||
.close = close_decoder,
|
.close = close_decoder,
|
||||||
.flush = flush_decoder,
|
.flush = flush_decoder,
|
||||||
.decode = decode,
|
.decode = decode,
|
||||||
.priv_class = &ccaption_dec_class,
|
|
||||||
.capabilities = AV_CODEC_CAP_DELAY,
|
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -388,16 +388,16 @@ static av_cold int cdg_decode_end(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_cdgraphics_decoder = {
|
const FFCodec ff_cdgraphics_decoder = {
|
||||||
.name = "cdgraphics",
|
.p.name = "cdgraphics",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("CD Graphics video"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("CD Graphics video"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_CDGRAPHICS,
|
.p.id = AV_CODEC_ID_CDGRAPHICS,
|
||||||
.priv_data_size = sizeof(CDGraphicsContext),
|
.priv_data_size = sizeof(CDGraphicsContext),
|
||||||
.init = cdg_decode_init,
|
.init = cdg_decode_init,
|
||||||
.close = cdg_decode_end,
|
.close = cdg_decode_end,
|
||||||
.decode = cdg_decode_frame,
|
.decode = cdg_decode_frame,
|
||||||
.flush = cdg_decode_flush,
|
.flush = cdg_decode_flush,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -443,16 +443,16 @@ static av_cold int cdtoons_decode_end(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_cdtoons_decoder = {
|
const FFCodec ff_cdtoons_decoder = {
|
||||||
.name = "cdtoons",
|
.p.name = "cdtoons",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("CDToons video"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("CDToons video"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_CDTOONS,
|
.p.id = AV_CODEC_ID_CDTOONS,
|
||||||
.priv_data_size = sizeof(CDToonsContext),
|
.priv_data_size = sizeof(CDToonsContext),
|
||||||
.init = cdtoons_decode_init,
|
.init = cdtoons_decode_init,
|
||||||
.close = cdtoons_decode_end,
|
.close = cdtoons_decode_end,
|
||||||
.decode = cdtoons_decode_frame,
|
.decode = cdtoons_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.flush = cdtoons_flush,
|
.flush = cdtoons_flush,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -337,15 +337,15 @@ static av_cold int cdxl_decode_end(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_cdxl_decoder = {
|
const FFCodec ff_cdxl_decoder = {
|
||||||
.name = "cdxl",
|
.p.name = "cdxl",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Commodore CDXL video"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Commodore CDXL video"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_CDXL,
|
.p.id = AV_CODEC_ID_CDXL,
|
||||||
.priv_data_size = sizeof(CDXLVideoContext),
|
.priv_data_size = sizeof(CDXLVideoContext),
|
||||||
.init = cdxl_decode_init,
|
.init = cdxl_decode_init,
|
||||||
.close = cdxl_decode_end,
|
.close = cdxl_decode_end,
|
||||||
.decode = cdxl_decode_frame,
|
.decode = cdxl_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -1456,16 +1456,16 @@ static int update_thread_context(AVCodecContext *dst, const AVCodecContext *src)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const AVCodec ff_cfhd_decoder = {
|
const FFCodec ff_cfhd_decoder = {
|
||||||
.name = "cfhd",
|
.p.name = "cfhd",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("GoPro CineForm HD"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("GoPro CineForm HD"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_CFHD,
|
.p.id = AV_CODEC_ID_CFHD,
|
||||||
.priv_data_size = sizeof(CFHDContext),
|
.priv_data_size = sizeof(CFHDContext),
|
||||||
.init = cfhd_init,
|
.init = cfhd_init,
|
||||||
.close = cfhd_close,
|
.close = cfhd_close,
|
||||||
.decode = cfhd_decode,
|
.decode = cfhd_decode,
|
||||||
.update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context),
|
.update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context),
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
@ -845,18 +845,18 @@ static const AVClass cfhd_class = {
|
|||||||
.version = LIBAVUTIL_VERSION_INT,
|
.version = LIBAVUTIL_VERSION_INT,
|
||||||
};
|
};
|
||||||
|
|
||||||
const AVCodec ff_cfhd_encoder = {
|
const FFCodec ff_cfhd_encoder = {
|
||||||
.name = "cfhd",
|
.p.name = "cfhd",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("GoPro CineForm HD"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("GoPro CineForm HD"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_CFHD,
|
.p.id = AV_CODEC_ID_CFHD,
|
||||||
.priv_data_size = sizeof(CFHDEncContext),
|
.priv_data_size = sizeof(CFHDEncContext),
|
||||||
.priv_class = &cfhd_class,
|
.p.priv_class = &cfhd_class,
|
||||||
.init = cfhd_encode_init,
|
.init = cfhd_encode_init,
|
||||||
.close = cfhd_encode_close,
|
.close = cfhd_encode_close,
|
||||||
.encode2 = cfhd_encode_frame,
|
.encode2 = cfhd_encode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_FRAME_THREADS,
|
.p.capabilities = AV_CODEC_CAP_FRAME_THREADS,
|
||||||
.pix_fmts = (const enum AVPixelFormat[]) {
|
.p.pix_fmts = (const enum AVPixelFormat[]) {
|
||||||
AV_PIX_FMT_YUV422P10,
|
AV_PIX_FMT_YUV422P10,
|
||||||
AV_PIX_FMT_GBRP12,
|
AV_PIX_FMT_GBRP12,
|
||||||
AV_PIX_FMT_GBRAP12,
|
AV_PIX_FMT_GBRAP12,
|
||||||
|
@ -507,15 +507,15 @@ static av_cold int cinepak_decode_end(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_cinepak_decoder = {
|
const FFCodec ff_cinepak_decoder = {
|
||||||
.name = "cinepak",
|
.p.name = "cinepak",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Cinepak"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Cinepak"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_CINEPAK,
|
.p.id = AV_CODEC_ID_CINEPAK,
|
||||||
.priv_data_size = sizeof(CinepakContext),
|
.priv_data_size = sizeof(CinepakContext),
|
||||||
.init = cinepak_decode_init,
|
.init = cinepak_decode_init,
|
||||||
.close = cinepak_decode_end,
|
.close = cinepak_decode_end,
|
||||||
.decode = cinepak_decode_frame,
|
.decode = cinepak_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -1194,16 +1194,16 @@ static av_cold int cinepak_encode_end(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_cinepak_encoder = {
|
const FFCodec ff_cinepak_encoder = {
|
||||||
.name = "cinepak",
|
.p.name = "cinepak",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Cinepak"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Cinepak"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_CINEPAK,
|
.p.id = AV_CODEC_ID_CINEPAK,
|
||||||
.priv_data_size = sizeof(CinepakEncContext),
|
.priv_data_size = sizeof(CinepakEncContext),
|
||||||
.init = cinepak_encode_init,
|
.init = cinepak_encode_init,
|
||||||
.encode2 = cinepak_encode_frame,
|
.encode2 = cinepak_encode_frame,
|
||||||
.close = cinepak_encode_end,
|
.close = cinepak_encode_end,
|
||||||
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_RGB24, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE },
|
.p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_RGB24, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE },
|
||||||
.priv_class = &cinepak_class,
|
.p.priv_class = &cinepak_class,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
@ -767,15 +767,15 @@ static av_cold int clv_decode_end(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_clearvideo_decoder = {
|
const FFCodec ff_clearvideo_decoder = {
|
||||||
.name = "clearvideo",
|
.p.name = "clearvideo",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Iterated Systems ClearVideo"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Iterated Systems ClearVideo"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_CLEARVIDEO,
|
.p.id = AV_CODEC_ID_CLEARVIDEO,
|
||||||
.priv_data_size = sizeof(CLVContext),
|
.priv_data_size = sizeof(CLVContext),
|
||||||
.init = clv_decode_init,
|
.init = clv_decode_init,
|
||||||
.close = clv_decode_end,
|
.close = clv_decode_end,
|
||||||
.decode = clv_decode_frame,
|
.decode = clv_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
@ -83,14 +83,14 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_cljr_decoder = {
|
const FFCodec ff_cljr_decoder = {
|
||||||
.name = "cljr",
|
.p.name = "cljr",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_CLJR,
|
.p.id = AV_CODEC_ID_CLJR,
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "libavutil/opt.h"
|
#include "libavutil/opt.h"
|
||||||
|
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
|
#include "codec_internal.h"
|
||||||
#include "encode.h"
|
#include "encode.h"
|
||||||
#include "put_bits.h"
|
#include "put_bits.h"
|
||||||
|
|
||||||
@ -107,15 +108,15 @@ static const AVClass cljr_class = {
|
|||||||
.version = LIBAVUTIL_VERSION_INT,
|
.version = LIBAVUTIL_VERSION_INT,
|
||||||
};
|
};
|
||||||
|
|
||||||
const AVCodec ff_cljr_encoder = {
|
const FFCodec ff_cljr_encoder = {
|
||||||
.name = "cljr",
|
.p.name = "cljr",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_CLJR,
|
.p.id = AV_CODEC_ID_CLJR,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.priv_data_size = sizeof(CLJRContext),
|
.priv_data_size = sizeof(CLJRContext),
|
||||||
.encode2 = encode_frame,
|
.encode2 = encode_frame,
|
||||||
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV411P,
|
.p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV411P,
|
||||||
AV_PIX_FMT_NONE },
|
AV_PIX_FMT_NONE },
|
||||||
.priv_class = &cljr_class,
|
.p.priv_class = &cljr_class,
|
||||||
};
|
};
|
||||||
|
@ -492,15 +492,15 @@ static av_cold int cllc_decode_init(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_cllc_decoder = {
|
const FFCodec ff_cllc_decoder = {
|
||||||
.name = "cllc",
|
.p.name = "cllc",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Canopus Lossless Codec"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Canopus Lossless Codec"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_CLLC,
|
.p.id = AV_CODEC_ID_CLLC,
|
||||||
.priv_data_size = sizeof(CLLCContext),
|
.priv_data_size = sizeof(CLLCContext),
|
||||||
.init = cllc_decode_init,
|
.init = cllc_decode_init,
|
||||||
.decode = cllc_decode_frame,
|
.decode = cllc_decode_frame,
|
||||||
.close = cllc_decode_close,
|
.close = cllc_decode_close,
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -163,19 +163,19 @@ static int cng_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
return buf_size;
|
return buf_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_comfortnoise_decoder = {
|
const FFCodec ff_comfortnoise_decoder = {
|
||||||
.name = "comfortnoise",
|
.p.name = "comfortnoise",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("RFC 3389 comfort noise generator"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("RFC 3389 comfort noise generator"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_COMFORT_NOISE,
|
.p.id = AV_CODEC_ID_COMFORT_NOISE,
|
||||||
.priv_data_size = sizeof(CNGContext),
|
.priv_data_size = sizeof(CNGContext),
|
||||||
.init = cng_decode_init,
|
.init = cng_decode_init,
|
||||||
.decode = cng_decode_frame,
|
.decode = cng_decode_frame,
|
||||||
.flush = cng_decode_flush,
|
.flush = cng_decode_flush,
|
||||||
.close = cng_decode_close,
|
.close = cng_decode_close,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
|
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
|
||||||
FF_CODEC_CAP_INIT_CLEANUP,
|
FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
@ -96,18 +96,18 @@ static int cng_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_comfortnoise_encoder = {
|
const FFCodec ff_comfortnoise_encoder = {
|
||||||
.name = "comfortnoise",
|
.p.name = "comfortnoise",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("RFC 3389 comfort noise generator"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("RFC 3389 comfort noise generator"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_COMFORT_NOISE,
|
.p.id = AV_CODEC_ID_COMFORT_NOISE,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.priv_data_size = sizeof(CNGContext),
|
.priv_data_size = sizeof(CNGContext),
|
||||||
.init = cng_encode_init,
|
.init = cng_encode_init,
|
||||||
.encode2 = cng_encode_frame,
|
.encode2 = cng_encode_frame,
|
||||||
.close = cng_encode_close,
|
.close = cng_encode_close,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
|
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.ch_layouts = (const AVChannelLayout[]){ AV_CHANNEL_LAYOUT_MONO, { 0 } },
|
.p.ch_layouts = (const AVChannelLayout[]){ AV_CHANNEL_LAYOUT_MONO, { 0 } },
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
@ -190,12 +190,6 @@ typedef struct AVProfile {
|
|||||||
const char *name; ///< short name for the profile
|
const char *name; ///< short name for the profile
|
||||||
} AVProfile;
|
} AVProfile;
|
||||||
|
|
||||||
typedef struct AVCodecDefault AVCodecDefault;
|
|
||||||
|
|
||||||
struct AVCodecContext;
|
|
||||||
struct AVSubtitle;
|
|
||||||
struct AVPacket;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AVCodec.
|
* AVCodec.
|
||||||
*/
|
*/
|
||||||
@ -250,121 +244,6 @@ typedef struct AVCodec {
|
|||||||
* Array of supported channel layouts, terminated with a zeroed layout.
|
* Array of supported channel layouts, terminated with a zeroed layout.
|
||||||
*/
|
*/
|
||||||
const AVChannelLayout *ch_layouts;
|
const AVChannelLayout *ch_layouts;
|
||||||
|
|
||||||
/*****************************************************************
|
|
||||||
* No fields below this line are part of the public API. They
|
|
||||||
* may not be used outside of libavcodec and can be changed and
|
|
||||||
* removed at will.
|
|
||||||
* New public fields should be added right above.
|
|
||||||
*****************************************************************
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Internal codec capabilities.
|
|
||||||
* See FF_CODEC_CAP_* in internal.h
|
|
||||||
*/
|
|
||||||
int caps_internal;
|
|
||||||
|
|
||||||
int priv_data_size;
|
|
||||||
/**
|
|
||||||
* @name Frame-level threading support functions
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* Copy necessary context variables from a previous thread context to the current one.
|
|
||||||
* If not defined, the next thread will start automatically; otherwise, the codec
|
|
||||||
* must call ff_thread_finish_setup().
|
|
||||||
*
|
|
||||||
* dst and src will (rarely) point to the same context, in which case memcpy should be skipped.
|
|
||||||
*/
|
|
||||||
int (*update_thread_context)(struct AVCodecContext *dst, const struct AVCodecContext *src);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copy variables back to the user-facing context
|
|
||||||
*/
|
|
||||||
int (*update_thread_context_for_user)(struct AVCodecContext *dst, const struct AVCodecContext *src);
|
|
||||||
/** @} */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Private codec-specific defaults.
|
|
||||||
*/
|
|
||||||
const AVCodecDefault *defaults;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initialize codec static data, called from av_codec_iterate().
|
|
||||||
*
|
|
||||||
* This is not intended for time consuming operations as it is
|
|
||||||
* run for every codec regardless of that codec being used.
|
|
||||||
*/
|
|
||||||
void (*init_static_data)(struct AVCodec *codec);
|
|
||||||
|
|
||||||
int (*init)(struct AVCodecContext *);
|
|
||||||
int (*encode_sub)(struct AVCodecContext *, uint8_t *buf, int buf_size,
|
|
||||||
const struct AVSubtitle *sub);
|
|
||||||
/**
|
|
||||||
* Encode data to an AVPacket.
|
|
||||||
*
|
|
||||||
* @param avctx codec context
|
|
||||||
* @param avpkt output AVPacket
|
|
||||||
* @param[in] frame AVFrame containing the raw data to be encoded
|
|
||||||
* @param[out] got_packet_ptr encoder sets to 0 or 1 to indicate that a
|
|
||||||
* non-empty packet was returned in avpkt.
|
|
||||||
* @return 0 on success, negative error code on failure
|
|
||||||
*/
|
|
||||||
int (*encode2)(struct AVCodecContext *avctx, struct AVPacket *avpkt,
|
|
||||||
const struct AVFrame *frame, int *got_packet_ptr);
|
|
||||||
/**
|
|
||||||
* Decode picture or subtitle data.
|
|
||||||
*
|
|
||||||
* @param avctx codec context
|
|
||||||
* @param outdata codec type dependent output struct
|
|
||||||
* @param[out] got_frame_ptr decoder sets to 0 or 1 to indicate that a
|
|
||||||
* non-empty frame or subtitle was returned in
|
|
||||||
* outdata.
|
|
||||||
* @param[in] avpkt AVPacket containing the data to be decoded
|
|
||||||
* @return amount of bytes read from the packet on success, negative error
|
|
||||||
* code on failure
|
|
||||||
*/
|
|
||||||
int (*decode)(struct AVCodecContext *avctx, void *outdata,
|
|
||||||
int *got_frame_ptr, struct AVPacket *avpkt);
|
|
||||||
int (*close)(struct AVCodecContext *);
|
|
||||||
/**
|
|
||||||
* Encode API with decoupled frame/packet dataflow. This function is called
|
|
||||||
* to get one output packet. It should call ff_encode_get_frame() to obtain
|
|
||||||
* input data.
|
|
||||||
*/
|
|
||||||
int (*receive_packet)(struct AVCodecContext *avctx, struct AVPacket *avpkt);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Decode API with decoupled packet/frame dataflow. This function is called
|
|
||||||
* to get one output frame. It should call ff_decode_get_packet() to obtain
|
|
||||||
* input data.
|
|
||||||
*/
|
|
||||||
int (*receive_frame)(struct AVCodecContext *avctx, struct AVFrame *frame);
|
|
||||||
/**
|
|
||||||
* Flush buffers.
|
|
||||||
* Will be called when seeking
|
|
||||||
*/
|
|
||||||
void (*flush)(struct AVCodecContext *);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Decoding only, a comma-separated list of bitstream filters to apply to
|
|
||||||
* packets before decoding.
|
|
||||||
*/
|
|
||||||
const char *bsfs;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Array of pointers to hardware configurations supported by the codec,
|
|
||||||
* or NULL if no hardware supported. The array is terminated by a NULL
|
|
||||||
* pointer.
|
|
||||||
*
|
|
||||||
* The user can only access this field via avcodec_get_hw_config().
|
|
||||||
*/
|
|
||||||
const struct AVCodecHWConfigInternal *const *hw_configs;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* List of supported codec_tags, terminated by FF_CODEC_TAGS_END.
|
|
||||||
*/
|
|
||||||
const uint32_t *codec_tags;
|
|
||||||
} AVCodec;
|
} AVCodec;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -19,6 +19,11 @@
|
|||||||
#ifndef AVCODEC_CODEC_INTERNAL_H
|
#ifndef AVCODEC_CODEC_INTERNAL_H
|
||||||
#define AVCODEC_CODEC_INTERNAL_H
|
#define AVCODEC_CODEC_INTERNAL_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "libavutil/attributes.h"
|
||||||
|
#include "codec.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The codec does not modify any global variables in the init function,
|
* The codec does not modify any global variables in the init function,
|
||||||
* allowing to call the init function without locking any global mutexes.
|
* allowing to call the init function without locking any global mutexes.
|
||||||
@ -70,13 +75,136 @@
|
|||||||
#define FF_CODEC_CAP_SETS_FRAME_PROPS (1 << 8)
|
#define FF_CODEC_CAP_SETS_FRAME_PROPS (1 << 8)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AVCodec.codec_tags termination value
|
* FFCodec.codec_tags termination value
|
||||||
*/
|
*/
|
||||||
#define FF_CODEC_TAGS_END -1
|
#define FF_CODEC_TAGS_END -1
|
||||||
|
|
||||||
struct AVCodecDefault {
|
typedef struct AVCodecDefault {
|
||||||
const char *key;
|
const char *key;
|
||||||
const char *value;
|
const char *value;
|
||||||
};
|
} AVCodecDefault;
|
||||||
|
|
||||||
|
struct AVCodecContext;
|
||||||
|
struct AVSubtitle;
|
||||||
|
struct AVPacket;
|
||||||
|
|
||||||
|
typedef struct FFCodec {
|
||||||
|
/**
|
||||||
|
* The public AVCodec. See codec.h for it.
|
||||||
|
*/
|
||||||
|
AVCodec p;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Internal codec capabilities FF_CODEC_CAP_*.
|
||||||
|
*/
|
||||||
|
int caps_internal;
|
||||||
|
|
||||||
|
int priv_data_size;
|
||||||
|
/**
|
||||||
|
* @name Frame-level threading support functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Copy necessary context variables from a previous thread context to the current one.
|
||||||
|
* If not defined, the next thread will start automatically; otherwise, the codec
|
||||||
|
* must call ff_thread_finish_setup().
|
||||||
|
*
|
||||||
|
* dst and src will (rarely) point to the same context, in which case memcpy should be skipped.
|
||||||
|
*/
|
||||||
|
int (*update_thread_context)(struct AVCodecContext *dst, const struct AVCodecContext *src);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy variables back to the user-facing context
|
||||||
|
*/
|
||||||
|
int (*update_thread_context_for_user)(struct AVCodecContext *dst, const struct AVCodecContext *src);
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Private codec-specific defaults.
|
||||||
|
*/
|
||||||
|
const AVCodecDefault *defaults;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize codec static data, called from av_codec_iterate().
|
||||||
|
*
|
||||||
|
* This is not intended for time consuming operations as it is
|
||||||
|
* run for every codec regardless of that codec being used.
|
||||||
|
*/
|
||||||
|
void (*init_static_data)(struct FFCodec *codec);
|
||||||
|
|
||||||
|
int (*init)(struct AVCodecContext *);
|
||||||
|
int (*encode_sub)(struct AVCodecContext *, uint8_t *buf, int buf_size,
|
||||||
|
const struct AVSubtitle *sub);
|
||||||
|
/**
|
||||||
|
* Encode data to an AVPacket.
|
||||||
|
*
|
||||||
|
* @param avctx codec context
|
||||||
|
* @param avpkt output AVPacket
|
||||||
|
* @param[in] frame AVFrame containing the raw data to be encoded
|
||||||
|
* @param[out] got_packet_ptr encoder sets to 0 or 1 to indicate that a
|
||||||
|
* non-empty packet was returned in avpkt.
|
||||||
|
* @return 0 on success, negative error code on failure
|
||||||
|
*/
|
||||||
|
int (*encode2)(struct AVCodecContext *avctx, struct AVPacket *avpkt,
|
||||||
|
const struct AVFrame *frame, int *got_packet_ptr);
|
||||||
|
/**
|
||||||
|
* Decode picture or subtitle data.
|
||||||
|
*
|
||||||
|
* @param avctx codec context
|
||||||
|
* @param outdata codec type dependent output struct
|
||||||
|
* @param[out] got_frame_ptr decoder sets to 0 or 1 to indicate that a
|
||||||
|
* non-empty frame or subtitle was returned in
|
||||||
|
* outdata.
|
||||||
|
* @param[in] avpkt AVPacket containing the data to be decoded
|
||||||
|
* @return amount of bytes read from the packet on success, negative error
|
||||||
|
* code on failure
|
||||||
|
*/
|
||||||
|
int (*decode)(struct AVCodecContext *avctx, void *outdata,
|
||||||
|
int *got_frame_ptr, struct AVPacket *avpkt);
|
||||||
|
int (*close)(struct AVCodecContext *);
|
||||||
|
/**
|
||||||
|
* Encode API with decoupled frame/packet dataflow. This function is called
|
||||||
|
* to get one output packet. It should call ff_encode_get_frame() to obtain
|
||||||
|
* input data.
|
||||||
|
*/
|
||||||
|
int (*receive_packet)(struct AVCodecContext *avctx, struct AVPacket *avpkt);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decode API with decoupled packet/frame dataflow. This function is called
|
||||||
|
* to get one output frame. It should call ff_decode_get_packet() to obtain
|
||||||
|
* input data.
|
||||||
|
*/
|
||||||
|
int (*receive_frame)(struct AVCodecContext *avctx, struct AVFrame *frame);
|
||||||
|
/**
|
||||||
|
* Flush buffers.
|
||||||
|
* Will be called when seeking
|
||||||
|
*/
|
||||||
|
void (*flush)(struct AVCodecContext *);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decoding only, a comma-separated list of bitstream filters to apply to
|
||||||
|
* packets before decoding.
|
||||||
|
*/
|
||||||
|
const char *bsfs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Array of pointers to hardware configurations supported by the codec,
|
||||||
|
* or NULL if no hardware supported. The array is terminated by a NULL
|
||||||
|
* pointer.
|
||||||
|
*
|
||||||
|
* The user can only access this field via avcodec_get_hw_config().
|
||||||
|
*/
|
||||||
|
const struct AVCodecHWConfigInternal *const *hw_configs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of supported codec_tags, terminated by FF_CODEC_TAGS_END.
|
||||||
|
*/
|
||||||
|
const uint32_t *codec_tags;
|
||||||
|
} FFCodec;
|
||||||
|
|
||||||
|
static av_always_inline const FFCodec *ffcodec(const AVCodec *codec)
|
||||||
|
{
|
||||||
|
return (const FFCodec*)codec;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* AVCODEC_CODEC_INTERNAL_H */
|
#endif /* AVCODEC_CODEC_INTERNAL_H */
|
||||||
|
@ -1297,17 +1297,17 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_cook_decoder = {
|
const FFCodec ff_cook_decoder = {
|
||||||
.name = "cook",
|
.p.name = "cook",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Cook / Cooker / Gecko (RealAudio G2)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Cook / Cooker / Gecko (RealAudio G2)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_COOK,
|
.p.id = AV_CODEC_ID_COOK,
|
||||||
.priv_data_size = sizeof(COOKContext),
|
.priv_data_size = sizeof(COOKContext),
|
||||||
.init = cook_decode_init,
|
.init = cook_decode_init,
|
||||||
.close = cook_decode_close,
|
.close = cook_decode_close,
|
||||||
.decode = cook_decode_frame,
|
.decode = cook_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
|
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
@ -222,15 +222,15 @@ static av_cold int cpia_decode_end(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_cpia_decoder = {
|
const FFCodec ff_cpia_decoder = {
|
||||||
.name = "cpia",
|
.p.name = "cpia",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("CPiA video format"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("CPiA video format"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_CPIA,
|
.p.id = AV_CODEC_ID_CPIA,
|
||||||
.priv_data_size = sizeof(CpiaContext),
|
.priv_data_size = sizeof(CpiaContext),
|
||||||
.init = cpia_decode_init,
|
.init = cpia_decode_init,
|
||||||
.close = cpia_decode_end,
|
.close = cpia_decode_end,
|
||||||
.decode = cpia_decode_frame,
|
.decode = cpia_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -424,15 +424,15 @@ static av_cold int cri_decode_close(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_cri_decoder = {
|
const FFCodec ff_cri_decoder = {
|
||||||
.name = "cri",
|
.p.name = "cri",
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_CRI,
|
.p.id = AV_CODEC_ID_CRI,
|
||||||
.priv_data_size = sizeof(CRIContext),
|
.priv_data_size = sizeof(CRIContext),
|
||||||
.init = cri_decode_init,
|
.init = cri_decode_init,
|
||||||
.decode = cri_decode_frame,
|
.decode = cri_decode_frame,
|
||||||
.close = cri_decode_close,
|
.close = cri_decode_close,
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Cintel RAW"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Cintel RAW"),
|
||||||
};
|
};
|
||||||
|
@ -774,22 +774,22 @@ static int crystalhd_receive_frame(AVCodecContext *avctx, AVFrame *frame)
|
|||||||
.option = options, \
|
.option = options, \
|
||||||
.version = LIBAVUTIL_VERSION_INT, \
|
.version = LIBAVUTIL_VERSION_INT, \
|
||||||
}; \
|
}; \
|
||||||
const AVCodec ff_##x##_crystalhd_decoder = { \
|
const FFCodec ff_##x##_crystalhd_decoder = { \
|
||||||
.name = #x "_crystalhd", \
|
.p.name = #x "_crystalhd", \
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("CrystalHD " #X " decoder"), \
|
.p.long_name = NULL_IF_CONFIG_SMALL("CrystalHD " #X " decoder"), \
|
||||||
.type = AVMEDIA_TYPE_VIDEO, \
|
.p.type = AVMEDIA_TYPE_VIDEO, \
|
||||||
.id = AV_CODEC_ID_##X, \
|
.p.id = AV_CODEC_ID_##X, \
|
||||||
.priv_data_size = sizeof(CHDContext), \
|
.priv_data_size = sizeof(CHDContext), \
|
||||||
.priv_class = &x##_crystalhd_class, \
|
.p.priv_class = &x##_crystalhd_class, \
|
||||||
.init = init, \
|
.init = init, \
|
||||||
.close = uninit, \
|
.close = uninit, \
|
||||||
.receive_frame = crystalhd_receive_frame, \
|
.receive_frame = crystalhd_receive_frame, \
|
||||||
.flush = flush, \
|
.flush = flush, \
|
||||||
.bsfs = bsf_name, \
|
.bsfs = bsf_name, \
|
||||||
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HARDWARE, \
|
.p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HARDWARE, \
|
||||||
.caps_internal = FF_CODEC_CAP_SETS_FRAME_PROPS, \
|
.caps_internal = FF_CODEC_CAP_SETS_FRAME_PROPS, \
|
||||||
.pix_fmts = (const enum AVPixelFormat[]){AV_PIX_FMT_YUYV422, AV_PIX_FMT_NONE}, \
|
.p.pix_fmts = (const enum AVPixelFormat[]){AV_PIX_FMT_YUYV422, AV_PIX_FMT_NONE}, \
|
||||||
.wrapper_name = "crystalhd", \
|
.p.wrapper_name = "crystalhd", \
|
||||||
};
|
};
|
||||||
|
|
||||||
#if CONFIG_H264_CRYSTALHD_DECODER
|
#if CONFIG_H264_CRYSTALHD_DECODER
|
||||||
|
@ -167,15 +167,15 @@ static av_cold int decode_end(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_cscd_decoder = {
|
const FFCodec ff_cscd_decoder = {
|
||||||
.name = "camstudio",
|
.p.name = "camstudio",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("CamStudio"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("CamStudio"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_CSCD,
|
.p.id = AV_CODEC_ID_CSCD,
|
||||||
.priv_data_size = sizeof(CamStudioContext),
|
.priv_data_size = sizeof(CamStudioContext),
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
.close = decode_end,
|
.close = decode_end,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
@ -943,7 +943,7 @@ static av_cold int cuvid_decode_init(AVCodecContext *avctx)
|
|||||||
return AVERROR_BUG;
|
return AVERROR_BUG;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (avctx->codec->bsfs) {
|
if (ffcodec(avctx->codec)->bsfs) {
|
||||||
const AVCodecParameters *par = avctx->internal->bsf->par_out;
|
const AVCodecParameters *par = avctx->internal->bsf->par_out;
|
||||||
extradata = par->extradata;
|
extradata = par->extradata;
|
||||||
extradata_size = par->extradata_size;
|
extradata_size = par->extradata_size;
|
||||||
@ -1103,27 +1103,27 @@ static const AVCodecHWConfigInternal *const cuvid_hw_configs[] = {
|
|||||||
.option = options, \
|
.option = options, \
|
||||||
.version = LIBAVUTIL_VERSION_INT, \
|
.version = LIBAVUTIL_VERSION_INT, \
|
||||||
}; \
|
}; \
|
||||||
const AVCodec ff_##x##_cuvid_decoder = { \
|
const FFCodec ff_##x##_cuvid_decoder = { \
|
||||||
.name = #x "_cuvid", \
|
.p.name = #x "_cuvid", \
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Nvidia CUVID " #X " decoder"), \
|
.p.long_name = NULL_IF_CONFIG_SMALL("Nvidia CUVID " #X " decoder"), \
|
||||||
.type = AVMEDIA_TYPE_VIDEO, \
|
.p.type = AVMEDIA_TYPE_VIDEO, \
|
||||||
.id = AV_CODEC_ID_##X, \
|
.p.id = AV_CODEC_ID_##X, \
|
||||||
.priv_data_size = sizeof(CuvidContext), \
|
.priv_data_size = sizeof(CuvidContext), \
|
||||||
.priv_class = &x##_cuvid_class, \
|
.p.priv_class = &x##_cuvid_class, \
|
||||||
.init = cuvid_decode_init, \
|
.init = cuvid_decode_init, \
|
||||||
.close = cuvid_decode_end, \
|
.close = cuvid_decode_end, \
|
||||||
.receive_frame = cuvid_output_frame, \
|
.receive_frame = cuvid_output_frame, \
|
||||||
.flush = cuvid_flush, \
|
.flush = cuvid_flush, \
|
||||||
.bsfs = bsf_name, \
|
.bsfs = bsf_name, \
|
||||||
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HARDWARE, \
|
.p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HARDWARE, \
|
||||||
.caps_internal = FF_CODEC_CAP_SETS_FRAME_PROPS, \
|
.caps_internal = FF_CODEC_CAP_SETS_FRAME_PROPS, \
|
||||||
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_CUDA, \
|
.p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_CUDA, \
|
||||||
AV_PIX_FMT_NV12, \
|
AV_PIX_FMT_NV12, \
|
||||||
AV_PIX_FMT_P010, \
|
AV_PIX_FMT_P010, \
|
||||||
AV_PIX_FMT_P016, \
|
AV_PIX_FMT_P016, \
|
||||||
AV_PIX_FMT_NONE }, \
|
AV_PIX_FMT_NONE }, \
|
||||||
.hw_configs = cuvid_hw_configs, \
|
.hw_configs = cuvid_hw_configs, \
|
||||||
.wrapper_name = "cuvid", \
|
.p.wrapper_name = "cuvid", \
|
||||||
};
|
};
|
||||||
|
|
||||||
#if CONFIG_AV1_CUVID_DECODER && defined(CUVID_HAS_AV1_SUPPORT)
|
#if CONFIG_AV1_CUVID_DECODER && defined(CUVID_HAS_AV1_SUPPORT)
|
||||||
|
@ -179,29 +179,29 @@ static int cyuv_decode_frame(AVCodecContext *avctx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_AURA_DECODER
|
#if CONFIG_AURA_DECODER
|
||||||
const AVCodec ff_aura_decoder = {
|
const FFCodec ff_aura_decoder = {
|
||||||
.name = "aura",
|
.p.name = "aura",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Auravision AURA"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Auravision AURA"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_AURA,
|
.p.id = AV_CODEC_ID_AURA,
|
||||||
.priv_data_size = sizeof(CyuvDecodeContext),
|
.priv_data_size = sizeof(CyuvDecodeContext),
|
||||||
.init = cyuv_decode_init,
|
.init = cyuv_decode_init,
|
||||||
.decode = cyuv_decode_frame,
|
.decode = cyuv_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CONFIG_CYUV_DECODER
|
#if CONFIG_CYUV_DECODER
|
||||||
const AVCodec ff_cyuv_decoder = {
|
const FFCodec ff_cyuv_decoder = {
|
||||||
.name = "cyuv",
|
.p.name = "cyuv",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Creative YUV (CYUV)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Creative YUV (CYUV)"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_CYUV,
|
.p.id = AV_CODEC_ID_CYUV,
|
||||||
.priv_data_size = sizeof(CyuvDecodeContext),
|
.priv_data_size = sizeof(CyuvDecodeContext),
|
||||||
.init = cyuv_decode_init,
|
.init = cyuv_decode_init,
|
||||||
.decode = cyuv_decode_frame,
|
.decode = cyuv_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -411,20 +411,20 @@ static const AVClass dcadec_class = {
|
|||||||
.category = AV_CLASS_CATEGORY_DECODER,
|
.category = AV_CLASS_CATEGORY_DECODER,
|
||||||
};
|
};
|
||||||
|
|
||||||
const AVCodec ff_dca_decoder = {
|
const FFCodec ff_dca_decoder = {
|
||||||
.name = "dca",
|
.p.name = "dca",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("DCA (DTS Coherent Acoustics)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("DCA (DTS Coherent Acoustics)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_DTS,
|
.p.id = AV_CODEC_ID_DTS,
|
||||||
.priv_data_size = sizeof(DCAContext),
|
.priv_data_size = sizeof(DCAContext),
|
||||||
.init = dcadec_init,
|
.init = dcadec_init,
|
||||||
.decode = dcadec_decode_frame,
|
.decode = dcadec_decode_frame,
|
||||||
.close = dcadec_close,
|
.close = dcadec_close,
|
||||||
.flush = dcadec_flush,
|
.flush = dcadec_flush,
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_S32P,
|
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_S32P,
|
||||||
AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE },
|
||||||
.priv_class = &dcadec_class,
|
.p.priv_class = &dcadec_class,
|
||||||
.profiles = NULL_IF_CONFIG_SMALL(ff_dca_profiles),
|
.p.profiles = NULL_IF_CONFIG_SMALL(ff_dca_profiles),
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
};
|
};
|
||||||
|
@ -1240,29 +1240,29 @@ static const AVCodecDefault defaults[] = {
|
|||||||
{ NULL },
|
{ NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
const AVCodec ff_dca_encoder = {
|
const FFCodec ff_dca_encoder = {
|
||||||
.name = "dca",
|
.p.name = "dca",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("DCA (DTS Coherent Acoustics)"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("DCA (DTS Coherent Acoustics)"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_DTS,
|
.p.id = AV_CODEC_ID_DTS,
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_EXPERIMENTAL,
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_EXPERIMENTAL,
|
||||||
.priv_data_size = sizeof(DCAEncContext),
|
.priv_data_size = sizeof(DCAEncContext),
|
||||||
.init = encode_init,
|
.init = encode_init,
|
||||||
.close = encode_close,
|
.close = encode_close,
|
||||||
.encode2 = encode_frame,
|
.encode2 = encode_frame,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32,
|
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
.supported_samplerates = sample_rates,
|
.p.supported_samplerates = sample_rates,
|
||||||
#if FF_API_OLD_CHANNEL_LAYOUT
|
#if FF_API_OLD_CHANNEL_LAYOUT
|
||||||
.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO,
|
.p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO,
|
||||||
AV_CH_LAYOUT_STEREO,
|
AV_CH_LAYOUT_STEREO,
|
||||||
AV_CH_LAYOUT_2_2,
|
AV_CH_LAYOUT_2_2,
|
||||||
AV_CH_LAYOUT_5POINT0,
|
AV_CH_LAYOUT_5POINT0,
|
||||||
AV_CH_LAYOUT_5POINT1,
|
AV_CH_LAYOUT_5POINT1,
|
||||||
0 },
|
0 },
|
||||||
#endif
|
#endif
|
||||||
.ch_layouts = (const AVChannelLayout[]){
|
.p.ch_layouts = (const AVChannelLayout[]){
|
||||||
AV_CHANNEL_LAYOUT_MONO,
|
AV_CHANNEL_LAYOUT_MONO,
|
||||||
AV_CHANNEL_LAYOUT_STEREO,
|
AV_CHANNEL_LAYOUT_STEREO,
|
||||||
AV_CHANNEL_LAYOUT_2_2,
|
AV_CHANNEL_LAYOUT_2_2,
|
||||||
@ -1271,5 +1271,5 @@ const AVCodec ff_dca_encoder = {
|
|||||||
{ 0 },
|
{ 0 },
|
||||||
},
|
},
|
||||||
.defaults = defaults,
|
.defaults = defaults,
|
||||||
.priv_class = &dcaenc_class,
|
.p.priv_class = &dcaenc_class,
|
||||||
};
|
};
|
||||||
|
@ -749,13 +749,13 @@ static int dds_decode(AVCodecContext *avctx, void *data,
|
|||||||
return avpkt->size;
|
return avpkt->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_dds_decoder = {
|
const FFCodec ff_dds_decoder = {
|
||||||
.name = "dds",
|
.p.name = "dds",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("DirectDraw Surface image decoder"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("DirectDraw Surface image decoder"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_DDS,
|
.p.id = AV_CODEC_ID_DDS,
|
||||||
.decode = dds_decode,
|
.decode = dds_decode,
|
||||||
.priv_data_size = sizeof(DDSContext),
|
.priv_data_size = sizeof(DDSContext),
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS,
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE
|
||||||
};
|
};
|
||||||
|
@ -188,14 +188,15 @@ static int extract_packet_props(AVCodecInternal *avci, const AVPacket *pkt)
|
|||||||
static int decode_bsfs_init(AVCodecContext *avctx)
|
static int decode_bsfs_init(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
AVCodecInternal *avci = avctx->internal;
|
AVCodecInternal *avci = avctx->internal;
|
||||||
|
const FFCodec *const codec = ffcodec(avctx->codec);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (avci->bsf)
|
if (avci->bsf)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
ret = av_bsf_list_parse_str(avctx->codec->bsfs, &avci->bsf);
|
ret = av_bsf_list_parse_str(codec->bsfs, &avci->bsf);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Error parsing decoder bitstream filters '%s': %s\n", avctx->codec->bsfs, av_err2str(ret));
|
av_log(avctx, AV_LOG_ERROR, "Error parsing decoder bitstream filters '%s': %s\n", codec->bsfs, av_err2str(ret));
|
||||||
if (ret != AVERROR(ENOMEM))
|
if (ret != AVERROR(ENOMEM))
|
||||||
ret = AVERROR_BUG;
|
ret = AVERROR_BUG;
|
||||||
goto fail;
|
goto fail;
|
||||||
@ -233,7 +234,7 @@ int ff_decode_get_packet(AVCodecContext *avctx, AVPacket *pkt)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (!(avctx->codec->caps_internal & FF_CODEC_CAP_SETS_FRAME_PROPS)) {
|
if (!(ffcodec(avctx->codec)->caps_internal & FF_CODEC_CAP_SETS_FRAME_PROPS)) {
|
||||||
ret = extract_packet_props(avctx->internal, pkt);
|
ret = extract_packet_props(avctx->internal, pkt);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto finish;
|
goto finish;
|
||||||
@ -295,6 +296,7 @@ static inline int decode_simple_internal(AVCodecContext *avctx, AVFrame *frame,
|
|||||||
{
|
{
|
||||||
AVCodecInternal *avci = avctx->internal;
|
AVCodecInternal *avci = avctx->internal;
|
||||||
AVPacket *const pkt = avci->in_pkt;
|
AVPacket *const pkt = avci->in_pkt;
|
||||||
|
const FFCodec *const codec = ffcodec(avctx->codec);
|
||||||
int got_frame, actual_got_frame;
|
int got_frame, actual_got_frame;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -320,9 +322,9 @@ static inline int decode_simple_internal(AVCodecContext *avctx, AVFrame *frame,
|
|||||||
if (HAVE_THREADS && avctx->active_thread_type & FF_THREAD_FRAME) {
|
if (HAVE_THREADS && avctx->active_thread_type & FF_THREAD_FRAME) {
|
||||||
ret = ff_thread_decode_frame(avctx, frame, &got_frame, pkt);
|
ret = ff_thread_decode_frame(avctx, frame, &got_frame, pkt);
|
||||||
} else {
|
} else {
|
||||||
ret = avctx->codec->decode(avctx, frame, &got_frame, pkt);
|
ret = codec->decode(avctx, frame, &got_frame, pkt);
|
||||||
|
|
||||||
if (!(avctx->codec->caps_internal & FF_CODEC_CAP_SETS_PKT_DTS))
|
if (!(codec->caps_internal & FF_CODEC_CAP_SETS_PKT_DTS))
|
||||||
frame->pkt_dts = pkt->dts;
|
frame->pkt_dts = pkt->dts;
|
||||||
if (avctx->codec->type == AVMEDIA_TYPE_VIDEO) {
|
if (avctx->codec->type == AVMEDIA_TYPE_VIDEO) {
|
||||||
if(!avctx->has_b_frames)
|
if(!avctx->has_b_frames)
|
||||||
@ -507,7 +509,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||||||
pkt->size -= consumed;
|
pkt->size -= consumed;
|
||||||
pkt->pts = AV_NOPTS_VALUE;
|
pkt->pts = AV_NOPTS_VALUE;
|
||||||
pkt->dts = AV_NOPTS_VALUE;
|
pkt->dts = AV_NOPTS_VALUE;
|
||||||
if (!(avctx->codec->caps_internal & FF_CODEC_CAP_SETS_FRAME_PROPS)) {
|
if (!(codec->caps_internal & FF_CODEC_CAP_SETS_FRAME_PROPS)) {
|
||||||
avci->last_pkt_props->size -= consumed; // See extract_packet_props() comment.
|
avci->last_pkt_props->size -= consumed; // See extract_packet_props() comment.
|
||||||
avci->last_pkt_props->pts = AV_NOPTS_VALUE;
|
avci->last_pkt_props->pts = AV_NOPTS_VALUE;
|
||||||
avci->last_pkt_props->dts = AV_NOPTS_VALUE;
|
avci->last_pkt_props->dts = AV_NOPTS_VALUE;
|
||||||
@ -539,12 +541,13 @@ static int decode_simple_receive_frame(AVCodecContext *avctx, AVFrame *frame)
|
|||||||
static int decode_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame)
|
static int decode_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame)
|
||||||
{
|
{
|
||||||
AVCodecInternal *avci = avctx->internal;
|
AVCodecInternal *avci = avctx->internal;
|
||||||
|
const FFCodec *const codec = ffcodec(avctx->codec);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
av_assert0(!frame->buf[0]);
|
av_assert0(!frame->buf[0]);
|
||||||
|
|
||||||
if (avctx->codec->receive_frame) {
|
if (codec->receive_frame) {
|
||||||
ret = avctx->codec->receive_frame(avctx, frame);
|
ret = codec->receive_frame(avctx, frame);
|
||||||
if (ret != AVERROR(EAGAIN))
|
if (ret != AVERROR(EAGAIN))
|
||||||
av_packet_unref(avci->last_pkt_props);
|
av_packet_unref(avci->last_pkt_props);
|
||||||
} else
|
} else
|
||||||
@ -553,7 +556,7 @@ static int decode_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame)
|
|||||||
if (ret == AVERROR_EOF)
|
if (ret == AVERROR_EOF)
|
||||||
avci->draining_done = 1;
|
avci->draining_done = 1;
|
||||||
|
|
||||||
if (!(avctx->codec->caps_internal & FF_CODEC_CAP_SETS_FRAME_PROPS) &&
|
if (!(codec->caps_internal & FF_CODEC_CAP_SETS_FRAME_PROPS) &&
|
||||||
IS_EMPTY(avci->last_pkt_props)) {
|
IS_EMPTY(avci->last_pkt_props)) {
|
||||||
// May fail if the FIFO is empty.
|
// May fail if the FIFO is empty.
|
||||||
av_fifo_read(avci->pkt_props, avci->last_pkt_props, 1);
|
av_fifo_read(avci->pkt_props, avci->last_pkt_props, 1);
|
||||||
@ -859,7 +862,7 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
|
|||||||
if (avctx->pkt_timebase.num && avpkt->pts != AV_NOPTS_VALUE)
|
if (avctx->pkt_timebase.num && avpkt->pts != AV_NOPTS_VALUE)
|
||||||
sub->pts = av_rescale_q(avpkt->pts,
|
sub->pts = av_rescale_q(avpkt->pts,
|
||||||
avctx->pkt_timebase, AV_TIME_BASE_Q);
|
avctx->pkt_timebase, AV_TIME_BASE_Q);
|
||||||
ret = avctx->codec->decode(avctx, sub, got_sub_ptr, pkt);
|
ret = ffcodec(avctx->codec)->decode(avctx, sub, got_sub_ptr, pkt);
|
||||||
if (pkt == avci->buffer_pkt) // did we recode?
|
if (pkt == avci->buffer_pkt) // did we recode?
|
||||||
av_packet_unref(avci->buffer_pkt);
|
av_packet_unref(avci->buffer_pkt);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
@ -909,11 +912,11 @@ enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *avctx,
|
|||||||
|
|
||||||
// If a device was supplied when the codec was opened, assume that the
|
// If a device was supplied when the codec was opened, assume that the
|
||||||
// user wants to use it.
|
// user wants to use it.
|
||||||
if (avctx->hw_device_ctx && avctx->codec->hw_configs) {
|
if (avctx->hw_device_ctx && ffcodec(avctx->codec)->hw_configs) {
|
||||||
AVHWDeviceContext *device_ctx =
|
AVHWDeviceContext *device_ctx =
|
||||||
(AVHWDeviceContext*)avctx->hw_device_ctx->data;
|
(AVHWDeviceContext*)avctx->hw_device_ctx->data;
|
||||||
for (i = 0;; i++) {
|
for (i = 0;; i++) {
|
||||||
config = &avctx->codec->hw_configs[i]->public;
|
config = &ffcodec(avctx->codec)->hw_configs[i]->public;
|
||||||
if (!config)
|
if (!config)
|
||||||
break;
|
break;
|
||||||
if (!(config->methods &
|
if (!(config->methods &
|
||||||
@ -1025,7 +1028,7 @@ int avcodec_get_hw_frames_parameters(AVCodecContext *avctx,
|
|||||||
int i, ret;
|
int i, ret;
|
||||||
|
|
||||||
for (i = 0;; i++) {
|
for (i = 0;; i++) {
|
||||||
hw_config = avctx->codec->hw_configs[i];
|
hw_config = ffcodec(avctx->codec)->hw_configs[i];
|
||||||
if (!hw_config)
|
if (!hw_config)
|
||||||
return AVERROR(ENOENT);
|
return AVERROR(ENOENT);
|
||||||
if (hw_config->public.pix_fmt == hw_pix_fmt)
|
if (hw_config->public.pix_fmt == hw_pix_fmt)
|
||||||
@ -1169,9 +1172,9 @@ int ff_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (avctx->codec->hw_configs) {
|
if (ffcodec(avctx->codec)->hw_configs) {
|
||||||
for (i = 0;; i++) {
|
for (i = 0;; i++) {
|
||||||
hw_config = avctx->codec->hw_configs[i];
|
hw_config = ffcodec(avctx->codec)->hw_configs[i];
|
||||||
if (!hw_config)
|
if (!hw_config)
|
||||||
break;
|
break;
|
||||||
if (hw_config->public.pix_fmt == user_choice)
|
if (hw_config->public.pix_fmt == user_choice)
|
||||||
@ -1538,7 +1541,7 @@ int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame)
|
|||||||
{ AV_PKT_DATA_DYNAMIC_HDR10_PLUS, AV_FRAME_DATA_DYNAMIC_HDR_PLUS },
|
{ AV_PKT_DATA_DYNAMIC_HDR10_PLUS, AV_FRAME_DATA_DYNAMIC_HDR_PLUS },
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!(avctx->codec->caps_internal & FF_CODEC_CAP_SETS_FRAME_PROPS)) {
|
if (!(ffcodec(avctx->codec)->caps_internal & FF_CODEC_CAP_SETS_FRAME_PROPS)) {
|
||||||
frame->pts = pkt->pts;
|
frame->pts = pkt->pts;
|
||||||
frame->pkt_pos = pkt->pos;
|
frame->pkt_pos = pkt->pos;
|
||||||
frame->pkt_duration = pkt->duration;
|
frame->pkt_duration = pkt->duration;
|
||||||
@ -1739,7 +1742,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||||||
|
|
||||||
end:
|
end:
|
||||||
if (avctx->codec_type == AVMEDIA_TYPE_VIDEO && !override_dimensions &&
|
if (avctx->codec_type == AVMEDIA_TYPE_VIDEO && !override_dimensions &&
|
||||||
!(avctx->codec->caps_internal & FF_CODEC_CAP_EXPORTS_CROPPING)) {
|
!(ffcodec(avctx->codec)->caps_internal & FF_CODEC_CAP_EXPORTS_CROPPING)) {
|
||||||
frame->width = avctx->width;
|
frame->width = avctx->width;
|
||||||
frame->height = avctx->height;
|
frame->height = avctx->height;
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ int ff_copy_palette(void *dst, const AVPacket *src, void *logctx);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform decoder initialization and validation.
|
* Perform decoder initialization and validation.
|
||||||
* Called when opening the decoder, before the AVCodec.init() call.
|
* Called when opening the decoder, before the FFCodec.init() call.
|
||||||
*/
|
*/
|
||||||
int ff_decode_preinit(AVCodecContext *avctx);
|
int ff_decode_preinit(AVCodecContext *avctx);
|
||||||
|
|
||||||
|
@ -423,15 +423,15 @@ static av_cold int dfa_decode_end(AVCodecContext *avctx)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_dfa_decoder = {
|
const FFCodec ff_dfa_decoder = {
|
||||||
.name = "dfa",
|
.p.name = "dfa",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Chronomaster DFA"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("Chronomaster DFA"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_DFA,
|
.p.id = AV_CODEC_ID_DFA,
|
||||||
.priv_data_size = sizeof(DfaContext),
|
.priv_data_size = sizeof(DfaContext),
|
||||||
.init = dfa_decode_init,
|
.init = dfa_decode_init,
|
||||||
.close = dfa_decode_end,
|
.close = dfa_decode_end,
|
||||||
.decode = dfa_decode_frame,
|
.decode = dfa_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -125,14 +125,14 @@ static int dfpwm_dec_frame(struct AVCodecContext *ctx, void *data,
|
|||||||
return packet->size;
|
return packet->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_dfpwm_decoder = {
|
const FFCodec ff_dfpwm_decoder = {
|
||||||
.name = "dfpwm",
|
.p.name = "dfpwm",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("DFPWM1a audio"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("DFPWM1a audio"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_DFPWM,
|
.p.id = AV_CODEC_ID_DFPWM,
|
||||||
.priv_data_size = sizeof(DFPWMState),
|
.priv_data_size = sizeof(DFPWMState),
|
||||||
.init = dfpwm_dec_init,
|
.init = dfpwm_dec_init,
|
||||||
.decode = dfpwm_dec_frame,
|
.decode = dfpwm_dec_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -107,15 +107,15 @@ static int dfpwm_enc_frame(struct AVCodecContext *ctx, struct AVPacket *packet,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_dfpwm_encoder = {
|
const FFCodec ff_dfpwm_encoder = {
|
||||||
.name = "dfpwm",
|
.p.name = "dfpwm",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("DFPWM1a audio"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("DFPWM1a audio"),
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.p.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_DFPWM,
|
.p.id = AV_CODEC_ID_DFPWM,
|
||||||
.priv_data_size = sizeof(DFPWMState),
|
.priv_data_size = sizeof(DFPWMState),
|
||||||
.init = dfpwm_enc_init,
|
.init = dfpwm_enc_init,
|
||||||
.encode2 = dfpwm_enc_frame,
|
.encode2 = dfpwm_enc_frame,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_NONE},
|
.p.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_NONE},
|
||||||
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_VARIABLE_FRAME_SIZE,
|
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_VARIABLE_FRAME_SIZE,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
};
|
};
|
||||||
|
@ -2356,16 +2356,16 @@ static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
|
|||||||
return buf_idx;
|
return buf_idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AVCodec ff_dirac_decoder = {
|
const FFCodec ff_dirac_decoder = {
|
||||||
.name = "dirac",
|
.p.name = "dirac",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("BBC Dirac VC-2"),
|
.p.long_name = NULL_IF_CONFIG_SMALL("BBC Dirac VC-2"),
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.p.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_DIRAC,
|
.p.id = AV_CODEC_ID_DIRAC,
|
||||||
.priv_data_size = sizeof(DiracContext),
|
.priv_data_size = sizeof(DiracContext),
|
||||||
.init = dirac_decode_init,
|
.init = dirac_decode_init,
|
||||||
.close = dirac_decode_end,
|
.close = dirac_decode_end,
|
||||||
.decode = dirac_decode_frame,
|
.decode = dirac_decode_frame,
|
||||||
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_DR1,
|
.p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_DR1,
|
||||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||||
.flush = dirac_decode_flush,
|
.flush = dirac_decode_flush,
|
||||||
};
|
};
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user