[MPlayer-cvslog] CVS: main/libmpcodecs vf_lavc.c, 1.15, 1.16 ve_lavc.c, 1.112, 1.113
Michael Niedermayer CVS
syncmail at mplayerhq.hu
Sun May 1 00:41:44 CEST 2005
CVS change done by Michael Niedermayer CVS
Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv3388
Modified Files:
vf_lavc.c ve_lavc.c
Log Message:
LIBAVCODEC_BUILD >= 4754
Index: vf_lavc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_lavc.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- vf_lavc.c 9 Nov 2003 23:32:42 -0000 1.15
+++ vf_lavc.c 30 Apr 2005 22:41:41 -0000 1.16
@@ -61,27 +61,39 @@
lavc_venc_context.width = width;
lavc_venc_context.height = height;
+#if LIBAVCODEC_BUILD >= 4754
+ if(!lavc_venc_context.time_base.num){
+#else
if(!lavc_venc_context.frame_rate){
+#endif
// guess FPS:
switch(height){
case 240:
case 480:
+#if LIBAVCODEC_BUILD >= 4754
+ lavc_venc_context.time_base= (AVRational){1001,30000};
+#else
#if LIBAVCODEC_BUILD >= 4662
lavc_venc_context.frame_rate = 30000;
lavc_venc_context.frame_rate_base= 1001;
#else
lavc_venc_context.frame_rate=29.97*FRAME_RATE_BASE; // NTSC
#endif
+#endif
break;
case 576:
case 288:
default:
+#if LIBAVCODEC_BUILD >= 4754
+ lavc_venc_context.time_base= (AVRational){1,25};
+#else
#if LIBAVCODEC_BUILD >= 4662
lavc_venc_context.frame_rate = 25;
lavc_venc_context.frame_rate_base= 1;
#else
lavc_venc_context.frame_rate=25*FRAME_RATE_BASE; // PAL
#endif
+#endif
break;
// lavc_venc_context.frame_rate=vo_fps*FRAME_RATE_BASE; // same as src
}
@@ -191,12 +203,17 @@
// fixed bitrate (in kbits)
lavc_venc_context.bit_rate = 1000*p_quality;
}
+#if LIBAVCODEC_BUILD >= 4754
+ lavc_venc_context.time_base.num = 1000*1001;
+ lavc_venc_context.time_base.den = (p_fps<1.0) ? 0 : (p_fps * lavc_venc_context.time_base.num);
+#else
#if LIBAVCODEC_BUILD >= 4662
lavc_venc_context.frame_rate_base = 1000*1001;
lavc_venc_context.frame_rate = (p_fps<1.0) ? 0 : (p_fps * lavc_venc_context.frame_rate_base);
#else
lavc_venc_context.frame_rate = (p_fps<1.0) ? 0 : (p_fps * FRAME_RATE_BASE);
#endif
+#endif
lavc_venc_context.gop_size = 0; // I-only
return 1;
Index: ve_lavc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_lavc.c,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -r1.112 -r1.113
--- ve_lavc.c 2 Mar 2005 19:28:42 -0000 1.112
+++ ve_lavc.c 30 Apr 2005 22:41:41 -0000 1.113
@@ -349,12 +349,16 @@
else
lavc_venc_context->bit_rate = 800000; /* default */
lavc_venc_context->bit_rate_tolerance= lavc_param_vrate_tolerance*1000;
+#if LIBAVCODEC_BUILD >= 4754
+ lavc_venc_context->time_base= (AVRational){mux_v->h.dwScale, mux_v->h.dwRate};
+#else
#if LIBAVCODEC_BUILD >= 4662
lavc_venc_context->frame_rate = mux_v->h.dwRate;
lavc_venc_context->frame_rate_base = mux_v->h.dwScale;
#else
lavc_venc_context->frame_rate = mux_v->h.dwRate*FRAME_RATE_BASE/mux_v->h.dwScale;
#endif
+#endif
lavc_venc_context->qmin= lavc_param_vqmin;
lavc_venc_context->qmax= lavc_param_vqmax;
#if LIBAVCODEC_BUILD >= 4646
More information about the MPlayer-cvslog
mailing list