[FFmpeg-soc] [RFC] Possible jpeg2k decoder rewrite

Kostya kostya.shishkov at gmail.com
Sun May 3 06:49:42 CEST 2009


On Sun, May 03, 2009 at 12:56:02AM +0530, Jai Menon wrote:
> On 4/26/09, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Sun, Apr 26, 2009 at 05:47:11PM +0530, Jai Menon wrote:
> >  > On 4/26/09, Michael Niedermayer <michaelni at gmx.at> wrote:
> >  > > On Sun, Apr 26, 2009 at 04:17:48PM +0530, Jai Menon wrote:
> 
> [...]
> 
> 
> > The last time around a project writing a j2k decoder (and encoder)
> >  failed.
> >  What makes you belive yours would succeed if you throw the existing
> >  work away?
> 
> I have no clue if it will succeed or not. As for the existing work,
> the current code seems to be written for parsing/decoding a single
> type of file. And the author didnt bother documenting anything. Yes, I
> know code is supposed to be the documentation etc..

You have the spec.
 
> [...]
> 
> >  > - component subsampling is not supported. this is required by a bunch
> >  > of profile 0 test files. right now only 1x1 supported.
> >
> >
> > this must be fixed, but i dont see how thats a argument in favor of a
> >  rewrite, and that applies to the other points here too
> 
> I tried fixing this, but the decode_packet code seems broken, it
> doesn't read the entire bitstream in the tile part. Do you know if
> there are any known issues with it? I was having some difficulty
> correlating that part to the spec.

Why not take some other working decoder (Jasper, OpenJPEG, whatever),
add some debug statements to it to see what values it decodes (simple
printf in several places) and compare that to our decoder (with diff). I
did that for debugging JPEG-LS decoding. 

> >  So as summary my oppinion is pretty much that iam against a rewrite unless
> >  you can point at issues with the current code where a rewrite is less work
> >  than fixing the issues in the current code.
> 
> I agree with you that a rewrite is more work. Sorry for bringing it
> up, I seem to have lost my ability to read other people's code after
> looking at the j2k soc code :)

That is usual reason for rewrite - not understanding what it does and
thus not being able to fix it properly. Or creeping perfectionism.
 
> -- 
> Regards,
> 
> Jai


More information about the FFmpeg-soc mailing list