mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-13 12:53:41 +08:00
[m2vd]: revise predict mpeg2 pts when error detection
when preframe_period is zero use frame_period instead Change-Id: Id1b706bd01eeb4bce4da1bf564c9197b120aef11 Signed-off-by: linyuhui <james.lin@rock-chips.com>
This commit is contained in:
@@ -1053,7 +1053,8 @@ MPP_RET m2vd_alloc_frame(M2VDParserContext *ctx)
|
|||||||
|
|
||||||
if ((pts > ctx->PreGetFrameTime) && (ctx->pic_head.temporal_reference > (RK_S32)ctx->PreChangeTime_index)) {
|
if ((pts > ctx->PreGetFrameTime) && (ctx->pic_head.temporal_reference > (RK_S32)ctx->PreChangeTime_index)) {
|
||||||
RK_S32 theshold_frame_period = tmp_frame_period * 2 ;
|
RK_S32 theshold_frame_period = tmp_frame_period * 2 ;
|
||||||
RK_S32 predict_frame_period = (ctx->pic_head.temporal_reference - ctx->PreChangeTime_index) * ctx->preframe_period / 256;
|
RK_S32 last_frame_period = ctx->preframe_period ? ctx->preframe_period : ctx->frame_period;
|
||||||
|
RK_S32 predict_frame_period = (ctx->pic_head.temporal_reference - ctx->PreChangeTime_index) * last_frame_period / 256;
|
||||||
if (theshold_frame_period < predict_frame_period) {
|
if (theshold_frame_period < predict_frame_period) {
|
||||||
pts = ctx->PreGetFrameTime + predict_frame_period;
|
pts = ctx->PreGetFrameTime + predict_frame_period;
|
||||||
tmp_frame_period = predict_frame_period;
|
tmp_frame_period = predict_frame_period;
|
||||||
|
Reference in New Issue
Block a user