diff options
Diffstat (limited to 'libmpcodecs/ve_lavc.c')
-rw-r--r-- | libmpcodecs/ve_lavc.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c index 0dd725506a..064d34b5f0 100644 --- a/libmpcodecs/ve_lavc.c +++ b/libmpcodecs/ve_lavc.c @@ -31,7 +31,6 @@ #include "config.h" #include "mp_msg.h" -#include "help_mp.h" #include "av_opts.h" #include "osdep/strsep.h" @@ -345,9 +344,9 @@ struct vf_priv_s { #define mux_v (vf->priv->mux) #define lavc_venc_context (vf->priv->context) -static int encode_frame(struct vf_instance *vf, AVFrame *pic, double pts); +static int encode_frame(struct vf_instance* vf, AVFrame *pic, double pts); -static int config(struct vf_instance *vf, +static int config(struct vf_instance* vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt){ int size, i; @@ -551,7 +550,7 @@ static int config(struct vf_instance *vf, lavc_venc_context->flags = 0; if (lavc_param_mb_decision) { - mp_msg(MSGT_MENCODER, MSGL_INFO, MSGTR_MPCODECS_HighQualityEncodingSelected); + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "[VE_LAVC] High quality encoding selected (non-realtime)!\n"); lavc_venc_context->mb_decision= lavc_param_mb_decision; } @@ -682,7 +681,7 @@ static int config(struct vf_instance *vf, /* fixed qscale :p */ if (lavc_param_vqscale >= 0.0) { - mp_msg(MSGT_MENCODER, MSGL_INFO, MSGTR_MPCODECS_UsingConstantQscale, lavc_param_vqscale); + mp_tmsg(MSGT_MENCODER, MSGL_INFO, "[VE_LAVC] Using constant qscale = %f (VBR).\n", lavc_param_vqscale); lavc_venc_context->flags |= CODEC_FLAG_QSCALE; lavc_venc_context->global_quality= vf->priv->pic->quality = (int)(FF_QP2LAMBDA * lavc_param_vqscale + 0.5); @@ -692,7 +691,7 @@ static int config(struct vf_instance *vf, avcodec_thread_init(lavc_venc_context, lavc_param_threads); if (avcodec_open(lavc_venc_context, vf->priv->codec) != 0) { - mp_msg(MSGT_MENCODER,MSGL_ERR,MSGTR_CantOpenCodec); + mp_tmsg(MSGT_MENCODER,MSGL_ERR,"Could not open codec.\n"); return 0; } @@ -716,7 +715,7 @@ static int config(struct vf_instance *vf, return 1; } -static int control(struct vf_instance *vf, int request, void* data){ +static int control(struct vf_instance* vf, int request, void* data){ switch(request){ case VFCTRL_FLUSH_FRAMES: @@ -728,7 +727,7 @@ static int control(struct vf_instance *vf, int request, void* data){ } } -static int query_format(struct vf_instance *vf, unsigned int fmt){ +static int query_format(struct vf_instance* vf, unsigned int fmt){ switch(fmt){ case IMGFMT_YV12: case IMGFMT_IYUV: @@ -765,7 +764,7 @@ static double psnr(double d){ return -10.0*log(d)/log(10); } -static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ +static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){ AVFrame *pic= vf->priv->pic; pic->data[0]=mpi->planes[0]; @@ -788,7 +787,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){ return encode_frame(vf, pic, pts) >= 0; } -static int encode_frame(struct vf_instance *vf, AVFrame *pic, double pts){ +static int encode_frame(struct vf_instance* vf, AVFrame *pic, double pts){ const char pict_type_char[5]= {'?', 'I', 'P', 'B', 'S'}; int out_size; double dts; @@ -893,7 +892,7 @@ static int encode_frame(struct vf_instance *vf, AVFrame *pic, double pts){ return out_size; } -static void uninit(struct vf_instance *vf){ +static void uninit(struct vf_instance* vf){ if(lavc_param_psnr){ double f= lavc_venc_context->width*lavc_venc_context->height*255.0*255.0; @@ -1041,7 +1040,7 @@ static int vf_open(vf_instance_t *vf, char* args){ vf->priv->codec = (AVCodec *)avcodec_find_encoder_by_name(lavc_param_vcodec); if (!vf->priv->codec) { - mp_msg(MSGT_MENCODER,MSGL_ERR,MSGTR_MissingLAVCcodec, lavc_param_vcodec); + mp_tmsg(MSGT_MENCODER,MSGL_ERR,"Cannot find codec '%s' in libavcodec...\n", lavc_param_vcodec); return 0; } |