[FFmpeg-devel] [GSoC] avcodec/als: Add ALS encoder

Michael Niedermayer michael at niedermayer.cc
Mon Aug 29 21:04:13 EEST 2016


On Mon, Aug 29, 2016 at 10:47:59PM +0530, Umair Khan wrote:
> Hi,
> 
> On Sun, Aug 28, 2016 at 4:26 PM, Michael Niedermayer
> <michael at niedermayer.cc> wrote:
> > On Sun, Aug 28, 2016 at 01:34:46PM +0530, Umair Khan wrote:
> >> Hi,
> >>
> >> Patches attached. :)
> >>
> >> - Umair
> >
> >>  Changelog |    1 +
> >>  1 file changed, 1 insertion(+)
> >> d3f30e62d803d967bd5c27dc5dfad278ce5c02e9  0001-Changelog-Add-entry-for-ALS-encoder.patch
> >> From 020370545a82c8c1304ec9c177a75e27e59b84e8 Mon Sep 17 00:00:00 2001
> >> From: Umair Khan <omerjerk at gmail.com>
> >> Date: Sat, 27 Aug 2016 22:22:02 +0530
> >> Subject: [PATCH 1/2] Changelog: Add entry for ALS encoder
> >>
> >> Signed-off-by: Umair Khan <omerjerk at gmail.com>
> >> ---
> >>  Changelog | 1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> diff --git a/Changelog b/Changelog
> >> index b903e31..90c15ad 100644
> >> --- a/Changelog
> >> +++ b/Changelog
> >> @@ -15,6 +15,7 @@ version <next>:
> >>  - True Audio (TTA) muxer
> >>  - crystalizer audio filter
> >>  - acrusher audio filter
> >> +- ALS encoder
> >>
> >>
> >>  version 3.1:
> >> --
> >> 2.7.4 (Apple Git-66)
> >>
> >
> > [...]
> >> +static int calc_short_term_prediction(ALSEncContext *ctx, ALSBlock *block,
> >> +                                       int order)
> >> +{
> >> +    ALSSpecificConfig *sconf = &ctx->sconf;
> >> +    int i, j;
> >> +
> >> +    int32_t *res_ptr = block->res_ptr;
> >> +    int32_t *smp_ptr = block->cur_ptr;
> >> +
> >> +    assert(order > 0);
> >
> > should be av_assertX (X=0/1/2)
> >
> >
> > [...]
> >> +int ff_window_init(WindowContext *wctx, enum WindowType type, int length,
> >> +                   double param)
> >> +{
> >> +    if (!length || length < -1)
> >> +        return AVERROR(EINVAL);
> >> +
> >> +    wctx->type   = type;
> >> +    wctx->length = length;
> >> +    wctx->param  = param;
> >> +
> >> +    switch (type) {
> >> +    case WINDOW_TYPE_RECTANGLE:
> >> +        rectangle_init(wctx);
> >> +        break;
> >> +    case WINDOW_TYPE_WELCH:
> >> +        WINDOW_INIT(welch)
> >> +        break;
> >> +    case WINDOW_TYPE_SINERECT:
> >> +        WINDOW_INIT(sinerect)
> >> +        break;
> >> +    case WINDOW_TYPE_HANNRECT:
> >> +        WINDOW_INIT(hannrect)
> >> +        break;
> >> +    default:
> >> +        return AVERROR(EINVAL);
> >> +    }
> >> +
> >
> >> +    if (HAVE_MMX)
> >> +        ff_window_init_mmx(wctx);
> >
> > breaks build on non x86 as the function declaration / prototype is
> > not there in that case
> 
> What should I do with this then? I'm not too aware of how the whole
> code works because I didn't originally write it.
> So, I'll need some help here. :)

IIRC the declaration / prototype is under #if
but the call is not under #if
thus if the condition on the #if is untrue this fails to build

(this is not the same as the functions implementation being missing
 for if(0) code, that one works with all supported platforms)

its probably best to split the whole *_mmx code out into a seperate
patch and also either the call must be under #if or the declaration
must be available independant of an #if


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

Democracy is the form of government in which you can choose your dictator
-------------- 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/20160829/331cf837/attachment.sig>


More information about the ffmpeg-devel mailing list