mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 17:16:50 +08:00
[mpi_enc_test]: Add AFBC_V2 source support
Change-Id: I089c41137edf39211f33faf234b68295256bcfc1 Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
@@ -247,10 +247,14 @@ MPP_RET test_ctx_init(MpiEncMultiCtxInfo *info)
|
||||
} break;
|
||||
}
|
||||
|
||||
if (MPP_FRAME_FMT_IS_FBC(p->fmt))
|
||||
if (MPP_FRAME_FMT_IS_FBC(p->fmt)) {
|
||||
if ((p->fmt & MPP_FRAME_FBC_MASK) == MPP_FRAME_FBC_AFBC_V1)
|
||||
p->header_size = MPP_ALIGN(MPP_ALIGN(p->width, 16) * MPP_ALIGN(p->height, 16) / 16, SZ_4K);
|
||||
else
|
||||
p->header_size = MPP_ALIGN(p->width, 16) * MPP_ALIGN(p->height, 16) / 16;
|
||||
} else {
|
||||
p->header_size = 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@@ -434,7 +434,12 @@ MPP_RET read_image(RK_U8 *buf, FILE *fp, RK_U32 width, RK_U32 height,
|
||||
if (MPP_FRAME_FMT_IS_FBC(fmt)) {
|
||||
RK_U32 align_w = MPP_ALIGN(width, 16);
|
||||
RK_U32 align_h = MPP_ALIGN(height, 16);
|
||||
RK_U32 header_size = MPP_ALIGN(align_w * align_h / 16, SZ_4K);
|
||||
RK_U32 header_size = 0;
|
||||
|
||||
if ((fmt & MPP_FRAME_FBC_MASK) == MPP_FRAME_FBC_AFBC_V1)
|
||||
header_size = MPP_ALIGN(align_w * align_h / 16, SZ_4K);
|
||||
else
|
||||
header_size = align_w * align_h / 16;
|
||||
|
||||
/* read fbc header first */
|
||||
read_size = fread(buf, 1, header_size, fp);
|
||||
|
Reference in New Issue
Block a user