[FFmpeg-devel] [PATCH] Add AV_QSCALE_TYPE_* and switch all code from FF_QSCALE_TYPE_ to them
Clément Bœsch
u at pkh.me
Fri Nov 15 07:38:53 CET 2013
On Fri, Nov 15, 2013 at 02:36:26AM +0100, Michael Niedermayer wrote:
> qscale_type is needed for the postprocessing filters
> this commit thus moves all code away from the types that are sheduled
> to be removed.
> Alternatively we could keep the FF_ types or equivalent or
> transfer the information differently of course
>
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
> libavcodec/avcodec.h | 4 ++++
> libavcodec/h263dec.c | 4 ++--
> libavcodec/mjpegdec.c | 2 +-
> libavcodec/mpeg12dec.c | 4 ++--
> libavcodec/rv10.c | 4 ++--
> libavcodec/rv34.c | 4 ++--
> libavfilter/vf_spp.c | 8 ++++----
> 7 files changed, 17 insertions(+), 13 deletions(-)
>
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index 67dc49f..23af06c 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -915,6 +915,10 @@ typedef struct AVPanScan{
> int16_t position[3][2];
> }AVPanScan;
>
> +#define AV_QSCALE_TYPE_MPEG1 0
> +#define AV_QSCALE_TYPE_MPEG2 1
> +#define AV_QSCALE_TYPE_H264 2
> +#define AV_QSCALE_TYPE_VP56 3
> #if FF_API_QSCALE_TYPE
> #define FF_QSCALE_TYPE_MPEG1 0
> #define FF_QSCALE_TYPE_MPEG2 1
All of this happens in libavcodec, and the filter already depends on it,
so why not use AVCodecID instead of adding random syms? This would
potentially simplify defining a norm_qscale() callback in those decoders
in a later change.
Yes this would mean another function and deprecate the old, but I think
it's better than exposing new random codec related symbols outside of
codecs themselves.
[...]
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131115/86596274/attachment.asc>
More information about the ffmpeg-devel
mailing list