[FFmpeg-devel] [PATCH]Add Dirac support to ffmpeg via libdirac_* and Schroedinger libraries]

Luca Barbato lu_zero
Fri May 2 23:10:35 CEST 2008


Michael Niedermayer wrote:
> On Fri, May 02, 2008 at 05:34:27PM +0200, Luca Barbato wrote:
>> Michael Niedermayer wrote:
>>> [...]
>>>> +    int parse_info_found;
>>> [...]
>>>> +    parse_info_found = pc->frame_start_found;
>>> that local variable seems redundant
>> Seems to me as well.
> 
> [...]
>> +    if (!pc->frame_start_found) {
>> +        for(i = 0; i < buf_size; i++) {
>> +            state = (state << 8) | buf[i];
>> +            if (state == DIRAC_PARSE_INFO_PREFIX) {
>> +                pc->frame_start_found = 1;
>> +                break;
>> +            }
>> +        }
>> +    }
>> +
>> +    if (pc->frame_start_found) {
>> +        for(; i < buf_size; i++) {
>> +            state = (state << 8) | buf[i];
>> +            if (state == DIRAC_PARSE_INFO_PREFIX) {
>> +                pc->frame_start_found = 0;
>> +                pc->state = -1;
>> +                return i - 3;
>> +            }
>> +        }
>> +    }
> 
> for(i = 0; i < buf_size; i++) {
>     state = (state << 8) | buf[i];
>     if (state == DIRAC_PARSE_INFO_PREFIX) {
>         pc->frame_start_found ^= 1;
>         if(!pc->frame_start_found){
>             pc->state = -1;
>             return i - 3;
>         }
>     }
> }
> 


Should I commit it right away?

lu

-- 

Luca Barbato
Gentoo Council Member
Gentoo/linux Gentoo/PPC
http://dev.gentoo.org/~lu_zero





More information about the ffmpeg-devel mailing list