[mpp_dec]: fix hdr stream dump yuv error.

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: Ibf13d81dfec194bb607a1fe881227951bb1509e0
This commit is contained in:
xueman.ruan
2023-03-29 15:10:00 +08:00
committed by Herman Chen
parent 6056a6283d
commit ef67776801
2 changed files with 2 additions and 2 deletions

View File

@@ -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) 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 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 width = mpp_frame_get_width(frame);
RK_U32 height = mpp_frame_get_height(frame); RK_U32 height = mpp_frame_get_height(frame);
RK_U32 hor_stride = mpp_frame_get_hor_stride(frame); RK_U32 hor_stride = mpp_frame_get_hor_stride(frame);

View File

@@ -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)) { if (MPP_FRAME_FMT_IS_RGB(fmt) && MPP_FRAME_FMT_IS_LE(fmt)) {
fmt &= MPP_FRAME_FMT_MASK; fmt &= MPP_FRAME_FMT_MASK;
} }
switch (fmt) { switch (fmt & MPP_FRAME_FMT_MASK) {
case MPP_FMT_YUV422SP : { case MPP_FMT_YUV422SP : {
/* YUV422SP -> YUV422P for better display */ /* YUV422SP -> YUV422P for better display */
RK_U32 i, j; RK_U32 i, j;