[FFmpeg-devel] [PATCH] avcodec/ffv1: Implement jeromes idea of making remap flip optional
Jerome Martinez
jerome at mediaarea.net
Tue Mar 11 17:33:11 EET 2025
Le 11/03/2025 à 15:04, Michael Niedermayer a écrit :
> Re: [FFmpeg-devel] [PATCH] avcodec/ffv1: Implement jeromes idea of making remap flip optional
Thanks.
> - if (sc->remap > 1U ||
> - sc->remap == 1 && !f->flt) {
> + if (sc->remap > 2U ||
> + sc->remap && !f->flt) {
> av_log(f->avctx, AV_LOG_ERROR, "unsupported remap %d\n", sc->remap);
> return AVERROR_INVALIDDATA;
> }
As the feature is now independent of f->flt, it seems that we can remove
the "sc->remap && !f->flt" check, it should be supported with integers
(actually whatever is the value of !f->flt) too.
> + { "remap_mode", "Remap Mode", OFFSET(remap_mode), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 2, VE, .unit = "remap_mode" },
> + { "auto", "Automatic", 0, AV_OPT_TYPE_CONST,
> + { .i64 = -1 }, INT_MIN, INT_MAX, VE, .unit = "remap_mode" },
> + { "off", "Disabled", 0, AV_OPT_TYPE_CONST,
> + { .i64 = 0 }, INT_MIN, INT_MAX, VE, .unit = "remap_mode" },
> + { "dualrle", "Dual RLE", 0, AV_OPT_TYPE_CONST,
> + { .i64 = 1 }, INT_MIN, INT_MAX, VE, .unit = "remap_mode" },
> + { "flipdualrle", "Dual RLE", 0, AV_OPT_TYPE_CONST,
> + { .i64 = 2 }, INT_MIN, INT_MAX, VE, .unit = "remap_mode" },
Even better to have na option for it.
LGTM.
More information about the ffmpeg-devel
mailing list