52 #define H263_MBTYPE_B_VLC_BITS 6
53 #define CBPC_B_VLC_BITS 3
157 unsigned int val, gob_number;
169 for(;left>13; left--){
220 if (!p[-1] && p[1])
return p - 1;
221 else if(!p[ 1] && p[2])
return p;
253 for(;left>16+1+5+5; left-=8){
275 int code, val, sign, shift;
287 val = (val - 1) << shift;
300 if (pred < -31 && val < -63)
302 if (pred > 32 && val > 63)
328 code = (sign) ? (pred - code) : (pred + code);
340 int cbpc, i, pred_x, pred_y, mx, my;
357 mot_val[0 ]= mot_val[2 ]=
359 mot_val[1 ]= mot_val[3 ]=
380 if ((cbpc & 16) == 0) {
394 mot_val[0 ]= mot_val[2 ]=
396 mot_val[1 ]= mot_val[3 ]=
411 if (s->
umvplus && (mx - pred_x) == 1 && (my - pred_y) == 1)
430 static const int8_t quant_tab[4] = { -1, -2, 1, 2 };
447 const uint8_t *scan_table;
463 #if CONFIG_RV10_DECODER
466 component = (n <= 3 ? 0 : n - 4 + 1);
473 level = level & 0xff;
486 if((level&0x7F) == 0){
533 last = code >= rl->
last;
575 for (i = 0; i < 6; i++) {
590 if (pb_frame == 2 && c)
605 int cbpc, cbpy, i, cbp, pred_x, pred_y, mx, my, dquant;
608 int cbpb = 0, pb_mv_count = 0;
647 cbp = (cbpc & 3) | (cbpy << 2);
653 if ((cbpc & 16) == 0) {
676 if (s->
umvplus && (mx - pred_x) == 1 && (my - pred_y) == 1)
698 if (s->
umvplus && (mx - pred_x) == 1 && (my - pred_y) == 1)
712 mot_val0[0 ]= mot_val0[2 ]= mot_val0[0+2*
stride]= mot_val0[2+2*
stride]=
713 mot_val0[1 ]= mot_val0[3 ]= mot_val0[1+2*
stride]= mot_val0[3+2*
stride]=
714 mot_val1[0 ]= mot_val1[2 ]= mot_val1[0+2*
stride]= mot_val1[2+2*
stride]=
715 mot_val1[1 ]= mot_val1[3 ]= mot_val1[1+2*
stride]= mot_val1[3+2*
stride]= 0;
746 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++) {
880 startcode = ((startcode << 8) |
get_bits(&s->
gb, 8)) & 0x003FFFFF;
882 if(startcode == 0x20)
886 if (startcode != 0x20) {
919 if (format != 7 && format != 6) {
981 }
else if (ufep != 0) {
1019 av_dlog(s->
avctx,
"\nH.263+ Custom picture: %dx%d\n",width,height);
1032 if ((width == 0) || (height == 0))
1123 for(i=0; i<13; i++){