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--){
218 if (!p[-1] && ((p[1] >> (23-prefix_len)) == 1))
return p - 1;
219 else if (!p[ 1] && ((p[2] >> (23-prefix_len)) == 1))
return p;
252 for(;left>16+1+5+5; left-=8){
286 val = (val - 1) << shift;
299 if (pred < -31 && val < -63)
301 if (pred > 32 && val > 63)
327 code = (sign) ? (pred - code) : (pred + code);
339 int cbpc, i, pred_x, pred_y, mx, my;
356 mot_val[0 ]= mot_val[2 ]=
358 mot_val[1 ]= mot_val[3 ]=
379 if ((cbpc & 16) == 0) {
393 mot_val[0 ]= mot_val[2 ]=
395 mot_val[1 ]= mot_val[3 ]=
410 if (s->
umvplus && (mx - pred_x) == 1 && (my - pred_y) == 1)
429 static const int8_t quant_tab[4] = { -1, -2, 1, 2 };
462 #if CONFIG_RV10_DECODER
465 component = (n <= 3 ? 0 : n - 4 + 1);
472 level = level & 0xff;
485 if((level&0x7F) == 0){
513 if (CONFIG_FLV_DECODER && s->
h263_flv > 1) {
532 last = code >= rl->
last;
576 for (i = 0; i < 6; i++) {
592 if (pb_frame == 2 && c)
605 int16_t
block[6][64])
607 int cbpc, cbpy, i, cbp, pred_x, pred_y, mx, my, dquant;
610 int cbpb = 0, pb_mv_count = 0;
649 cbp = (cbpc & 3) | (cbpy << 2);
655 if ((cbpc & 16) == 0) {
678 if (s->
umvplus && (mx - pred_x) == 1 && (my - pred_y) == 1)
700 if (s->
umvplus && (mx - pred_x) == 1 && (my - pred_y) == 1)
714 mot_val0[0 ]= mot_val0[2 ]= mot_val0[0+2*
stride]= mot_val0[2+2*
stride]=
715 mot_val0[1 ]= mot_val0[3 ]= mot_val0[1+2*
stride]= mot_val0[3+2*
stride]=
716 mot_val1[0 ]= mot_val1[2 ]= mot_val1[0+2*
stride]= mot_val1[2+2*
stride]=
717 mot_val1[1 ]= mot_val1[3 ]= mot_val1[1+2*
stride]= mot_val1[3+2*
stride]= 0;
748 cbp = (cbpc & 3) | (cbpy << 2);
775 mot_val[0 ]= mot_val[2 ]= mot_val[0+2*
stride]= mot_val[2+2*
stride]= mx;
776 mot_val[1 ]= mot_val[3 ]= mot_val[1+2*
stride]= mot_val[3+2*
stride]= my;
788 mot_val[0 ]= mot_val[2 ]= mot_val[0+2*
stride]= mot_val[2+2*
stride]= mx;
789 mot_val[1 ]= mot_val[3 ]= mot_val[1+2*
stride]= mot_val[3+2*
stride]= my;
826 cbp = (cbpc & 3) | (cbpy << 2);
834 while(pb_mv_count--){
840 for (i = 0; i < 6; i++) {
884 startcode = ((startcode << 8) |
get_bits(&s->
gb, 8)) & 0x003FFFFF;
886 if(startcode == 0x20)
890 if (startcode != 0x20) {
923 if (format != 7 && format != 6) {
989 }
else if (ufep != 0) {
1027 av_dlog(s->
avctx,
"\nH.263+ Custom picture: %dx%d\n",width,height);
1041 if ((width == 0) || (height == 0))
1149 for(i=0; i<13; i++){