summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrien Destugues <pulkomandy@pulkomandy.tk>2017-05-30 19:55:02 (GMT)
committerAdrien Destugues <pulkomandy@pulkomandy.tk>2017-05-30 19:55:02 (GMT)
commit4edf3ea9c1fd8f6903f40763c5c5dd67c1a701c5 (patch)
tree5fbbd56694d22bf115010ba01cf5dfa64d60ae97
parent50f36c92b55e2c3143271ff65e38c7edacff6c8a (diff)
ffmpeg: Fix decoding of GBRP colorspacehrev51193
It turns out the first plane is blue, not green. Yes, this does not match with the colorspace name...
-rw-r--r--src/add-ons/media/plugins/ffmpeg/gfx_conv_c.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/add-ons/media/plugins/ffmpeg/gfx_conv_c.cpp b/src/add-ons/media/plugins/ffmpeg/gfx_conv_c.cpp
index 09df531..90b2fbb 100644
--- a/src/add-ons/media/plugins/ffmpeg/gfx_conv_c.cpp
+++ b/src/add-ons/media/plugins/ffmpeg/gfx_conv_c.cpp
@@ -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;