[FFmpeg-devel] [PATCH 1/2] avcodec/libdcadec: export matrix encoding side data

Michael Niedermayer michaelni at gmx.at
Tue Jul 7 18:23:22 CEST 2015


On Tue, Jul 07, 2015 at 05:29:17PM +0200, Hendrik Leppkes wrote:
> On Tue, Jul 7, 2015 at 1:46 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Tue, Jul 07, 2015 at 03:06:23AM -0300, James Almer wrote:
> >> Signed-off-by: James Almer <jamrial at gmail.com>
> >> ---
> >>  libavcodec/libdcadec.c | 19 +++++++++++++++++++
> >>  1 file changed, 19 insertions(+)
> >>
> >> diff --git a/libavcodec/libdcadec.c b/libavcodec/libdcadec.c
> >> index 890d270..4bc3765 100644
> >> --- a/libavcodec/libdcadec.c
> >> +++ b/libavcodec/libdcadec.c
> >> @@ -41,6 +41,7 @@ static int dcadec_decode_frame(AVCodecContext *avctx, void *data,
> >>  {
> >>      DCADecContext *s = avctx->priv_data;
> >>      AVFrame *frame = data;
> >> +    struct dcadec_exss_info *exss;
> >>      int ret, i, k;
> >>      int **samples, nsamples, channel_mask, sample_rate, bits_per_sample, profile;
> >>      uint32_t mrk;
> >> @@ -127,6 +128,24 @@ static int dcadec_decode_frame(AVCodecContext *avctx, void *data,
> >>      } else
> >>          avctx->bit_rate = 0;
> >>
> >> +    if (exss = dcadec_context_get_exss_info(s->ctx)) {
> >> +        enum AVMatrixEncoding matrix_encoding = AV_MATRIX_ENCODING_NONE;
> >> +
> >> +        switch(exss->matrix_encoding) {
> >> +        case DCADEC_MATRIX_ENCODING_SURROUND:
> >> +            matrix_encoding = AV_MATRIX_ENCODING_DOLBY;
> >> +            break;
> >> +        case DCADEC_MATRIX_ENCODING_HEADPHONE:
> >
> > breaks build here
> >
> > CC      libavcodec/libdcadec.o
> > libavcodec/libdcadec.c: In function ‘dcadec_decode_frame’:
> > libavcodec/libdcadec.c:147:20: error: ‘struct dcadec_exss_info’ has no member named ‘matrix_encoding’
> > libavcodec/libdcadec.c:148:14: error: ‘DCADEC_MATRIX_ENCODING_SURROUND’ undeclared (first use in this function)
> > libavcodec/libdcadec.c:148:14: note: each undeclared identifier is reported only once for each function it appears in
> > libavcodec/libdcadec.c:151:14: error: ‘DCADEC_MATRIX_ENCODING_HEADPHONE’ undeclared (first use in this function)
> >
> 
> dcadec currently does not version its library or headers,

ok, its their lib and their headers, thats is not
really causing a problem


> so we're
> always assuming you are using git HEAD,

then our code is broken because it does not check for that.
whatever we assume is available for build must be checked by
configure

if we use ‘DCADEC_MATRIX_ENCODING_HEADPHONE’, configure should check
for that.
Such check can use a version number if there is one, but if there is
none something else can very easily be used to check for the lib to
be new enough a field, a struct, a symbol that has been added later
...


> until such a time when he has
> a release version and library versioning (ie. after the first
> release).

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

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150707/791d572b/attachment.sig>


More information about the ffmpeg-devel mailing list