aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-10 23:20:47 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-10 23:23:27 +0100
commit623184afa218fbe3cc506cffb1aaa4e3940c3630 (patch)
treed94415d79c431ac19de7d59935d27de7db3d03a3
parentc3bb3334f6837025fb23d5bcd29ba094aa368c6b (diff)
downloadffmpeg-623184afa218fbe3cc506cffb1aaa4e3940c3630.tar.gz
itu H.263: Fix handling of PB blocks
This fixes artifacts in Ticket744 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/ituh263dec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
index 6c95636ab8..44b13aa5ed 100644
--- a/libavcodec/ituh263dec.c
+++ b/libavcodec/ituh263dec.c
@@ -566,11 +566,13 @@ static int h263_skip_b_part(MpegEncContext *s, int cbp)
{
LOCAL_ALIGNED_16(DCTELEM, dblock, [64]);
int i, mbi;
+ int bli[6];
/* we have to set s->mb_intra to zero to decode B-part of PB-frame correctly
* but real value should be restored in order to be used later (in OBMC condition)
*/
mbi = s->mb_intra;
+ memcpy(bli, s->block_last_index, sizeof(bli));
s->mb_intra = 0;
for (i = 0; i < 6; i++) {
if (h263_decode_block(s, dblock, i, cbp&32) < 0)
@@ -578,6 +580,7 @@ static int h263_skip_b_part(MpegEncContext *s, int cbp)
cbp+=cbp;
}
s->mb_intra = mbi;
+ memcpy(s->block_last_index, bli, sizeof(bli));
return 0;
}