[FFmpeg-devel] [FFmpeg-cvslog] avcodec: add ARBC decoder
James Almer
jamrial at gmail.com
Mon Jan 28 05:37:03 EET 2019
> ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Jan
> 20 11:18:38 2019 +0100| [795af110f70bbd12b45ae2d3b08e7f45db5224a0] |
> committer: Paul B Mahol
>
> avcodec: add ARBC decoder
>
> Thanks Kostya for great help in reversing binary.
>
> >
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=795af110f70bbd12b45ae2d3b08e7f45db5224a0
> ---
>
> Changelog | 1 +
> libavcodec/Makefile | 1 +
> libavcodec/allcodecs.c | 1 +
> libavcodec/arbc.c | 204
> ++++++++++++++++++++++++++++++++++++++++++++++++
> libavcodec/avcodec.h | 1 +
> libavcodec/codec_desc.c | 7 ++
> libavcodec/version.h | 2 +-
> libavformat/riff.c | 1 +
> 8 files changed, 217 insertions(+), 1 deletion(-)
[...]
>
> +
> +static av_cold int decode_init(AVCodecContext *avctx)
> +{
> + ARBCContext *s = avctx->priv_data;
> +
> + avctx->pix_fmt = AV_PIX_FMT_RGB24;
> +
> + s->prev_frame = av_frame_alloc();
> + if (!s->prev_frame)
> + return AVERROR(ENOMEM);
> +
> + return 0;
> +}
> +
> +static av_cold int decode_close(AVCodecContext *avctx)
> +{
> + ARBCContext *s = avctx->priv_data;
> +
> + av_frame_free(&s->prev_frame);
> +
> + return 0;
> +}
> +
> +AVCodec ff_arbc_decoder = {
> + .name = "arbc",
> + .long_name = NULL_IF_CONFIG_SMALL("Gryphon's Anim Compressor"),
> + .type = AVMEDIA_TYPE_VIDEO,
> + .id = AV_CODEC_ID_ARBC,
> + .priv_data_size = sizeof(ARBCContext),
> + .init = decode_init,
> + .decode = decode_frame,
> + .close = decode_close,
> + .capabilities = AV_CODEC_CAP_DR1,
> + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
Why did you remove the init thread safe flag?
And this is missing an AVCodec.flush() callback to unref s->prev_frame,
for that matter.
More information about the ffmpeg-devel
mailing list