mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-23 23:40:15 +01:00
avcodec/ffv1: Store remap flag per slice
This allows switching it on conditionally and also for non float, it may improve compression for RGB data that was paletted or other synthetic images Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -220,6 +220,14 @@ static int decode_slice_header(const FFV1Context *f,
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
}
|
||||
if (f->combined_version >= 0x40004) {
|
||||
sc->remap = ff_ffv1_get_symbol(c, state, 0);
|
||||
if (sc->remap > 1U ||
|
||||
sc->remap == 1 && !f->flt) {
|
||||
av_log(f->avctx, AV_LOG_ERROR, "unsupported remap %d\n", sc->remap);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user