[FFmpeg-cvslog] avcodec/ffv1enc: Fix RCT for GBR colorspace
Michael Niedermayer
git at videolan.org
Thu Jan 23 03:14:46 EET 2025
ffmpeg | branch: release/7.1 | Michael Niedermayer <michael at niedermayer.cc> | Sun Jan 19 02:02:52 2025 +0100| [5ee56ebd30488be9c44d3744458222673df53bf5] | committer: Michael Niedermayer
avcodec/ffv1enc: Fix RCT for GBR colorspace
It performs better when its less buggy
Compression changes for rgb_scanline_half_piz_dw_t08 (using float16 with remaping) from
56086 byte to 34371
(with a single slice its 28122 byte)
prior remap it was 188186 bytes
ACES_OT_VWG_SampleFrames/ACES_OT_VWG_SampleFrames improves too but only by a fraction of a percent
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 62c98cdd549a44d59d5b01d42dfbe35aed413d37)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5ee56ebd30488be9c44d3744458222673df53bf5
---
libavcodec/ffv1enc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 3e80906dd0..7b8ed7acc6 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -1002,6 +1002,10 @@ static void choose_rct_params(const FFV1Context *f, FFV1SliceContext *sc,
r = p[0];
g = p[1];
b = p[2];
+ } else if (f->use32bit || transparency) {
+ g = *((const uint16_t *)(src[0] + x*2 + stride[0]*y));
+ b = *((const uint16_t *)(src[1] + x*2 + stride[1]*y));
+ r = *((const uint16_t *)(src[2] + x*2 + stride[2]*y));
} else {
b = *((const uint16_t*)(src[0] + x*2 + stride[0]*y));
g = *((const uint16_t*)(src[1] + x*2 + stride[1]*y));
More information about the ffmpeg-cvslog
mailing list