MLK-21523-2: VPU Decoder: add timestamp threshold
authorming_qian <ming.qian@nxp.com>
Thu, 25 Apr 2019 02:17:01 +0000 (10:17 +0800)
committerming_qian <ming.qian@nxp.com>
Thu, 25 Apr 2019 02:17:01 +0000 (10:17 +0800)
the timestamp of output stream may be not monotone increasing
there are may be reoder.
driver should use the max timestamp that received
to calculate the timestamp delta.

Signed-off-by: ming_qian <ming.qian@nxp.com>
drivers/mxc/vpu_malone/vpu_b0.c

index efab925..77f8a9d 100644 (file)
@@ -1177,7 +1177,7 @@ static void vpu_dec_receive_ts(struct vpu_ctx *ctx,
        if (input_ts < 0)
                input_ts = TSM_TIMESTAMP_NONE;
 
-       if (input_ts != TSM_TIMESTAMP_NONE)
+       if (input_ts != TSM_TIMESTAMP_NONE && input_ts > ctx->output_ts)
                ctx->output_ts = input_ts;
 
        if (down_interruptible(&ctx->tsm_lock)) {