30 #define UNCHECKED_BITSTREAM_READER 1
49 #define H263_MBTYPE_B_VLC_BITS 6
50 #define CBPC_B_VLC_BITS 3
104 static volatile int done = 0;
153 unsigned int val, gob_number;
165 for(;left>13; left--){
228 for(;left>16+1+5+5; left-=8){
262 val = (val - 1) << shift;
275 if (pred < -31 && val < -63)
277 if (pred > 32 && val > 63)
303 code = (sign) ? (pred - code) : (pred + code);
315 int cbpc, i, pred_x, pred_y, mx, my;
332 mot_val[0 ]= mot_val[2 ]=
333 mot_val[0+stride]= mot_val[2+stride]= 0;
334 mot_val[1 ]= mot_val[3 ]=
335 mot_val[1+stride]= mot_val[3+stride]= 0;
355 if ((cbpc & 16) == 0) {
369 mot_val[0 ]= mot_val[2 ]=
370 mot_val[0+stride]= mot_val[2+stride]= mx;
371 mot_val[1 ]= mot_val[3 ]=
372 mot_val[1+stride]= mot_val[3+stride]= my;
386 if (s->
umvplus && (mx - pred_x) == 1 && (my - pred_y) == 1)
405 static const int8_t quant_tab[4] = { -1, -2, 1, 2 };
438 #if CONFIG_RV10_DECODER
441 component = (n <= 3 ? 0 : n - 4 + 1);
448 level = level & 0xff;
461 if((level&0x7F) == 0){
489 if (CONFIG_FLV_DECODER && s->
h263_flv > 1) {
508 last = code >= rl->
last;
552 for (i = 0; i < 6; i++) {
568 if (pb_frame == 2 && c)
581 int16_t
block[6][64])
583 int cbpc, cbpy, i, cbp, pred_x, pred_y, mx, my, dquant;
586 int cbpb = 0, pb_mv_count = 0;
625 cbp = (cbpc & 3) | (cbpy << 2);
631 if ((cbpc & 16) == 0) {
654 if (s->
umvplus && (mx - pred_x) == 1 && (my - pred_y) == 1)
676 if (s->
umvplus && (mx - pred_x) == 1 && (my - pred_y) == 1)
690 mot_val0[0 ]= mot_val0[2 ]= mot_val0[0+2*stride]= mot_val0[2+2*stride]=
691 mot_val0[1 ]= mot_val0[3 ]= mot_val0[1+2*stride]= mot_val0[3+2*stride]=
692 mot_val1[0 ]= mot_val1[2 ]= mot_val1[0+2*stride]= mot_val1[2+2*stride]=
693 mot_val1[1 ]= mot_val1[3 ]= mot_val1[1+2*stride]= mot_val1[3+2*stride]= 0;
724 cbp = (cbpc & 3) | (cbpy << 2);
751 mot_val[0 ]= mot_val[2 ]= mot_val[0+2*stride]= mot_val[2+2*stride]= mx;
752 mot_val[1 ]= mot_val[3 ]= mot_val[1+2*stride]= mot_val[3+2*stride]= my;
764 mot_val[0 ]= mot_val[2 ]= mot_val[0+2*stride]= mot_val[2+2*stride]= mx;
765 mot_val[1 ]= mot_val[3 ]= mot_val[1+2*stride]= mot_val[3+2*stride]= my;
802 cbp = (cbpc & 3) | (cbpy << 2);
810 while(pb_mv_count--){
816 for (i = 0; i < 6; i++) {
860 startcode = ((startcode << 8) |
get_bits(&s->
gb, 8)) & 0x003FFFFF;
862 if(startcode == 0x20)
866 if (startcode != 0x20) {
898 if (format != 7 && format != 6) {
964 }
else if (ufep != 0) {
1002 av_dlog(s->
avctx,
"\nH.263+ Custom picture: %dx%d\n",width,height);
1016 if ((width == 0) || (height == 0))
1123 for(i=0; i<13; i++){