Răsfoiți Sursa

video: driver: tune image_encode_session settings

[1] Increase min_output buffer_count from 1 to 4.
[2] Enable FRAME_RC_ENABLE cap for image session.
    default - RC_CQ mode.

Change-Id: Iad3166fe37733e9d9ccde1dca29af8c7b825cc98
Signed-off-by: Govindaraj Rajagopal <[email protected]>
Govindaraj Rajagopal 4 ani în urmă
părinte
comite
35b7d34429

+ 1 - 6
driver/platform/waipio/src/msm_vidc_waipio.c

@@ -387,7 +387,7 @@ static struct msm_platform_inst_capability instance_data_waipio[] = {
 		0,
 		CAP_FLAG_OUTPUT_PORT | CAP_FLAG_MENU},
 
-	{FRAME_RC_ENABLE, ENC, H264|HEVC,
+	{FRAME_RC_ENABLE, ENC, H264|HEVC|HEIC,
 		V4L2_MPEG_MSM_VIDC_DISABLE, V4L2_MPEG_MSM_VIDC_ENABLE,
 		1, V4L2_MPEG_MSM_VIDC_ENABLE,
 		V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE},
@@ -1316,11 +1316,6 @@ static struct msm_platform_inst_capability instance_data_waipio[] = {
 	{FRAME_HEIGHT, DEC, HEIC, 512, 8192, 1, 8192},
 	{MIN_BUFFERS_INPUT, ENC|DEC, HEIC, 0, 64, 1, 1,
 		V4L2_CID_MIN_BUFFERS_FOR_OUTPUT},
-	{MIN_BUFFERS_OUTPUT, ENC|DEC, HEIC,
-		0, 64, 1, 1,
-		V4L2_CID_MIN_BUFFERS_FOR_CAPTURE,
-		HFI_PROP_BUFFER_FW_MIN_OUTPUT_COUNT,
-		CAP_FLAG_ROOT | CAP_FLAG_OUTPUT_PORT},
 	{MBPF, ENC, HEIC, 64, 262144, 262144},      /* ((8192x8192)/256) */
 	{MBPF, DEC, HEIC, 36, 1048576, 1, 1048576}, /* ((16384x16384)/256) */
 	{MBPS, ENC, HEIC, 64, 262144, 262144},      /* ((8192x8192)/256)@1fps */

+ 2 - 13
driver/vidc/src/msm_vidc_buffer.c

@@ -14,7 +14,6 @@
 u32 msm_vidc_input_min_count(struct msm_vidc_inst* inst)
 {
 	u32 input_min_count = 0;
-	//struct v4l2_ctrl *max_layer = NULL;
 
 	if (!inst) {
 		d_vpr_e("%s: invalid params\n", __func__);
@@ -49,7 +48,7 @@ u32 msm_vidc_output_min_count(struct msm_vidc_inst *inst)
 	if (!is_decode_session(inst) && !is_encode_session(inst))
 		return 0;
 
-	if (is_thumbnail_session(inst) || is_image_session(inst))
+	if (is_thumbnail_session(inst))
 		return 1;
 
 	if (is_decode_session(inst)) {
@@ -69,15 +68,9 @@ u32 msm_vidc_output_min_count(struct msm_vidc_inst *inst)
 		}
 	} else {
 		output_min_count = MIN_ENC_OUTPUT_BUFFERS;
+		//todo: reduce heic count to 2, once HAL side cushion is added
 	}
 
-	//if (is_vpp_delay_allowed(inst)) {
-	//	output_min_count =
-	//		max(output_min_count, (u32)MAX_BSE_VPP_DELAY);
-	//	output_min_count =
-	//		max(output_min_count, (u32)(msm_vidc_vpp_delay & 0x1F));
-	//}
-
 	return output_min_count;
 }
 
@@ -149,9 +142,6 @@ u32 msm_vidc_output_extra_count(struct msm_vidc_inst *inst)
 			count < inst->decode_batch.size)
 			count = inst->decode_batch.size;
 
-	} else if (is_encode_session(inst)) {
-		/* add heif buffers */
-		//count = 8
 	}
 
 	return count;
@@ -189,7 +179,6 @@ u32 msm_vidc_internal_buffer_count(struct msm_vidc_inst *inst,
 			count = 0;
 		}
 	}
-	//todo: add enc support if needed
 
 	return count;
 }