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

Umair Khan omerjerk at gmail.com
Tue Oct 4 06:03:11 EEST 2016


Hi,

On Tue, Oct 4, 2016 at 1:53 AM, Thilo Borgmann <thilo.borgmann at mail.de> wrote:
> Hi,
>
>> Patch attached.
>>
>> It fixes the fate tests.
>> However, there's a slight bug in the encoder in handling the last frame.
>> I'll definitely fix it later.
>> I hope the patch can be merged in this state.
>
> no. The last frame has to be handled properly before merging happens.
> I'm at LinuxCon & ELCE for the next two weeks, so don't expect too much input from me before Oct. 14th. Please fix whatever is possible until then.
>
> -Thilo

Okay!!
I'm on it. I should be able to fix it.

- Umair

>> On Mon, Sep 12, 2016 at 12:53 PM, Umair Khan <omerjerk at gmail.com> wrote:
>>
>>> Hi,
>>>
>>> Sorry for late reply. I was travelling a bit.
>>> Attached is the patch which includes the following changes than the
>>> previous one -
>>>
>>> 1. Removed changes of the file libavformat/movenc.c, as I had added
>>> this file in the initial commit by mistake.
>>> 2. Removed the assembly code.
>>> 3. Make changes as suggested by Michael (av_assertX and header_size).
>>>
>>> As far as fate tests are concerned, I haven't checked that yet. I'll
>>> see what's the issue there.
>>>
>>> On Mon, Aug 29, 2016 at 11:34 PM, Michael Niedermayer
>>> <michael at niedermayer.cc> wrote:
>>>> 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
>>>>
>>>> _______________________________________________
>>>> ffmpeg-devel mailing list
>>>> ffmpeg-devel at ffmpeg.org
>>>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> ffmpeg-devel mailing list
>>> ffmpeg-devel at ffmpeg.org
>>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list