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

Mohamed Naufal naufal11
Fri Mar 12 10:29:53 CET 2010


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.

Fixed other issues.

Thanks,
Naufal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yop.patch
Type: text/x-patch
Size: 19781 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100312/f2847673/attachment.bin>



More information about the ffmpeg-devel mailing list