Mercurial > libavcodec.hg
comparison h263dec.c @ 262:7d941b8c4e84 libavcodec
mpeg4 b-frames :)
create slightly more correct headers & add "ffmpeg" user-data section
author | michaelni |
---|---|
date | Tue, 12 Mar 2002 22:54:25 +0000 |
parents | 75091bfc577b |
children | 252444e5259b |
comparison
equal
deleted
inserted
replaced
261:d6521bbbab5e | 262:7d941b8c4e84 |
---|---|
43 s->first_gob_line = 0; | 43 s->first_gob_line = 0; |
44 break; | 44 break; |
45 case CODEC_ID_MPEG4: | 45 case CODEC_ID_MPEG4: |
46 s->time_increment_bits = 4; /* default value for broken headers */ | 46 s->time_increment_bits = 4; /* default value for broken headers */ |
47 s->h263_pred = 1; | 47 s->h263_pred = 1; |
48 s->has_b_frames = 1; | |
48 break; | 49 break; |
49 case CODEC_ID_MSMPEG4: | 50 case CODEC_ID_MSMPEG4: |
50 s->h263_msmpeg4 = 1; | 51 s->h263_msmpeg4 = 1; |
51 s->h263_pred = 1; | 52 s->h263_pred = 1; |
52 break; | 53 break; |
217 if (s->h263_msmpeg4 && s->pict_type==I_TYPE) | 218 if (s->h263_msmpeg4 && s->pict_type==I_TYPE) |
218 if(msmpeg4_decode_ext_header(s, buf_size) < 0) return -1; | 219 if(msmpeg4_decode_ext_header(s, buf_size) < 0) return -1; |
219 | 220 |
220 MPV_frame_end(s); | 221 MPV_frame_end(s); |
221 | 222 |
222 pict->data[0] = s->current_picture[0]; | 223 if(s->pict_type==B_TYPE){ |
223 pict->data[1] = s->current_picture[1]; | 224 pict->data[0] = s->current_picture[0]; |
224 pict->data[2] = s->current_picture[2]; | 225 pict->data[1] = s->current_picture[1]; |
226 pict->data[2] = s->current_picture[2]; | |
227 } else { | |
228 pict->data[0] = s->last_picture[0]; | |
229 pict->data[1] = s->last_picture[1]; | |
230 pict->data[2] = s->last_picture[2]; | |
231 } | |
225 pict->linesize[0] = s->linesize; | 232 pict->linesize[0] = s->linesize; |
226 pict->linesize[1] = s->linesize / 2; | 233 pict->linesize[1] = s->linesize / 2; |
227 pict->linesize[2] = s->linesize / 2; | 234 pict->linesize[2] = s->linesize / 2; |
228 | 235 |
229 avctx->quality = s->qscale; | 236 avctx->quality = s->qscale; |