diff mbox

[FFmpeg-devel,1/2] avcodec/ffv1dec: Set packed_at_lsb for 16bit YUV

Message ID 20161118001044.2574-1-michael@niedermayer.cc
State Accepted
Headers show

Commit Message

Michael Niedermayer Nov. 18, 2016, 12:10 a.m. UTC
This avoids unneeded computations

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/ffv1dec.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Michael Niedermayer Nov. 18, 2016, 12:16 a.m. UTC | #1
On Fri, Nov 18, 2016 at 01:10:43AM +0100, Michael Niedermayer wrote:
> This avoids unneeded computations
> 
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavcodec/ffv1dec.c | 2 ++
>  1 file changed, 2 insertions(+)

please disregard this patch, it was sent twice by mistake

[...]
diff mbox

Patch

diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index b5fb825..358da17 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -637,12 +637,14 @@  static int read_header(FFV1Context *f)
             case 0x11: f->avctx->pix_fmt = AV_PIX_FMT_YUVA420P10; break;
             }
         } else if (f->avctx->bits_per_raw_sample == 16 && !f->transparency){
+            f->packed_at_lsb = 1;
             switch(16 * f->chroma_h_shift + f->chroma_v_shift) {
             case 0x00: f->avctx->pix_fmt = AV_PIX_FMT_YUV444P16; break;
             case 0x10: f->avctx->pix_fmt = AV_PIX_FMT_YUV422P16; break;
             case 0x11: f->avctx->pix_fmt = AV_PIX_FMT_YUV420P16; break;
             }
         } else if (f->avctx->bits_per_raw_sample == 16 && f->transparency){
+            f->packed_at_lsb = 1;
             switch(16 * f->chroma_h_shift + f->chroma_v_shift) {
             case 0x00: f->avctx->pix_fmt = AV_PIX_FMT_YUVA444P16; break;
             case 0x10: f->avctx->pix_fmt = AV_PIX_FMT_YUVA422P16; break;