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--){
219 if (!p[-1] && ((p[1] >> (23-prefix_len)) == 1))
return p - 1;
220 else if (!p[ 1] && ((p[2] >> (23-prefix_len)) == 1))
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 };
463 #if CONFIG_RV10_DECODER
466 component = (n <= 3 ? 0 : n - 4 + 1);
473 level = level & 0xff;
486 if((level&0x7F) == 0){
514 if (CONFIG_FLV_DECODER && s->
h263_flv > 1) {
533 last = code >= rl->
last;
577 for (i = 0; i < 6; i++) {
593 if (pb_frame == 2 && c)
606 int16_t
block[6][64])
608 int cbpc, cbpy, i, cbp, pred_x, pred_y, mx, my, dquant;
611 int cbpb = 0, pb_mv_count = 0;
650 cbp = (cbpc & 3) | (cbpy << 2);
656 if ((cbpc & 16) == 0) {
679 if (s->
umvplus && (mx - pred_x) == 1 && (my - pred_y) == 1)
701 if (s->
umvplus && (mx - pred_x) == 1 && (my - pred_y) == 1)
715 mot_val0[0 ]= mot_val0[2 ]= mot_val0[0+2*
stride]= mot_val0[2+2*
stride]=
716 mot_val0[1 ]= mot_val0[3 ]= mot_val0[1+2*
stride]= mot_val0[3+2*
stride]=
717 mot_val1[0 ]= mot_val1[2 ]= mot_val1[0+2*
stride]= mot_val1[2+2*
stride]=
718 mot_val1[1 ]= mot_val1[3 ]= mot_val1[1+2*
stride]= mot_val1[3+2*
stride]= 0;
749 cbp = (cbpc & 3) | (cbpy << 2);
776 mot_val[0 ]= mot_val[2 ]= mot_val[0+2*
stride]= mot_val[2+2*
stride]= mx;
777 mot_val[1 ]= mot_val[3 ]= mot_val[1+2*
stride]= mot_val[3+2*
stride]= my;
789 mot_val[0 ]= mot_val[2 ]= mot_val[0+2*
stride]= mot_val[2+2*
stride]= mx;
790 mot_val[1 ]= mot_val[3 ]= mot_val[1+2*
stride]= mot_val[3+2*
stride]= my;
827 cbp = (cbpc & 3) | (cbpy << 2);
835 while(pb_mv_count--){
841 for (i = 0; i < 6; i++) {
881 startcode = ((startcode << 8) |
get_bits(&s->
gb, 8)) & 0x003FFFFF;
883 if(startcode == 0x20)
887 if (startcode != 0x20) {
920 if (format != 7 && format != 6) {
986 }
else if (ufep != 0) {
1024 av_dlog(s->
avctx,
"\nH.263+ Custom picture: %dx%d\n",width,height);
1037 if ((width == 0) || (height == 0))
1145 for(i=0; i<13; i++){