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

Umair Khan omerjerk at gmail.com
Sat Jul 23 23:17:18 EEST 2016


HI,

On Fri, Jul 22, 2016 at 9:19 PM, Michael Niedermayer
<michael at niedermayer.cc> wrote:
> On Fri, Jul 22, 2016 at 06:22:30PM +0530, Umair Khan wrote:
>> On Thu, Jul 21, 2016 at 6:18 PM, Michael Niedermayer
>> <michael at niedermayer.cc> wrote:
>> > On Sun, Jul 17, 2016 at 12:06:03AM +0530, Umair Khan wrote:
> [...]
>> >> +static int decode_string(MLZDict *dict, unsigned char *buff, int string_code, int *first_char_code, unsigned long bufsize) {
>> >> +    unsigned long count, offset;
>> >> +    int current_code, parent_code, tmp_code;
>> >> +
>> >> +    count            = 0;
>> >> +    current_code     = string_code;
>> >> +    *first_char_code = CODE_UNSET;
>> >> +
>> >> +    while (count < bufsize) {
>> >> +        switch (current_code) {
>> >> +        case CODE_UNSET:
>> >> +            return count;
>> >> +            break;
>> >> +        default:
>> >> +            if (current_code < FIRST_CODE) {
>> >> +                *first_char_code = current_code;
>> >> +                buff[0] = current_code;
>> >> +                count++;
>> >> +                return count;
>> >> +            } else {
>> >> +                offset  = dict[current_code].match_len - 1;
>> >> +                tmp_code = dict[current_code].char_code;
>> >> +                buff[offset] = tmp_code;
>> >> +                count++;
>> >> +            }
>> >> +            current_code = dict[current_code].parent_code;
>> >> +            if ((current_code < 0) || (current_code > (DIC_INDEX_MAX - 1))) {
>> >
>> >> +                av_log(NULL, AV_LOG_ERROR, "MLZ dic index error.\n");
>> >
>> > it would be ideal if all av_log() would have a context instead of NULL
>>
>> How to go ahead with this? Should I create MLZContext or something? If
>> yes, could you please tell how?
>
> possible or you pass a void *context

Updated patch.

-Umair
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-avcodec-alsdec-implement-floating-point-decoding.patch
Type: application/octet-stream
Size: 28082 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160724/40c347fb/attachment.obj>


More information about the ffmpeg-devel mailing list