diff mbox

[FFmpeg-devel] lavc/hevc_ps: Use correct pix_fmt for 9 bit monochrome.

Message ID CAB0OVGoveFa4VuJkdLMNKqeCUBBQo2MTc_Ri5L_-6xWguGRwfQ@mail.gmail.com
State Accepted
Headers show

Commit Message

Carl Eugen Hoyos May 23, 2018, 1:06 p.m. UTC
Hi!

Attached patch uses the new AV_PIX_FMT_GRAY9 for monochrome hevc input.

Please comment, Carl Eugen

Comments

Carl Eugen Hoyos May 25, 2018, 7:11 p.m. UTC | #1
2018-05-23 15:06 GMT+02:00, Carl Eugen Hoyos <ceffmpeg@gmail.com>:

> Attached patch uses the new AV_PIX_FMT_GRAY9 for monochrome hevc input.

Patch applied, Carl Eugen
diff mbox

Patch

From 16a6f6b552d130600557fd19c7f86cd54c08c858 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Wed, 23 May 2018 15:04:24 +0200
Subject: [PATCH] lavc/hevc_ps: Use correct pix_fmt for 9 bit monochrome.

---
 libavcodec/hevc_ps.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index f877fa5..bca3abb 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -825,7 +825,7 @@  static int map_pixel_format(AVCodecContext *avctx, HEVCSPS *sps)
         if (sps->chroma_format_idc == 3) sps->pix_fmt = AV_PIX_FMT_YUV444P;
        break;
     case 9:
-        if (sps->chroma_format_idc == 0) sps->pix_fmt = AV_PIX_FMT_GRAY16;
+        if (sps->chroma_format_idc == 0) sps->pix_fmt = AV_PIX_FMT_GRAY9;
         if (sps->chroma_format_idc == 1) sps->pix_fmt = AV_PIX_FMT_YUV420P9;
         if (sps->chroma_format_idc == 2) sps->pix_fmt = AV_PIX_FMT_YUV422P9;
         if (sps->chroma_format_idc == 3) sps->pix_fmt = AV_PIX_FMT_YUV444P9;
-- 
1.7.10.4