[FFmpeg-devel] [PATCH 02/10, v2] avcodec: add amfdec.

Mark Thompson sw at jkqxz.net
Thu May 2 23:00:38 EEST 2024


On 01/05/2024 19:38, Dmitrii Ovchinnikov wrote:
> From: Evgeny Pavlov <lucenticus at gmail.com>
> 
> Added AMF based h264, hevc, av1 decoders.
> Co-authored-by: Dmitrii Ovchinnikov <ovchinnikov.dmitrii at gmail.com>
> v2: added encoder reinitialisation
> ---
>  libavcodec/Makefile    |   7 +-
>  libavcodec/allcodecs.c |   3 +
>  libavcodec/amfdec.c    | 719 +++++++++++++++++++++++++++++++++++++++++
>  libavcodec/amfdec.h    |  72 +++++
>  4 files changed, 799 insertions(+), 2 deletions(-)
>  create mode 100644 libavcodec/amfdec.c
>  create mode 100644 libavcodec/amfdec.h
> 
> ...
> +
> +static int amf_decode_init(AVCodecContext *avctx)
> +{
> +    AvAmfDecoderContext *ctx = avctx->priv_data;
> +    int ret;
> +    enum AVPixelFormat pix_fmts[3] = {
> +        AV_PIX_FMT_AMF_SURFACE,
> +        avctx->pix_fmt,
> +        AV_PIX_FMT_NONE };
> +
> +    ret = ff_get_format(avctx, pix_fmts);
> ...
> +const FFCodec ff_##x##_amf_decoder = { \
> ...
> +    .init           = amf_decode_init, \
> ...

This is still fundamentally incorrect.

See my reply to the previous posting of this patch: <https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2024-February/321500.html>.

Thanks,

- Mark


More information about the ffmpeg-devel mailing list