/* UHD resoluition */
#define MFC_UHD_RES (3840 * 2160)
-#define IS_UHD_RES(ctx) (((ctx)->img_width * (ctx)->img_height) == MFC_UHD_RES)
-#define OVER_UHD_ENC60(ctx) ((((ctx)->img_width * (ctx)->img_height) == MFC_UHD_RES) && \
+#define IS_UHD_RES(ctx) (((ctx)->crop_width * (ctx)->crop_height) == MFC_UHD_RES)
+#define OVER_UHD_ENC60(ctx) ((((ctx)->crop_width * (ctx)->crop_height) == MFC_UHD_RES) && \
((ctx)->type == MFCINST_ENCODER) && \
((ctx)->framerate / 1000) >= 60)
if (ctx->src_fmt->fourcc != V4L2_PIX_FMT_FIMV1) {
ctx->img_width = s5p_mfc_get_img_width();
ctx->img_height = s5p_mfc_get_img_height();
+ ctx->crop_width = ctx->img_width;
+ ctx->crop_height = ctx->img_height;
mfc_info_ctx("width: %d, height: %d\n", ctx->img_width, ctx->img_height);
}
{
unsigned long mb_width, mb_height, fps, mb;
- mb_width = (ctx->img_width + 15) / 16;
- mb_height = (ctx->img_height + 15) / 16;
+ mb_width = (ctx->crop_width + 15) / 16;
+ mb_height = (ctx->crop_height + 15) / 16;
fps = ctx->framerate / 1000;
mb = mb_width * mb_height * fps;
mfc_debug(4, "QoS ctx[%d:%s] %d x %d @ %ld fps (mb: %ld)\n",
ctx->num, ctx->type == MFCINST_ENCODER ? "ENC" : "DEC",
- ctx->img_width, ctx->img_height, fps, mb);
+ ctx->crop_width, ctx->crop_height, fps, mb);
return mfc_qos_get_weighted_mb(ctx, mb);
}
unsigned long mb_count_per_uhd_frame = MB_COUNT_PER_UHD_FRAME;
unsigned long max_fps_per_uhd_frame = MAX_FPS_PER_UHD_FRAME;
- mb_width = (ctx->img_width + 15) / 16;
- mb_height = (ctx->img_height + 15) / 16;
+ mb_width = (ctx->crop_width + 15) / 16;
+ mb_height = (ctx->crop_height + 15) / 16;
fps = ctx->framerate / 1000;
mb = mb_width * mb_height * fps;