30 #define UNCHECKED_BITSTREAM_READER 1
50 #define H263_MBTYPE_B_VLC_BITS 6
51 #define CBPC_B_VLC_BITS 3
105 static volatile int done = 0;
154 unsigned int val, gob_number;
166 for(;left>13; left--){
229 for(;left>16+1+5+5; left-=8){
263 val = (val - 1) << shift;
276 if (pred < -31 && val < -63)
278 if (pred > 32 && val > 63)
304 code = (sign) ? (pred - code) : (pred + code);
316 int cbpc, i, pred_x, pred_y, mx, my;
333 mot_val[0 ]= mot_val[2 ]=
334 mot_val[0+stride]= mot_val[2+stride]= 0;
335 mot_val[1 ]= mot_val[3 ]=
336 mot_val[1+stride]= mot_val[3+stride]= 0;
356 if ((cbpc & 16) == 0) {
370 mot_val[0 ]= mot_val[2 ]=
371 mot_val[0+stride]= mot_val[2+stride]= mx;
372 mot_val[1 ]= mot_val[3 ]=
373 mot_val[1+stride]= mot_val[3+stride]= my;
387 if (s->
umvplus && (mx - pred_x) == 1 && (my - pred_y) == 1)
406 static const int8_t quant_tab[4] = { -1, -2, 1, 2 };
439 #if CONFIG_RV10_DECODER
442 component = (n <= 3 ? 0 : n - 4 + 1);
449 level = level & 0xff;
462 if((level&0x7F) == 0){
490 if (CONFIG_FLV_DECODER && s->
h263_flv > 1) {
509 last = code >= rl->
last;
553 for (i = 0; i < 6; i++) {
569 if (pb_frame == 2 && c)
582 int16_t
block[6][64])
584 int cbpc, cbpy, i, cbp, pred_x, pred_y, mx, my, dquant;
587 int cbpb = 0, pb_mv_count = 0;
626 cbp = (cbpc & 3) | (cbpy << 2);
632 if ((cbpc & 16) == 0) {
655 if (s->
umvplus && (mx - pred_x) == 1 && (my - pred_y) == 1)
677 if (s->
umvplus && (mx - pred_x) == 1 && (my - pred_y) == 1)
691 mot_val0[0 ]= mot_val0[2 ]= mot_val0[0+2*stride]= mot_val0[2+2*stride]=
692 mot_val0[1 ]= mot_val0[3 ]= mot_val0[1+2*stride]= mot_val0[3+2*stride]=
693 mot_val1[0 ]= mot_val1[2 ]= mot_val1[0+2*stride]= mot_val1[2+2*stride]=
694 mot_val1[1 ]= mot_val1[3 ]= mot_val1[1+2*stride]= mot_val1[3+2*stride]= 0;
725 cbp = (cbpc & 3) | (cbpy << 2);
752 mot_val[0 ]= mot_val[2 ]= mot_val[0+2*stride]= mot_val[2+2*stride]= mx;
753 mot_val[1 ]= mot_val[3 ]= mot_val[1+2*stride]= mot_val[3+2*stride]= my;
765 mot_val[0 ]= mot_val[2 ]= mot_val[0+2*stride]= mot_val[2+2*stride]= mx;
766 mot_val[1 ]= mot_val[3 ]= mot_val[1+2*stride]= mot_val[3+2*stride]= my;
803 cbp = (cbpc & 3) | (cbpy << 2);
811 while(pb_mv_count--){
817 for (i = 0; i < 6; i++) {
861 startcode = ((startcode << 8) |
get_bits(&s->
gb, 8)) & 0x003FFFFF;
863 if(startcode == 0x20)
867 if (startcode != 0x20) {
899 if (format != 7 && format != 6) {
965 }
else if (ufep != 0) {
1003 av_dlog(s->
avctx,
"\nH.263+ Custom picture: %dx%d\n",width,height);
1017 if ((width == 0) || (height == 0))
1124 for(i=0; i<13; i++){