ffmpeg: Fix decoding of GBRP colorspace

It turns out the first plane is blue, not green. Yes, this does not
match with the colorspace name...
This commit is contained in:
Adrien Destugues 2017-05-30 21:55:02 +02:00
parent 50f36c92b5
commit 4edf3ea9c1

View File

@ -300,8 +300,8 @@ gfx_conv_YCbCr422_RGB32_c(AVFrame *in, AVFrame *out, int width, int height)
void
gfx_conv_GBRP_RGB32_c(AVFrame *in, AVFrame *out, int width, int height)
{
uint8 *gBase = (uint8 *)in->data[0];
uint8 *bBase = (uint8 *)in->data[1];
uint8 *bBase = (uint8 *)in->data[0];
uint8 *gBase = (uint8 *)in->data[1];
uint8 *rBase = (uint8 *)in->data[2];
uint32 *rgbBase = (uint32 *)out->data[0];
@ -312,8 +312,8 @@ gfx_conv_GBRP_RGB32_c(AVFrame *in, AVFrame *out, int width, int height)
rgbBase[j] = gBase[j] | (bBase[j] << 8) | (rBase[j] << 16);
}
gBase += in->linesize[0];
bBase += in->linesize[1];
bBase += in->linesize[0];
gBase += in->linesize[1];
rBase += in->linesize[2];
rgbBase += out->linesize[0] / 4;