summaryrefslogtreecommitdiff
path: root/libavcodec/h263.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-03-18 22:45:37 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-03-18 22:45:37 +0000
commit204b5c9e085100240f493ff31910438403faca5c (patch)
treeb02a79b457ec599480b4a801562d2857411d8d46 /libavcodec/h263.c
parent950b55d3e2a92541737f3bc16c9beb1d92becacd (diff)
h.263 ssm + aic fix by (Maarten Daniels <maarten dot daniels at student dot luc dot ac dot be>)
Originally committed as revision 2905 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h263.c')
-rw-r--r--libavcodec/h263.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/libavcodec/h263.c b/libavcodec/h263.c
index 6c396b3b04..ab10a693be 100644
--- a/libavcodec/h263.c
+++ b/libavcodec/h263.c
@@ -1456,8 +1456,10 @@ static int h263_pred_dc(MpegEncContext * s, int n, uint16_t **dc_val_ptr)
c = dc_val[(x) + (y - 1) * wrap];
/* No prediction outside GOB boundary */
- if (s->first_slice_line && ((n < 2) || (n > 3)))
- c = 1024;
+ if(s->first_slice_line && n!=3){
+ if(n!=2) c= 1024;
+ if(n!=1 && s->mb_x == s->resync_mb_x) a= 1024;
+ }
pred_dc = 1024;
/* just DC prediction */
if (a != 1024 && c != 1024)
@@ -5117,11 +5119,15 @@ int h263_decode_picture_header(MpegEncContext *s)
s->qscale = get_bits(&s->gb, 5);
}
+ s->mb_width = (s->width + 15) / 16;
+ s->mb_height = (s->height + 15) / 16;
+ s->mb_num = s->mb_width * s->mb_height;
+
/* PEI */
while (get_bits1(&s->gb) != 0) {
skip_bits(&s->gb, 8);
}
-
+
if(s->h263_slice_structured){
if (get_bits1(&s->gb) != 1) {
av_log(s->avctx, AV_LOG_ERROR, "SEPB1 marker missing\n");