"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libavcodec/mpeg12dec.c" between
libav-12.tar.gz and libav-12.1.tar.gz

About: libav provides cross-platform tools ("avconv") and libraries to convert, manipulate and stream a wide range of multimedia (audio and video) formats and protocols.

mpeg12dec.c  (libav-12):mpeg12dec.c  (libav-12.1)
skipping to change at line 1360 skipping to change at line 1360
skip_bits(&s->gb, 1); /* profile and level esc*/ skip_bits(&s->gb, 1); /* profile and level esc*/
s->avctx->profile = get_bits(&s->gb, 3); s->avctx->profile = get_bits(&s->gb, 3);
s->avctx->level = get_bits(&s->gb, 4); s->avctx->level = get_bits(&s->gb, 4);
s->progressive_sequence = get_bits1(&s->gb); /* progressive_sequence */ s->progressive_sequence = get_bits1(&s->gb); /* progressive_sequence */
s->chroma_format = get_bits(&s->gb, 2); /* chroma_format 1=420, 2=422 , 3=444 */ s->chroma_format = get_bits(&s->gb, 2); /* chroma_format 1=420, 2=422 , 3=444 */
horiz_size_ext = get_bits(&s->gb, 2); horiz_size_ext = get_bits(&s->gb, 2);
vert_size_ext = get_bits(&s->gb, 2); vert_size_ext = get_bits(&s->gb, 2);
s->width |= (horiz_size_ext << 12); s->width |= (horiz_size_ext << 12);
s->height |= (vert_size_ext << 12); s->height |= (vert_size_ext << 12);
bit_rate_ext = get_bits(&s->gb, 12); /* XXX: handle it */
s->bit_rate += (bit_rate_ext << 18) * 400; bit_rate_ext = get_bits(&s->gb, 12) << 18;
if (bit_rate_ext < INT_MAX / 400 &&
bit_rate_ext * 400 < INT_MAX - s->bit_rate) {
s->bit_rate += bit_rate_ext * 400;
} else {
av_log(s->avctx, AV_LOG_WARNING, "Invalid bit rate extension value: %d\n
",
bit_rate_ext >> 18);
s->bit_rate = 0;
}
skip_bits1(&s->gb); /* marker */ skip_bits1(&s->gb); /* marker */
s->avctx->rc_buffer_size += get_bits(&s->gb, 8) * 1024 * 16 << 10; s->avctx->rc_buffer_size += get_bits(&s->gb, 8) * 1024 * 16 << 10;
s->low_delay = get_bits1(&s->gb); s->low_delay = get_bits1(&s->gb);
if (s->avctx->flags & AV_CODEC_FLAG_LOW_DELAY) if (s->avctx->flags & AV_CODEC_FLAG_LOW_DELAY)
s->low_delay = 1; s->low_delay = 1;
s1->frame_rate_ext.num = get_bits(&s->gb, 2) + 1; s1->frame_rate_ext.num = get_bits(&s->gb, 2) + 1;
s1->frame_rate_ext.den = get_bits(&s->gb, 5) + 1; s1->frame_rate_ext.den = get_bits(&s->gb, 5) + 1;
skipping to change at line 1529 skipping to change at line 1538
av_log(s->avctx, AV_LOG_ERROR, av_log(s->avctx, AV_LOG_ERROR,
"picture_structure %d invalid, ignoring\n", "picture_structure %d invalid, ignoring\n",
s->picture_structure); s->picture_structure);
s->picture_structure = PICT_FRAME; s->picture_structure = PICT_FRAME;
} }
if (s->progressive_sequence && !s->frame_pred_frame_dct) if (s->progressive_sequence && !s->frame_pred_frame_dct)
av_log(s->avctx, AV_LOG_WARNING, "invalid frame_pred_frame_dct\n"); av_log(s->avctx, AV_LOG_WARNING, "invalid frame_pred_frame_dct\n");
if (s->picture_structure == PICT_FRAME) { if (s->picture_structure == PICT_FRAME) {
s->first_field = 0;
s->v_edge_pos = 16 * s->mb_height; s->v_edge_pos = 16 * s->mb_height;
} else { } else {
s->first_field ^= 1;
s->v_edge_pos = 8 * s->mb_height; s->v_edge_pos = 8 * s->mb_height;
memset(s->mbskip_table, 0, s->mb_stride * s->mb_height); memset(s->mbskip_table, 0, s->mb_stride * s->mb_height);
} }
if (s->alternate_scan) { if (s->alternate_scan) {
ff_init_scantable(s->idsp.idct_permutation, &s->inter_scantable, ff_alte rnate_vertical_scan); ff_init_scantable(s->idsp.idct_permutation, &s->inter_scantable, ff_alte rnate_vertical_scan);
ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable, ff_alte rnate_vertical_scan); ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable, ff_alte rnate_vertical_scan);
} else { } else {
ff_init_scantable(s->idsp.idct_permutation, &s->inter_scantable, ff_zigz ag_direct); ff_init_scantable(s->idsp.idct_permutation, &s->inter_scantable, ff_zigz ag_direct);
ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable, ff_zigz ag_direct); ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable, ff_zigz ag_direct);
skipping to change at line 1563 skipping to change at line 1570
ff_dlog(s->avctx, "frame_pred_frame_dct=%d\n", s->frame_pred_frame_dct); ff_dlog(s->avctx, "frame_pred_frame_dct=%d\n", s->frame_pred_frame_dct);
ff_dlog(s->avctx, "progressive_frame=%d\n", s->progressive_frame); ff_dlog(s->avctx, "progressive_frame=%d\n", s->progressive_frame);
} }
static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size) static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size)
{ {
AVCodecContext *avctx = s->avctx; AVCodecContext *avctx = s->avctx;
Mpeg1Context *s1 = (Mpeg1Context *) s; Mpeg1Context *s1 = (Mpeg1Context *) s;
int ret; int ret;
if (s->picture_structure == PICT_FRAME)
s->first_field = 0;
else
s->first_field ^= 1;
/* start frame decoding */ /* start frame decoding */
if (s->first_field || s->picture_structure == PICT_FRAME) { if (s->first_field || s->picture_structure == PICT_FRAME) {
AVFrameSideData *pan_scan; AVFrameSideData *pan_scan;
if ((ret = ff_mpv_frame_start(s, avctx)) < 0) if ((ret = ff_mpv_frame_start(s, avctx)) < 0)
return ret; return ret;
ff_mpeg_er_frame_start(s); ff_mpeg_er_frame_start(s);
/* first check if we must repeat the frame */ /* first check if we must repeat the frame */
 End of changes. 4 change blocks. 
4 lines changed or deleted 17 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS