[FFmpeg-soc] [RFC] Possible jpeg2k decoder rewrite
jmenon86 at gmail.com
Tue Jun 9 17:25:52 CEST 2009
On Sat, May 2, 2009 at 8:23 PM, Michael Niedermayer<michaelni at gmx.at> wrote:
> 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..
> So let me ask differently
> what would you do differently if you would rewrite it?
> And why would that be better?
>> > > - 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.
> Theres at least one bug in the bitstream decoding part, i dont know more
> details though, i just see some corruption in some areas in some files.
> The issue seemed random and not triggered by a specific feature in the
> file last time i checked more carefull.
I think I have narrowed the problem down to the tagtree decoding code,
but don't know what to fix and where to fix.
> Debuging this will likely be fastest by taking some reference decoder
> and adding printfs to it and add the same printfs to soc j2k and then
> diff them to see where they start to differ.
Most packets are decoded correctly, but in some files, the inclusion
bit read (by decoding the precinct tagtree) is not correct which
causes decoding to go haywire. Sadly, thats all I have found till now
> A rewrite woudld not safe you from such debuging either, your new code
> would as well have its bugs that will require such comparissions to the
> reference decoder.
Yes, but the reason I initially suggested this was because the new
code would be something I would understand and even maintain
effectively :), anyway its a moot point now since no time left for
More information about the FFmpeg-soc