[FFmpeg-devel] [PATCH] bring -qpfile option of x264 to ffmpeg

Michael Niedermayer michaelni
Fri Feb 27 16:25:37 CET 2009


On Fri, Feb 27, 2009 at 10:44:43PM +0800, Ying Bian wrote:
> Hi,
> 
> This is a patch which brings the -qpfile option of x264 to ffmpeg.
> See the help message from "x264 --longhelp":
>       --qpfile <string>       Force frametypes and QPs for some or all
> frames
>                               Format of each line: framenumber frametype QP
>                               QP of -1 lets x264 choose. Frametypes:
> I,i,P,B,b.
> 
> I believe sometimes this is useful.
> 
> - by

> From 2a1f8d36b4895fc00c28bf014756700cf53edf04 Mon Sep 17 00:00:00 2001
> From: ybian <bianying at gmail.com>
> Date: Thu, 26 Feb 2009 02:14:28 +0800
> Subject: [PATCH] bring -qpfile option of x264 to ffmpeg
> 
> ---
>  libavcodec/avcodec.h |    7 +++++++
>  libavcodec/libx264.c |   43 +++++++++++++++++++++++++++++++++++++++++++
>  libavcodec/options.c |    1 +
>  3 files changed, 51 insertions(+), 0 deletions(-)
> 
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index f38ad2b..38d2dd0 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -2315,6 +2315,13 @@ typedef struct AVCodecContext {
>       * - decoding: unused.
>       */
>      float rc_min_vbv_overflow_use;
> +
> +    /**
> +     * qpfile to force frametypes or QPs for some or all frames, only used for libx264
> +     * - encoding: Set by user.
> +     * - decoding: unused.
> +     */
> +    char* qpfile;
>  } AVCodecContext;

lavc does not access files out of design principles ... (its something about
the media file not being a file, there being no disk or such ...)

also setting QPs should be supported over the input AVFrames
its the user apps job (=ffmpeg.c) to read and parse qpfile and
set the fields of the structs.

now i see and agree this would be code duplication between user apps,
and libav could provide helper functions to do such common tasks but that
has to be kept as optional part not as only and mandatory way to
perform something

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090227/ed2271b6/attachment.pgp>



More information about the ffmpeg-devel mailing list