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

Michael Niedermayer michaelni
Fri May 2 23:19:10 CEST 2008


On Fri, May 02, 2008 at 11:10:35PM +0200, Luca Barbato wrote:
> 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?

ok but also merge:

+    uint32_t state;
+    state = pc->state;


[..]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080502/2b450124/attachment.pgp>



More information about the ffmpeg-devel mailing list