video: driver: modify internal buffer counts for vp9
modify internal buffer counts for vp9. fix comv and noncomv buffer count to 0 for vp9 as they are not supported for this codec. Change-Id: I5d504128ab587c425d4cd4cfd2059241e8d256aa Signed-off-by: Darshana Patil <darshana@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
4154ca00cf
commit
02346b9728
@@ -600,7 +600,7 @@ int msm_buffer_min_count_iris2(struct msm_vidc_inst *inst,
|
||||
case MSM_VIDC_BUF_NON_COMV:
|
||||
case MSM_VIDC_BUF_LINE:
|
||||
case MSM_VIDC_BUF_PERSIST:
|
||||
count = 1;
|
||||
count = msm_vidc_internal_buffer_count(inst, buffer_type);
|
||||
break;
|
||||
case MSM_VIDC_BUF_DPB:
|
||||
count = msm_buffer_decoder_dpb_count(inst);
|
||||
|
@@ -21,6 +21,8 @@ u32 msm_vidc_input_min_count(struct msm_vidc_inst *inst);
|
||||
u32 msm_vidc_output_min_count(struct msm_vidc_inst *inst);
|
||||
u32 msm_vidc_input_extra_count(struct msm_vidc_inst *inst);
|
||||
u32 msm_vidc_output_extra_count(struct msm_vidc_inst *inst);
|
||||
u32 msm_vidc_internal_buffer_count(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_buffer_type buffer_type);
|
||||
u32 msm_vidc_decoder_input_size(struct msm_vidc_inst *inst);
|
||||
u32 msm_vidc_decoder_output_size(struct msm_vidc_inst *inst);
|
||||
u32 msm_vidc_decoder_input_meta_size(struct msm_vidc_inst *inst);
|
||||
|
@@ -163,6 +163,39 @@ u32 msm_vidc_output_extra_count(struct msm_vidc_inst *inst)
|
||||
return count;
|
||||
}
|
||||
|
||||
u32 msm_vidc_internal_buffer_count(struct msm_vidc_inst *inst,
|
||||
enum msm_vidc_buffer_type buffer_type)
|
||||
{
|
||||
u32 count = 0;
|
||||
|
||||
if (!inst) {
|
||||
d_vpr_e("%s: invalid params\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (is_decode_session(inst)) {
|
||||
if (buffer_type == MSM_VIDC_BUF_BIN ||
|
||||
buffer_type == MSM_VIDC_BUF_LINE ||
|
||||
buffer_type == MSM_VIDC_BUF_PERSIST) {
|
||||
count = 1;
|
||||
} else if (buffer_type == MSM_VIDC_BUF_COMV ||
|
||||
buffer_type == MSM_VIDC_BUF_NON_COMV) {
|
||||
if (inst->codec == MSM_VIDC_HEVC ||
|
||||
inst->codec == MSM_VIDC_H264)
|
||||
count = 1;
|
||||
else
|
||||
count = 0;
|
||||
} else {
|
||||
d_vpr_e("%s: unsupported buffer type %#x\n",
|
||||
__func__, buffer_type);
|
||||
count = 0;
|
||||
}
|
||||
}
|
||||
//todo: add enc support if needed
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
u32 msm_vidc_decoder_input_size(struct msm_vidc_inst *inst)
|
||||
{
|
||||
u32 frame_size, num_mbs;
|
||||
|
Reference in New Issue
Block a user