You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-06 06:27:36 +02:00
avcodec/ffv1: Fix remap ordering
Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@ -186,9 +186,9 @@ static int RENAME(decode_rgb_frame)(FFV1Context *f, FFV1SliceContext *sc,
|
||||
r += g;
|
||||
}
|
||||
if (sc->remap) {
|
||||
r = sc->fltmap[0][r & 0xFFFF];
|
||||
g = sc->fltmap[1][g & 0xFFFF];
|
||||
b = sc->fltmap[2][b & 0xFFFF];
|
||||
g = sc->fltmap[0][g & 0xFFFF];
|
||||
b = sc->fltmap[1][b & 0xFFFF];
|
||||
r = sc->fltmap[2][r & 0xFFFF];
|
||||
if (transparency)
|
||||
a = sc->fltmap[3][a & 0xFFFF];
|
||||
}
|
||||
|
@ -432,7 +432,7 @@ static void set_micro_version(FFV1Context *f)
|
||||
if (f->version == 3) {
|
||||
f->micro_version = 4;
|
||||
} else if (f->version == 4) {
|
||||
f->micro_version = 5;
|
||||
f->micro_version = 6;
|
||||
} else
|
||||
av_assert0(0);
|
||||
|
||||
|
@ -152,9 +152,9 @@ static void RENAME(load_rgb_frame)(FFV1Context *f, FFV1SliceContext *sc,
|
||||
r = *((const uint16_t *)(src[2] + x*2 + stride[2]*y));
|
||||
}
|
||||
|
||||
sc->fltmap[0][r] = 1;
|
||||
sc->fltmap[1][g] = 1;
|
||||
sc->fltmap[2][b] = 1;
|
||||
sc->fltmap[0][g] = 1;
|
||||
sc->fltmap[1][b] = 1;
|
||||
sc->fltmap[2][r] = 1;
|
||||
if (transparency)
|
||||
sc->fltmap[3][a] = 1;
|
||||
}
|
||||
@ -214,9 +214,9 @@ static int RENAME(encode_rgb_frame)(FFV1Context *f, FFV1SliceContext *sc,
|
||||
}
|
||||
|
||||
if (sc->remap) {
|
||||
r = sc->fltmap[0][r];
|
||||
g = sc->fltmap[1][g];
|
||||
b = sc->fltmap[2][b];
|
||||
g = sc->fltmap[0][g];
|
||||
b = sc->fltmap[1][b];
|
||||
r = sc->fltmap[2][r];
|
||||
if (transparency)
|
||||
a = sc->fltmap[3][a];
|
||||
}
|
||||
|
Reference in New Issue
Block a user