From 5aa6380d454628faaed51e06f1b243e082bd64f6 Mon Sep 17 00:00:00 2001 From: michael Date: Mon, 19 May 2003 13:40:50 +0000 Subject: [PATCH] FFASV1 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10132 b3059339-0415-0410-9bf9-f77b7e298cf2 --- etc/codecs.conf | 8 ++++++++ libmpcodecs/vd_ffmpeg.c | 4 +++- libmpcodecs/ve_lavc.c | 11 +++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/etc/codecs.conf b/etc/codecs.conf index 28e841ac5e..6b3435cdea 100644 --- a/etc/codecs.conf +++ b/etc/codecs.conf @@ -265,6 +265,14 @@ videocodec ffhuffyuv out YUY2,422P,YV12 out BGR32,BGR24 +videocodec ffasv1 + info "ASUS V1" + status working + fourcc ASV1 + driver ffmpeg + dll asv1 + out YV12,I420,IYUV + videocodec ffsvq1 info "FFmpeg Sorenson Video v1" status working diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index cd1e635a0c..facb50f36d 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -244,7 +244,9 @@ static int init(sh_video_t *sh){ (sh->format == mmioFOURCC('M','4','S','2') || sh->format == mmioFOURCC('M','P','4','S') || sh->format == mmioFOURCC('H','F','Y','U') || - sh->format == mmioFOURCC('W','M','V','2') + sh->format == mmioFOURCC('W','M','V','2') || + sh->format == mmioFOURCC('A','S','V','1') || + sh->format == mmioFOURCC('V','S','S','H') )) { avctx->extradata_size = sh->bih->biSize-sizeof(BITMAPINFOHEADER); diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c index f9c696ec8e..c258e9bfb7 100644 --- a/libmpcodecs/ve_lavc.c +++ b/libmpcodecs/ve_lavc.c @@ -452,6 +452,9 @@ static int config(struct vf_instance_s* vf, { printf("Using constant qscale = %d (VBR)\n", lavc_param_vqscale); lavc_venc_context->flags |= CODEC_FLAG_QSCALE; +#if LIBAVCODEC_BUILD >= 4668 + lavc_venc_context->global_quality= FF_QUALITY_SCALE * lavc_param_vqscale; +#endif vf->priv->pic->quality = lavc_param_vqscale; } @@ -640,6 +643,12 @@ static int vf_open(vf_instance_t *vf, char* args){ memset(mux_v->bih, 0, sizeof(BITMAPINFOHEADER)+1000); mux_v->bih->biSize=sizeof(BITMAPINFOHEADER)+1000; } + else if (lavc_param_vcodec && !strcasecmp(lavc_param_vcodec, "asv1")) + { + mux_v->bih=malloc(sizeof(BITMAPINFOHEADER)+8); + memset(mux_v->bih, 0, sizeof(BITMAPINFOHEADER)+8); + mux_v->bih->biSize=sizeof(BITMAPINFOHEADER)+8; + } else if (lavc_param_vcodec && !strcasecmp(lavc_param_vcodec, "wmv2")) { mux_v->bih=malloc(sizeof(BITMAPINFOHEADER)+4); @@ -682,6 +691,8 @@ static int vf_open(vf_instance_t *vf, char* args){ mux_v->bih->biCompression = mmioFOURCC('W', 'M', 'V', '2'); else if (!strcasecmp(lavc_param_vcodec, "huffyuv")) mux_v->bih->biCompression = mmioFOURCC('H', 'F', 'Y', 'U'); + else if (!strcasecmp(lavc_param_vcodec, "asv1")) + mux_v->bih->biCompression = mmioFOURCC('A', 'S', 'V', '1'); else mux_v->bih->biCompression = mmioFOURCC(lavc_param_vcodec[0], lavc_param_vcodec[1], lavc_param_vcodec[2], lavc_param_vcodec[3]); /* FIXME!!! */