
"Phil Endecott" <spam_from_boost_dev@chezphil.org> wrote in message news:1291755767785@dmwebmail.dmwebmail.chezphil.org...
You're always reading 4 lines and asserting that rec_outbuf_height is not greater than this (as the docs say it will be). This is not unreasonably, but it's not exactly what I meant; in my code, I explicitly read exactly rec_outbuf_height lines.
Hmm, yes, this passage is definitely missing an implementation note :) The assert is actually to be read the other way around, it is verifying that I am providing enough scanlines for optimal reading (as recommended by the documentation)...And the code does not actually read 4 lines, rather it provides LibJPEG with the space to read up to 4 lines if it can/wants...it is up to LibJPEG to decide how much to read...There is no need to read/use the rec_outbuf_height value (unless you plan to dynamically allocate the small scanlines buffer which would be self defeating) if the documentation guarantees it will be between 1 and 4... -- "What Huxley teaches is that in the age of advanced technology, spiritual devastation is more likely to come from an enemy with a smiling face than from one whose countenance exudes suspicion and hate." Neil Postman