Commit 623184af authored by Michael Niedermayer's avatar Michael Niedermayer

itu H.263: Fix handling of PB blocks

This fixes artifacts in Ticket744
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c3bb3334
...@@ -566,11 +566,13 @@ static int h263_skip_b_part(MpegEncContext *s, int cbp) ...@@ -566,11 +566,13 @@ static int h263_skip_b_part(MpegEncContext *s, int cbp)
{ {
LOCAL_ALIGNED_16(DCTELEM, dblock, [64]); LOCAL_ALIGNED_16(DCTELEM, dblock, [64]);
int i, mbi; int i, mbi;
int bli[6];
/* we have to set s->mb_intra to zero to decode B-part of PB-frame correctly /* 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) * but real value should be restored in order to be used later (in OBMC condition)
*/ */
mbi = s->mb_intra; mbi = s->mb_intra;
memcpy(bli, s->block_last_index, sizeof(bli));
s->mb_intra = 0; s->mb_intra = 0;
for (i = 0; i < 6; i++) { for (i = 0; i < 6; i++) {
if (h263_decode_block(s, dblock, i, cbp&32) < 0) if (h263_decode_block(s, dblock, i, cbp&32) < 0)
...@@ -578,6 +580,7 @@ static int h263_skip_b_part(MpegEncContext *s, int cbp) ...@@ -578,6 +580,7 @@ static int h263_skip_b_part(MpegEncContext *s, int cbp)
cbp+=cbp; cbp+=cbp;
} }
s->mb_intra = mbi; s->mb_intra = mbi;
memcpy(s->block_last_index, bli, sizeof(bli));
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment