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@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2025-01-19 02:02:52 +01:00
parent 497b205ad5
commit 62c98cdd54
No known key found for this signature in database
GPG key ID: B18E8928B3948D64

View file

@ -1046,6 +1046,10 @@ static void choose_rct_params(const FFV1Context *f, FFV1SliceContext *sc,
r = p[0]; r = p[0];
g = p[1]; g = p[1];
b = p[2]; 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 { } else {
b = *((const uint16_t*)(src[0] + x*2 + stride[0]*y)); b = *((const uint16_t*)(src[0] + x*2 + stride[0]*y));
g = *((const uint16_t*)(src[1] + x*2 + stride[1]*y)); g = *((const uint16_t*)(src[1] + x*2 + stride[1]*y));