Loading msm/vidc/msm_venc.c +2 −1 Original line number Diff line number Diff line Loading @@ -1557,6 +1557,8 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) rc = msm_venc_resolve_rate_control(inst, ctrl); if (rc) s_vpr_e(sid, "%s: set bitrate mode failed\n", __func__); if (inst->state < MSM_VIDC_LOAD_RESOURCES) msm_vidc_calculate_buffer_counts(inst); break; } case V4L2_CID_MPEG_VIDEO_BITRATE: Loading Loading @@ -1615,7 +1617,6 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) inst->flags &= ~VIDC_TURBO; if (ctrl->val == INT_MAX) inst->flags |= VIDC_TURBO; if (inst->state < MSM_VIDC_LOAD_RESOURCES) msm_vidc_calculate_buffer_counts(inst); if (inst->state == MSM_VIDC_START_DONE) { Loading msm/vidc/msm_vidc_buffer_calculations.c +10 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,9 @@ /* extra output buffers for encoder HFR usecase */ #define HFR_ENC_TOTAL_OUTPUT_BUFFERS 12 /* extra output buffers for encoder HEIF usecase */ #define HEIF_ENC_TOTAL_OUTPUT_BUFFERS 12 #define HFI_COLOR_FORMAT_YUV420_NV12_UBWC_Y_TILE_WIDTH 32 #define HFI_COLOR_FORMAT_YUV420_NV12_UBWC_Y_TILE_HEIGHT 8 #define HFI_COLOR_FORMAT_YUV420_NV12_UBWC_UV_TILE_WIDTH 16 Loading Loading @@ -833,6 +836,13 @@ static int msm_vidc_get_extra_output_buff_count(struct msm_vidc_inst *inst) if (!is_realtime_session(inst) || is_thumbnail_session(inst)) return extra_output_count; /* For HEIF, we are increasing buffer count */ if (is_image_session(inst)) { extra_output_count = (HEIF_ENC_TOTAL_OUTPUT_BUFFERS - MIN_ENC_OUTPUT_BUFFERS); return extra_output_count; } /* * Batch mode and HFR not supported for resolution greater than * UHD. Hence extra buffers are not required. Loading Loading
msm/vidc/msm_venc.c +2 −1 Original line number Diff line number Diff line Loading @@ -1557,6 +1557,8 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) rc = msm_venc_resolve_rate_control(inst, ctrl); if (rc) s_vpr_e(sid, "%s: set bitrate mode failed\n", __func__); if (inst->state < MSM_VIDC_LOAD_RESOURCES) msm_vidc_calculate_buffer_counts(inst); break; } case V4L2_CID_MPEG_VIDEO_BITRATE: Loading Loading @@ -1615,7 +1617,6 @@ int msm_venc_s_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) inst->flags &= ~VIDC_TURBO; if (ctrl->val == INT_MAX) inst->flags |= VIDC_TURBO; if (inst->state < MSM_VIDC_LOAD_RESOURCES) msm_vidc_calculate_buffer_counts(inst); if (inst->state == MSM_VIDC_START_DONE) { Loading
msm/vidc/msm_vidc_buffer_calculations.c +10 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,9 @@ /* extra output buffers for encoder HFR usecase */ #define HFR_ENC_TOTAL_OUTPUT_BUFFERS 12 /* extra output buffers for encoder HEIF usecase */ #define HEIF_ENC_TOTAL_OUTPUT_BUFFERS 12 #define HFI_COLOR_FORMAT_YUV420_NV12_UBWC_Y_TILE_WIDTH 32 #define HFI_COLOR_FORMAT_YUV420_NV12_UBWC_Y_TILE_HEIGHT 8 #define HFI_COLOR_FORMAT_YUV420_NV12_UBWC_UV_TILE_WIDTH 16 Loading Loading @@ -833,6 +836,13 @@ static int msm_vidc_get_extra_output_buff_count(struct msm_vidc_inst *inst) if (!is_realtime_session(inst) || is_thumbnail_session(inst)) return extra_output_count; /* For HEIF, we are increasing buffer count */ if (is_image_session(inst)) { extra_output_count = (HEIF_ENC_TOTAL_OUTPUT_BUFFERS - MIN_ENC_OUTPUT_BUFFERS); return extra_output_count; } /* * Batch mode and HFR not supported for resolution greater than * UHD. Hence extra buffers are not required. Loading