comparison h263dec.c @ 345:e05b357a398a libavcodec

export mbskip_table for direct rendering add hurry_up support
author michaelni
date Sat, 27 Apr 2002 13:12:57 +0000
parents 9f6071a87e17
children 3c5266cda02d
comparison
equal deleted inserted replaced
344:9f6071a87e17 345:e05b357a398a
72 break; 72 break;
73 default: 73 default:
74 return -1; 74 return -1;
75 } 75 }
76 s->codec_id= avctx->codec->id; 76 s->codec_id= avctx->codec->id;
77 avctx->mbskip_table= s->mbskip_table;
77 78
78 /* for h263, we allocate the images after having read the header */ 79 /* for h263, we allocate the images after having read the header */
79 if (avctx->codec->id != CODEC_ID_H263 && avctx->codec->id != CODEC_ID_MPEG4) 80 if (avctx->codec->id != CODEC_ID_H263 && avctx->codec->id != CODEC_ID_MPEG4)
80 if (MPV_common_init(s) < 0) 81 if (MPV_common_init(s) < 0)
81 return -1; 82 return -1;
106 107
107 #ifdef DEBUG 108 #ifdef DEBUG
108 printf("*****frame %d size=%d\n", avctx->frame_number, buf_size); 109 printf("*****frame %d size=%d\n", avctx->frame_number, buf_size);
109 printf("bytes=%x %x %x %x\n", buf[0], buf[1], buf[2], buf[3]); 110 printf("bytes=%x %x %x %x\n", buf[0], buf[1], buf[2], buf[3]);
110 #endif 111 #endif
112
113 s->hurry_up= avctx->hurry_up;
111 114
112 /* no supplementary picture */ 115 /* no supplementary picture */
113 if (buf_size == 0) { 116 if (buf_size == 0) {
114 *data_size = 0; 117 *data_size = 0;
115 return 0; 118 return 0;
152 if(ret==FRAME_SKIPED) return 0; 155 if(ret==FRAME_SKIPED) return 0;
153 if (ret < 0) 156 if (ret < 0)
154 return -1; 157 return -1;
155 /* skip b frames if we dont have reference frames */ 158 /* skip b frames if we dont have reference frames */
156 if(s->num_available_buffers<2 && s->pict_type==B_TYPE) return 0; 159 if(s->num_available_buffers<2 && s->pict_type==B_TYPE) return 0;
160 /* skip b frames if we are in a hurry */
161 if(s->hurry_up && s->pict_type==B_TYPE) return 0;
157 162
158 MPV_frame_start(s); 163 MPV_frame_start(s);
159 164
160 #ifdef DEBUG 165 #ifdef DEBUG
161 printf("qscale=%d\n", s->qscale); 166 printf("qscale=%d\n", s->qscale);