[FFmpeg-devel] Fwd: [PATCH] Psygnosis YOP demuxer

Michael Niedermayer michaelni
Tue Mar 16 01:55:40 CET 2010


On Fri, Mar 12, 2010 at 02:59:53PM +0530, Mohamed Naufal wrote:
> On 10 March 2010 17:40, Michael Niedermayer <michaelni at gmx.at> wrote:
> 
> [...]
> 
> >
> > > >
> > > > you dont need the current_tag_byte variable
> > > >
> > >
> > >
> > > What I meant to say was if incrementing s->srcptr is postponed to the else
> > > block and yop_paint_block is called immediately after the if block, the
> > > local variable
> > > color_num = *(s->srcptr + paint_lut[tag][i])
> > > will have an incorrect value.
> > > Therefore s->srcptr is incremented in the if block and the original value
> > > stored in current_tag_byte.
> >
> > you do not need the current_tag_byte variable, iam not speaking
> > about any increasing of any pointers
> >
> >
> 
> Sorry to bring this up again, but if this is how I do it,
> 
> --- yop.c?? ?2010-03-12 14:36:00.998280781 +0530
> +++ yop2.c?? ?2010-03-12 14:37:55.287280857 +0530
> @@ -39,3 +39,2 @@
> ???? int tag_needs_next_byte;
> -??? int current_tab_byte;
> ???? int frame_data_length;
> @@ -196,6 +195,5 @@
> ???? if (s->tag_needs_next_byte) {
> -??????? s->current_tab_byte = *s->srcptr++;
> -??????? ret = s->current_tab_byte >> 4;
> +??????? ret = *s->srcptr >> 4;
> ???? }else {
> -??????? ret = s->current_tab_byte & 0xf;
> +??????? ret = *s->srcptr++ & 0xf;
> ???? }
> 
> it doesn't work because of the reason I mentioned earlier.
> If this is not what you meant, please elaborate.

you move the increasing to the else, this breaks the code
you dont have to move it there to remove current_tab_byte

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
-------------- 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/20100316/074f5f65/attachment.pgp>



More information about the ffmpeg-devel mailing list