Commit 3ab295cd authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* backport [17542] : mpeg2 large frame encoding

* backport [17543] : Fix mpeg2 PTS/DTS for field pictures
parent 17db527b
...@@ -383,6 +383,9 @@ int E_(OpenEncoder)( vlc_object_t *p_this ) ...@@ -383,6 +383,9 @@ int E_(OpenEncoder)( vlc_object_t *p_this )
p_context->width = p_enc->fmt_in.video.i_width; p_context->width = p_enc->fmt_in.video.i_width;
p_context->height = p_enc->fmt_in.video.i_height; p_context->height = p_enc->fmt_in.video.i_height;
if( p_enc->fmt_out.i_codec == VLC_FOURCC('m', 'p', '2', 'v')
&& (p_context->width > 720 || p_context->height > 576) )
p_context->level = 4; /* High level */
#if LIBAVCODEC_BUILD >= 4754 #if LIBAVCODEC_BUILD >= 4754
p_context->time_base.num = p_enc->fmt_in.video.i_frame_rate_base; p_context->time_base.num = p_enc->fmt_in.video.i_frame_rate_base;
...@@ -414,6 +417,8 @@ int E_(OpenEncoder)( vlc_object_t *p_this ) ...@@ -414,6 +417,8 @@ int E_(OpenEncoder)( vlc_object_t *p_this )
p_context->max_b_frames = p_context->max_b_frames =
__MAX( __MIN( p_sys->i_b_frames, FF_MAX_B_FRAMES ), 0 ); __MAX( __MIN( p_sys->i_b_frames, FF_MAX_B_FRAMES ), 0 );
p_context->b_frame_strategy = 0; p_context->b_frame_strategy = 0;
if( !p_context->max_b_frames )
p_context->flags |= CODEC_FLAG_LOW_DELAY;
#if LIBAVCODEC_BUILD >= 4687 #if LIBAVCODEC_BUILD >= 4687
av_reduce( &i_aspect_num, &i_aspect_den, av_reduce( &i_aspect_num, &i_aspect_den,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment