[FFmpeg-devel] [PATCH] avcodec/alsdec: implement floating point decoding

Thilo Borgmann thilo.borgmann at mail.de
Fri Aug 5 16:29:49 EEST 2016


Am 05.08.16 um 14:29 schrieb Umair Khan:
> On Fri, Aug 5, 2016 at 5:48 PM, Thilo Borgmann <thilo.borgmann at mail.de> wrote:
>> Am 05.08.16 um 11:45 schrieb Michael Niedermayer:
>>> On Fri, Jul 29, 2016 at 08:33:13PM +0530, Umair Khan wrote:
>>>> On Thu, Jul 28, 2016 at 7:12 PM, Umair Khan <omerjerk at gmail.com> wrote:
>>>>> On Thu, Jul 28, 2016 at 2:25 PM, Thilo Borgmann <thilo.borgmann at mail.de> wrote:
>>>>>> Am 28.07.16 um 08:28 schrieb Umair Khan:
>>>>>>> On Thu, Jul 28, 2016 at 12:22 AM, Clément Bœsch <u at pkh.me> wrote:
>>>>>>>> On Wed, Jul 27, 2016 at 07:48:56PM +0200, Thilo Borgmann wrote:
>>>>>>>>>> @@ -1803,6 +2057,34 @@ static av_cold int decode_init(AVCodecContext *avctx)
>>>>>>>>>>      ctx->raw_buffer       = av_mallocz_array(avctx->channels * channel_size, sizeof(*ctx->raw_buffer));
>>>>>>>>>>      ctx->raw_samples      = av_malloc_array(avctx->channels, sizeof(*ctx->raw_samples));
>>>>>>>>>>
>>>>>>>>>> +    if (sconf->floating) {
>>>>>>>>>> +        ctx->acf               = av_malloc_array(avctx->channels, sizeof(*ctx->acf));
>>>>>>>>>> +        ctx->shift_value       = av_malloc_array(avctx->channels, sizeof(*ctx->shift_value));
>>>>>>>>>> +        ctx->last_shift_value  = av_malloc_array(avctx->channels, sizeof(*ctx->last_shift_value));
>>>>>>>>>> +        ctx->last_acf_mantissa = av_malloc_array(avctx->channels, sizeof(*ctx->last_acf_mantissa));
>>>>>>>>>> +        ctx->raw_mantissa      = av_malloc_array(avctx->channels, sizeof(*ctx->raw_mantissa));
>>>>>>>>>> +
>>>>>>>>>> +        ctx->larray = av_malloc_array(ctx->cur_frame_length * 4, sizeof(*ctx->larray));
>>>>>>>>>> +        ctx->nbits  = av_malloc_array(ctx->cur_frame_length, sizeof(*ctx->nbits));
>>>>>>
>>>>>>>>>> +        ctx->mlz    = av_malloc(sizeof(*ctx->mlz));
>>>>>>>>>> +        ff_mlz_init_dict(avctx, ctx->mlz);
>>>>>>>>>> +        ff_mlz_flush_dict(ctx->mlz);
>>>>>>
>>>>>> ctx->mlz is also used without allocation check. Are the _dict functions safe for
>>>>>> ctx->mlz == NULL?
>>>>
>>>> I had sent the old patch file by mistake. This is the correct one.
>>>>
>>>> - Umair
>>>

>>>>  0001-avcodec-alsdec-implement-floating-point-decoding.patch |  771 ++++++++++++
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

>>>>  Changelog                                                   |    3
>>>>  libavcodec/Makefile                                         |    2
>>>>  libavcodec/alsdec.c                                         |  284 ++++
>>>>  libavcodec/mlz.c                                            |  173 ++
>>>>  libavcodec/mlz.h                                            |   70 +
>>>>  libavutil/softfloat_ieee754.h                               |  115 +
>>>>  7 files changed, 1415 insertions(+), 3 deletions(-)
>>>
>>>  "0001-avcodec-alsdec-implement-floating-point-decoding.patch"
>>> looks like it shouldnt be in the checkin that way
>>
>> Oh I missed that, sorry...
> 
> I didn't get it. Should I change the name of the file?

No. You've added .patch file in your source tree and locally committed it into
your repository as if it were a new usual source file.

Go back in your local history (git reset) to the point before committing your
changes, then add again all files except the .patch file in your source root
directory (git add), then commit these changes (git commit) and create a new
patch that does not add "0001-avcodec-alsdec-... .patch" into the FFmpeg source
(git format-patch).

-Thilo


More information about the ffmpeg-devel mailing list