Merge "msm: vidc: Select UBWC statistic parameters appropriately"
This commit is contained in:
commit
b2f7549df3
2 changed files with 16 additions and 4 deletions
|
|
@ -114,14 +114,18 @@ static int fill_dynamic_stats(struct msm_vidc_inst *inst,
|
|||
{
|
||||
struct recon_buf *binfo, *nextb;
|
||||
struct vidc_input_cr_data *temp, *next;
|
||||
u32 min_cf = 0, max_cf = 0;
|
||||
u32 min_input_cr = 0, max_input_cr = 0, min_cr = 0, max_cr = 0;
|
||||
u32 max_cr = 0, max_cf = 0, max_input_cr = 0;
|
||||
u32 min_cr = MSM_VIDC_MAX_UBWC_COMPRESSION_RATIO;
|
||||
u32 min_input_cr = MSM_VIDC_MAX_UBWC_COMPRESSION_RATIO;
|
||||
u32 min_cf = MSM_VIDC_MAX_UBWC_COMPLEXITY_FACTOR;
|
||||
|
||||
mutex_lock(&inst->reconbufs.lock);
|
||||
list_for_each_entry_safe(binfo, nextb, &inst->reconbufs.list, list) {
|
||||
min_cr = min(min_cr, binfo->CR);
|
||||
if (binfo->CR)
|
||||
min_cr = min(min_cr, binfo->CR);
|
||||
if (binfo->CF)
|
||||
min_cf = min(min_cf, binfo->CF);
|
||||
max_cr = max(max_cr, binfo->CR);
|
||||
min_cf = min(min_cf, binfo->CF);
|
||||
max_cf = max(max_cf, binfo->CF);
|
||||
}
|
||||
mutex_unlock(&inst->reconbufs.lock);
|
||||
|
|
|
|||
|
|
@ -2035,6 +2035,7 @@ static void handle_session_flush(enum hal_command_response cmd, void *data)
|
|||
struct msm_vidc_cb_cmd_done *response = data;
|
||||
struct msm_vidc_inst *inst;
|
||||
struct v4l2_event flush_event = {0};
|
||||
struct recon_buf *binfo;
|
||||
u32 *ptr = NULL;
|
||||
enum hal_flush flush_type;
|
||||
int rc;
|
||||
|
|
@ -2089,6 +2090,13 @@ static void handle_session_flush(enum hal_command_response cmd, void *data)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
mutex_lock(&inst->reconbufs.lock);
|
||||
list_for_each_entry(binfo, &inst->reconbufs.list, list) {
|
||||
binfo->CR = 0;
|
||||
binfo->CF = 0;
|
||||
}
|
||||
mutex_unlock(&inst->reconbufs.lock);
|
||||
|
||||
dprintk(VIDC_DBG,
|
||||
"Notify flush complete, flush_type: %x\n", flush_type);
|
||||
v4l2_event_queue_fh(&inst->event_handler, &flush_event);
|
||||
|
|
|
|||
Loading…
Reference in a new issue