"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libavcodec/mpegvideo_parser.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.

mpegvideo_parser.c  (libav-12):mpegvideo_parser.c  (libav-12.1)
skipping to change at line 99 skipping to change at line 99
chroma_format = (buf[1] >> 1) & 3; chroma_format = (buf[1] >> 1) & 3;
switch (chroma_format) { switch (chroma_format) {
case 1: pix_fmt = AV_PIX_FMT_YUV420P; break; case 1: pix_fmt = AV_PIX_FMT_YUV420P; break;
case 2: pix_fmt = AV_PIX_FMT_YUV422P; break; case 2: pix_fmt = AV_PIX_FMT_YUV422P; break;
case 3: pix_fmt = AV_PIX_FMT_YUV444P; break; case 3: pix_fmt = AV_PIX_FMT_YUV444P; break;
} }
pc->width |=(horiz_size_ext << 12); pc->width |=(horiz_size_ext << 12);
pc->height |=( vert_size_ext << 12); pc->height |=( vert_size_ext << 12);
avctx->bit_rate += (bit_rate_ext << 18) * 400;
bit_rate_ext <<= 18;
if (bit_rate_ext < INT_MAX / 400 &&
bit_rate_ext * 400 < INT_MAX - avctx->bit_rate) {
avctx->bit_rate += bit_rate_ext * 400;
} else
avctx->bit_rate = 0;
if(did_set_size) if(did_set_size)
ff_set_dimensions(avctx, pc->width, pc->height); ff_set_dimensions(avctx, pc->width, pc->height);
avctx->framerate.num = pc->frame_rate.num * (frame_rate_ ext_n + 1) * 2; avctx->framerate.num = pc->frame_rate.num * (frame_rate_ ext_n + 1) * 2;
avctx->framerate.den = pc->frame_rate.den * (frame_rate_ ext_d + 1); avctx->framerate.den = pc->frame_rate.den * (frame_rate_ ext_d + 1);
avctx->codec_id = AV_CODEC_ID_MPEG2VIDEO; avctx->codec_id = AV_CODEC_ID_MPEG2VIDEO;
} }
break; break;
case 0x8: /* picture coding extension */ case 0x8: /* picture coding extension */
if (bytes_left >= 5) { if (bytes_left >= 5) {
top_field_first = buf[3] & (1 << 7); top_field_first = buf[3] & (1 << 7);
skipping to change at line 153 skipping to change at line 160
if (start_code >= SLICE_MIN_START_CODE && if (start_code >= SLICE_MIN_START_CODE &&
start_code <= SLICE_MAX_START_CODE) start_code <= SLICE_MAX_START_CODE)
goto the_end; goto the_end;
break; break;
} }
} }
the_end: ; the_end: ;
if (pix_fmt != AV_PIX_FMT_NONE) { if (pix_fmt != AV_PIX_FMT_NONE) {
s->format = pix_fmt; s->format = pix_fmt;
s->width = s->coded_width = pc->width; s->width = pc->width;
s->height = s->coded_height = pc->height; s->height = pc->height;
s->coded_width = FFALIGN(pc->width, 16);
s->coded_height = FFALIGN(pc->height, 16);
} }
#if FF_API_AVCTX_TIMEBASE #if FF_API_AVCTX_TIMEBASE
if (avctx->framerate.num) if (avctx->framerate.num)
avctx->time_base = av_inv_q(avctx->framerate); avctx->time_base = av_inv_q(avctx->framerate);
#endif #endif
} }
static int mpegvideo_parse(AVCodecParserContext *s, static int mpegvideo_parse(AVCodecParserContext *s,
AVCodecContext *avctx, AVCodecContext *avctx,
 End of changes. 2 change blocks. 
3 lines changed or deleted 12 lines changed or added

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