aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/fsl-mm-core/imx-lib/0001-ENGR00156800-vpu-Fix-decoding-mp4PackedPBFrame-strea.patch
blob: 4fa3d8be248b5aa92a499f119cef318e7f65a345 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 3bca9e128dd82e69f877e90c1bcd614c48a75161 Mon Sep 17 00:00:00 2001
From: Sammy He <r62914@freescale.com>
Date: Thu, 15 Sep 2011 22:40:10 +0800
Subject: [PATCH 1/3] ENGR00156800 vpu: Fix decoding mp4PackedPBFrame stream failure issue

Decoding the stream with mp4PackedPBFrame is failure due to write
point in bitstream set wrong.
This patch will fix it.

Signed-off-by: Sammy He <r62914@freescale.com>
---
 vpu/vpu_lib.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/vpu/vpu_lib.c b/vpu/vpu_lib.c
index a5522fa..32d44b2 100644
--- a/vpu/vpu_lib.c
+++ b/vpu/vpu_lib.c
@@ -3552,6 +3552,9 @@ RetCode vpu_DecGetOutputInfo(DecHandle handle, DecOutputInfo * info)
 		info->notSufficientSliceBuffer = (val >> 2) & 0x1;
 	} else if (pCodecInst->codecMode == MP4_DEC) {
 		info->mp4PackedPBframe = ((val >> 16) & 0x01);
+		/* Need to backup WR_PTR for mp4PackedPBframe */
+		if (info->mp4PackedPBframe)
+			pCodecInst->ctxRegs[CTX_BIT_WR_PTR] = VpuReadReg(BIT_WR_PTR);
 	}
 
 	val = VpuReadReg(RET_DEC_PIC_SIZE);     /* decoding picture size */
-- 
1.7.1