[mpp_dec]: Fix the problem of read data error

For data with sizes of 5120x7160 and 8000x8000, the required buffer size
was calculated incorrectly during the encoding process, which caused the
requested buffer to be too large, resulting in drm exceptions.
Therefore, the method of calculating data has been modified.

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I519a76687118d568cf57e7d3d54a150e9019285c
This commit is contained in:
Hongjin Li
2022-01-04 15:41:11 +08:00
parent 0e15e96c9f
commit 33269e39e7
2 changed files with 14 additions and 4 deletions

View File

@@ -213,7 +213,7 @@ RK_S32 mpi_enc_opt_f(void *ctx, const char *next)
/* decimal value, use atoi */
format = (MppFrameFormat)atoi(next);
}
if (MPP_FRAME_FMT_IS_LE(format) &&
if (MPP_FRAME_FMT_IS_BE(format) &&
(MPP_FRAME_FMT_IS_YUV(format) || MPP_FRAME_FMT_IS_RGB(format))) {
cmd->format = format;
return 1;