diff mbox series

[FFmpeg-devel,2/2] libavcodec/pgxdec Fix pix format selection error

Message ID 20200729154911.29509-2-gautamramk@gmail.com
State Accepted
Commit 8821df6fcfc0a3b75c7079617f5917c031d0a63c
Headers show
Series [FFmpeg-devel,1/2] libavcodec/j2kenc: Encoding up to 16 bits | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Gautam Ramakrishnan July 29, 2020, 3:49 p.m. UTC
From: Gautam Ramakrishnan <gautamramk@gmail.com>

This patch makes the pgx decoder select the correct
byte order instead of selecting big endian format for
16 bit images.
---
 libavcodec/pgxdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer July 29, 2020, 9:11 p.m. UTC | #1
On Wed, Jul 29, 2020 at 09:19:11PM +0530, gautamramk@gmail.com wrote:
> From: Gautam Ramakrishnan <gautamramk@gmail.com>
> 
> This patch makes the pgx decoder select the correct
> byte order instead of selecting big endian format for
> 16 bit images.
> ---
>  libavcodec/pgxdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply

thx

[...]
diff mbox series

Patch

diff --git a/libavcodec/pgxdec.c b/libavcodec/pgxdec.c
index 93b9f4e7a0..a72d6fe6fe 100644
--- a/libavcodec/pgxdec.c
+++ b/libavcodec/pgxdec.c
@@ -137,7 +137,7 @@  static int pgx_decode_frame(AVCodecContext *avctx, void *data,
         avctx->pix_fmt = AV_PIX_FMT_GRAY8;
         bpp = 8;
     } else if (depth <= 16) {
-        avctx->pix_fmt = AV_PIX_FMT_GRAY16BE;
+        avctx->pix_fmt = AV_PIX_FMT_GRAY16;
         bpp = 16;
     } else {
         av_log(avctx, AV_LOG_ERROR, "Maximum depth of 16 bits supported.\n");