[libav-devel] [PATCH] [v2] dsputil: Split off H.263 bits into their own H263DSPContext

Martin Storsjö martin at martin.st
Thu Nov 7 14:25:25 CET 2013


On Tue, 5 Nov 2013, Diego Biurrun wrote:

> ---
>
> Adjusted the bits in configure so that mpegvideo now automatically
> selects h263dsp.  Given that the h263dsp init is called unconditionally
> from mpegvideo.c, this is the correct solution.

Given that h263dsp init is called unconditionally from mpegvideo.c, this 
is the correct solution yes.

The question the other way around is, does this have to be initialized 
unconditionally from within mpegvideo.c, when it could be initialized e.g. 
in ff_h263_decode_init (and something similar for the encoder as well)? 
That would allow untangling these functions from mpegvideo (even though 
the struct might be kept in the mpegvideo contexts), to avoid including 
them in some builds.

What, if any, components are there that include mpegvideo but don't depend 
on the h263 decoder?

> configure                     |    3 +-
> libavcodec/Makefile           |    1 +
> libavcodec/dsputil.c          |   79 ------------------------------
> libavcodec/dsputil.h          |    3 --
> libavcodec/h263.c             |   33 +++++++------
> libavcodec/h263data.h         |    5 --
> libavcodec/h263dsp.c          |  108 +++++++++++++++++++++++++++++++++++++++++
> libavcodec/h263dsp.h          |   34 +++++++++++++
> libavcodec/mpegvideo.c        |    1 +
> libavcodec/mpegvideo.h        |    3 +-
> libavcodec/x86/Makefile       |    4 +-
> libavcodec/x86/dsputil_init.c |    8 ---
> libavcodec/x86/h263dsp_init.c |   39 +++++++++++++++
> 13 files changed, 206 insertions(+), 115 deletions(-)
> create mode 100644 libavcodec/h263dsp.c
> create mode 100644 libavcodec/h263dsp.h
> create mode 100644 libavcodec/x86/h263dsp_init.c

The patch itself looks good, except for the place where it's initialized.

// Martin


More information about the libav-devel mailing list