summaryrefslogtreecommitdiffstats
path: root/libavcodec/ffv1dec_template.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-08-16 23:04:00 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-08-16 23:04:00 +0200
commitb1d12509384b9285b85f5c183772d75a81e74009 (patch)
tree924ac856a8048aae63d2ecb135444cacd2358337 /libavcodec/ffv1dec_template.c
parent87da1188981fbfa802d1ccfe22bf32cc76f52ada (diff)
downloadffmpeg-streaming-b1d12509384b9285b85f5c183772d75a81e74009.zip
ffmpeg-streaming-b1d12509384b9285b85f5c183772d75a81e74009.tar.gz
avcodec/ffv1: Fix rgb plane ordering in experimental planar RGB
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/ffv1dec_template.c')
-rw-r--r--libavcodec/ffv1dec_template.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/ffv1dec_template.c b/libavcodec/ffv1dec_template.c
index 5894f93..21af155 100644
--- a/libavcodec/ffv1dec_template.c
+++ b/libavcodec/ffv1dec_template.c
@@ -150,7 +150,11 @@ static void RENAME(decode_rgb_frame)(FFV1Context *s, uint8_t *src[3], int w, int
if (lbd)
*((uint32_t*)(src[0] + x*4 + stride[0]*y)) = b + (g<<8) + (r<<16) + (a<<24);
- else {
+ else if (sizeof(TYPE) == 4) {
+ *((uint16_t*)(src[0] + x*2 + stride[0]*y)) = g;
+ *((uint16_t*)(src[1] + x*2 + stride[1]*y)) = b;
+ *((uint16_t*)(src[2] + x*2 + stride[2]*y)) = r;
+ } else {
*((uint16_t*)(src[0] + x*2 + stride[0]*y)) = b;
*((uint16_t*)(src[1] + x*2 + stride[1]*y)) = g;
*((uint16_t*)(src[2] + x*2 + stride[2]*y)) = r;
OpenPOWER on IntegriCloud