From ef6777680159171405e7ba43f8fb89f020396096 Mon Sep 17 00:00:00 2001 From: "xueman.ruan" Date: Wed, 29 Mar 2023 15:10:00 +0800 Subject: [PATCH] [mpp_dec]: fix hdr stream dump yuv error. Signed-off-by: xueman.ruan Change-Id: Ibf13d81dfec194bb607a1fe881227951bb1509e0 --- mpp/mpp_impl.cpp | 2 +- utils/utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mpp/mpp_impl.cpp b/mpp/mpp_impl.cpp index 94680af3..85c6391a 100644 --- a/mpp/mpp_impl.cpp +++ b/mpp/mpp_impl.cpp @@ -153,7 +153,7 @@ static RK_U8 fetch_data(RK_U32 fmt, RK_U8 *line, RK_U32 num) static void dump_frame(FILE *fp, MppFrame frame, RK_U8 *tmp, RK_U32 w, RK_U32 h) { RK_U32 i = 0, j = 0; - RK_U32 fmt = mpp_frame_get_fmt(frame); + RK_U32 fmt = (mpp_frame_get_fmt(frame) & MPP_FRAME_FMT_MASK); RK_U32 width = mpp_frame_get_width(frame); RK_U32 height = mpp_frame_get_height(frame); RK_U32 hor_stride = mpp_frame_get_hor_stride(frame); diff --git a/utils/utils.c b/utils/utils.c index efa38a83..016d7715 100644 --- a/utils/utils.c +++ b/utils/utils.c @@ -71,7 +71,7 @@ void dump_mpp_frame_to_file(MppFrame frame, FILE *fp) if (MPP_FRAME_FMT_IS_RGB(fmt) && MPP_FRAME_FMT_IS_LE(fmt)) { fmt &= MPP_FRAME_FMT_MASK; } - switch (fmt) { + switch (fmt & MPP_FRAME_FMT_MASK) { case MPP_FMT_YUV422SP : { /* YUV422SP -> YUV422P for better display */ RK_U32 i, j;