Эх сурвалжийг харах

video: driver: sort input timestamp for ts_reorder case

For timestamp reorder feature, input ts is propagated to
output as it is. This is to ensure if app queues linear
order ts for bframe enabled case, it will make sure to
avoid jumbled output ts(due to DPB reordering). But looks
like client requirement is to always get sorted output
timestamp. So added change to produce output ts always
in sorted order.

Change-Id: I1f7778c99e7acfb07103ff226f2bdf306a4c2fb9
Signed-off-by: Govindaraj Rajagopal <[email protected]>
Govindaraj Rajagopal 3 жил өмнө
parent
commit
0a59d13e9d

+ 4 - 1
driver/vidc/src/msm_vidc_driver.c

@@ -2408,6 +2408,7 @@ int msm_vidc_update_timestamp(struct msm_vidc_inst *inst, u64 timestamp)
 int msm_vidc_ts_reorder_insert_timestamp(struct msm_vidc_inst *inst, u64 timestamp)
 {
 	struct msm_vidc_timestamp *ts;
+	int rc = 0;
 
 	if (!inst) {
 		d_vpr_e("%s: Invalid params\n", __func__);
@@ -2424,8 +2425,10 @@ int msm_vidc_ts_reorder_insert_timestamp(struct msm_vidc_inst *inst, u64 timesta
 	/* initialize ts node */
 	INIT_LIST_HEAD(&ts->sort.list);
 	ts->sort.val = timestamp;
+	rc = msm_vidc_insert_sort(&inst->ts_reorder.list, &ts->sort);
+	if (rc)
+		return rc;
 	inst->ts_reorder.count++;
-	list_add_tail(&ts->sort.list, &inst->ts_reorder.list);
 
 	return 0;
 }