Closed
Bug 76776
Opened 24 years ago
Closed 22 years ago
Progressive JPEGs should display progressively
Categories
(Core :: Graphics: ImageLib, defect, P3)
Core
Graphics: ImageLib
Tracking
()
VERIFIED
FIXED
mozilla1.0.1
People
(Reporter: dv5a, Assigned: tor)
References
()
Details
(Whiteboard: [imglib][adt2 RTM] [eta: baking on trunk])
Attachments
(3 files, 10 obsolete files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
jag+mozilla
:
review+
jag+mozilla
:
superreview+
jesup
:
approval+
|
Details | Diff | Splinter Review |
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.8.1+) Gecko/20010417
BuildID: 2001041704
Progressive Jpegs should display a low quality aproximation of the image, with
gradual improvement of quality as the image downloads. But now it does not work
this way, the image is displayed when the download has finished.
Reproducible: Always
Steps to Reproduce:
Go to http://fog.ccsf.cc.ca.us/~pthiry/multimedia/monalisabig.jpg
Or to http://home.hkstar.com/~hyytep/jpeg.html
Or to http://www.netadvies.nl/advies/pjpgdemo.html
Actual Results: The image displays when download has finished
Expected Results: The image should display progressive with increasing quality
For more information:
http://www.faqs.org/faqs/jpeg-faq/part1/section-11.html
Reporter | ||
Comment 1•24 years ago
|
||
It also happens in Linux. Changing OS to all
It works fine in Navigator 4.x
Keywords: 4xp
OS: Windows NT → All
Comment 2•24 years ago
|
||
Marking NEW.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Progressive Jpegs should display progressive → [RFE] Progressive Jpegs should display progressive
Updated•24 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0
Reporter | ||
Updated•24 years ago
|
Blocks: 66962
Summary: [RFE] Progressive Jpegs should display progressive → [RFE] Progressive Jpegs should display progressibly
What is this RFE business? Progressive JPEG support is very important,
especially for 56K users. Supporting this is a fundamental part of supporting
JPEG images. Upgrading to normal severity.
Severity: enhancement → normal
Summary: [RFE] Progressive Jpegs should display progressibly → Progressive Jpegs should display progressibly
This really needs to be fixed for nsbeta1 as well. Adding appropriate keyword.
Keywords: nsbeta1
Summary: Progressive Jpegs should display progressibly → Progressive JPEGs should display progressively
I am seeing the bug - progressive/interlaced jpegs not loading progressively in
build: 2001062815 as well.
It depends how you define "progressive".
It's broken from the fundimental viewpoint that it won't render in a "raster"
mode as with gif -- at full res while being received from top to bottom.
Usually "progressive jpeg" means low-res overlayed by incresingly higer-res detail.
I'd change the summary to "jpegs don't render as they are received". This is
not related to progressive or not.
Comment 10•23 years ago
|
||
lohphat, I just tested this quickly, and confirmed that non-progressive JPEGs do
display as they are loaded. It's only progressive JPEGs that don't, so this has
everything to do with whether a jpeg is progressive or not. No need to change
the title.
Comment 11•23 years ago
|
||
You're correct. After testing the following URL on NSCP 4.78 I could catch that
it is a progressive jpeg.
http://www.fuckedcompany.com/images/911/5th_avenue_facing_south.jpg
Updated•23 years ago
|
Hardware: PC → All
Comment 12•23 years ago
|
||
Comment 13•23 years ago
|
||
The attached patch has only been minimally tested
and contains a whole load of debugging printf's and
cruft at the moment, but does the trick.
Feedback welcomed.
Comment 14•23 years ago
|
||
Hmm. Still has issues with aborting decoding.
Comment 15•23 years ago
|
||
Updated•23 years ago
|
Attachment #56489 -
Attachment is obsolete: true
Comment 16•23 years ago
|
||
Okay, this one acknowledges that jpeg_finish_output()
may suspend, and hence seems stable. The same caveats apply
though, including a pretty slow line-by-line way of notifying the
image observer, plus any JPEG decoding errors having been
temporarily promoted to fatal.
Comment 17•23 years ago
|
||
Comment 18•23 years ago
|
||
Updated•23 years ago
|
Attachment #56501 -
Attachment is obsolete: true
Comment 19•23 years ago
|
||
Okay, http://www.battletrolls.com/html/homepage/noflash.php seems to be a good
(nasty) testcase.
This latest (#3) pair of patches against nsJPEGDecoder.h and nsJPEGDecoder.cpp
(supposedly) improve the suspendability of jpeg_finish_output() calls
and adds suspendability for jpeg_start_output(). It's the stablest
version yet (that is, I can't make it emit a libjpeg error and
racily abort decoding).
The fly in the ointment is at line 499 of the patched nsJPEGDecoder.cpp,
where I have inserted a |break| to keep us in the 'more data
please'/JPEG_WAIT_STARTOUT state forever; this is because if I let it
pass the point where jpeg_start_output() has suspended once, it starts
corrupting memory whether I retry, consume, whatever. Possibly a
libjpeg bug, more likely I really need someone with superior libjpeg juju
to take a look and test my sanity (it's late).
Comment 20•23 years ago
|
||
Adding keywords...this needs a review/super review
Comment 21•23 years ago
|
||
Removing 'patch' and 'review' keywords -- this
is strictly a work-in-progress with known problems,
and right now I'm looking for comments, not r/sr.
Keywords: mozilla1.0,
qawanted
Comment 22•23 years ago
|
||
adam: What is the status of your patch? If you plan to finish it, you might take
the assignment to get it off pavlov's list.
Comment 23•23 years ago
|
||
I hope to finish it some time, but realistically that's probably at least weeks
away (I'm very busy at the moment). Meanwhile I'd rather leave it as pav's if
he wants it. :)
Comment 24•23 years ago
|
||
Removing nsbeta1 nomination because this bug has been plussed.
Keywords: nsbeta1
Comment 25•23 years ago
|
||
Setting Severity=Minor since final image display isn't actually interdicted.
Severity: normal → minor
Updated•23 years ago
|
Priority: -- → P4
Comment 26•23 years ago
|
||
giving to nivedita. you can work with adam@gimp.org on this as he has already
spent some time working on it.
Assignee: pavlov → nivedita
Status: ASSIGNED → NEW
Comment 27•23 years ago
|
||
I'm out of time, so my last patch I think is as
far as I go. IIRC when I left it I was wondering if
jpeglib was wanting the ability to 'rewind' a few bytes
to pick up rendering an interrupted stream, and we
hadn't implemented such an ability in the IO methods
we were providing. It does look to me like something
buffering-related, either way.
Two progressive quick-win options if we don't get things
working properly in our short timescales:
1) Turn off smoothing of the incomplete levels. We might
be paying the smoothing cost even though we're not
displaying progressively and don't see the visual benefit.
2) At least display the final pass progressively. The
final pass accounts for probably the majority of the file
size (but not the majority of visually-useful data, hence
the benefits of progressive rendering) so at least we'll
have started to show *something* good before we most of
the stream down. I *think* that the last version of the
WIP patch will reliably do this with a small change or
two for a quick implementation, but is better being
implemented from scratch for less code-impact if you're
not interested in picking up the other baggage which
was aimed towards full progressive rendering support.
Comment 28•23 years ago
|
||
I applied the patches but I could observe progressive jpeg behaviour. The image
got displayed as in sequential jpg, rather than the one which improves in
quality over the subsequent scans. Am I missing some thing here.
Comment 29•23 years ago
|
||
Well, that's odd. The patch looks likes what's been in
my tree for months, and I do get progressive rendering
(modulo the known intermittant early-bailout bug).
I'm on unix/X11. I'd be surprised if that made a
difference, but...
Perhaps your connection is too fast? The progressive
rendering will coalesce earlier passes if there is
enough buffered data coming in to skip ahead to a later,
better pass.
Comment 30•23 years ago
|
||
My observations were specific to windowsNT platform, let me check it out on
Linux as well.
Comment 31•23 years ago
|
||
I could observe some difference in the jpeg diplay on the Linux build. It
appeared fazy to clear. But it was too fast. I think I with agree you about
the connection being fast .
Updated•23 years ago
|
Attachment #56508 -
Flags: needs-work+
Updated•23 years ago
|
Attachment #56509 -
Flags: needs-work+
Comment 34•22 years ago
|
||
pav/gagan - what are the chnaces that we'd be able to get a fix for this before
06.14.2002? pls add eta, or nsbeta1- (indicating that it is not needed for
MachV). thanks!
Keywords: mozilla1.0 → mozilla1.0.1
Whiteboard: [imglib][adt2] → [imglib][adt2 RTM] [eta needed]
Assignee | ||
Comment 35•22 years ago
|
||
Attachment #86979 -
Flags: needs-work+
Assignee | ||
Comment 36•22 years ago
|
||
Attachment #86979 -
Attachment is obsolete: true
Comment 37•22 years ago
|
||
Comment on attachment 86982 [details] [diff] [review]
pick up a missing i/o suspension case
Looks good. r=adam@gimp.org
Attachment #86982 -
Flags: review+
Assignee | ||
Comment 38•22 years ago
|
||
Attachment #86982 -
Attachment is obsolete: true
Assignee | ||
Comment 39•22 years ago
|
||
Taking bug.
Assignee: pavlov → tor
Severity: minor → normal
Priority: P4 → P3
Whiteboard: [imglib][adt2 RTM] [eta needed] → [imglib][adt2 RTM] [eta: once we pick up reviews and some trunk bake time]
Comment 40•22 years ago
|
||
I've been playing with a patched trunk built today and it's worked flawlessly
for me. A big image to test progressive loading with is here:
http://wfmh.org.pl/~thorgal/wtc-photo-small.jpg
Comment 41•22 years ago
|
||
Comment on attachment 86995 [details] [diff] [review]
handle a couple more (last?) i/o suspension cases
I don't like the:
+ /* There's been an error - return NS_OK so that
+ libpr0n doesn't throw away a partial image load */
If you don't return an error, you will end up with the partially loaded image
in the cache. That doesn't seem like a good thing.
The flag image status flag STATUS_LOAD_PARTIAL is meant to be used for this
kind of thing.
Perhaps an additional error should be added and returned.
http://lxr.mozilla.org/seamonkey/source/modules/libpr0n/public/ImageErrors.h
Assignee | ||
Comment 42•22 years ago
|
||
That bit of code will only get triggered if the image stream is corrupt, so
what's the harm in caching the image? It's a lot better than tantalizing the
user by incrementally loading an image and then whipping it away if libjpeg
sees something wrong.
Comment 43•22 years ago
|
||
we should add the non-fatal errors to this list so that they can return a
successful error code instead of always returning success.
Assignee | ||
Comment 44•22 years ago
|
||
Attachment #86995 -
Attachment is obsolete: true
Attachment #87137 -
Attachment is obsolete: true
Comment 45•22 years ago
|
||
Comment on attachment 87257 [details] [diff] [review]
as above, with pav's suggest and a cynical comment
r=pavlov
Attachment #87257 -
Flags: review+
Updated•22 years ago
|
Attachment #87257 -
Flags: superreview+
Comment 46•22 years ago
|
||
Comment on attachment 87257 [details] [diff] [review]
as above, with pav's suggest and a cynical comment
sr=jag
Assignee | ||
Comment 47•22 years ago
|
||
Checked into trunk.
Assignee | ||
Comment 48•22 years ago
|
||
Attachment #87257 -
Attachment is obsolete: true
Assignee | ||
Comment 49•22 years ago
|
||
Backed out due to Tp regression (bug 153280).
Assignee | ||
Comment 50•22 years ago
|
||
*** Bug 153433 has been marked as a duplicate of this bug. ***
Comment 51•22 years ago
|
||
Crap! I hope this patch makes it back in soon. It seems to me that to render
pjepgs progressively, you'd almost *have* to take a little performance hit, so I
hope people aren't thinking of taking this feature out completely! I would
think that even if you change it so it doesn't render to screen quite as often,
there'll still be a slight perf hit.
Assignee | ||
Comment 52•22 years ago
|
||
The trick is quantifying what is an acceptable perf hit, since it depend on
the network speed. See http://bugzilla.mozilla.org/show_bug.cgi?id=153280#c2
Comment 53•22 years ago
|
||
Compare the way this works in Mozilla to the way this works in NS4. In NS4 it
only draws one pass using the data that's available, then does a final pass at
full quality. Maybe if it was rendered like this in Mozilla the performance hit
wouldn't be as big of a deal.
Comment 54•22 years ago
|
||
Comment on attachment 88723 [details] [diff] [review]
as above plus fix for bug 153433 (background pjpeg broken)
r=pavlov
Attachment #88723 -
Flags: review+
Comment 55•22 years ago
|
||
Comment on attachment 88723 [details] [diff] [review]
as above plus fix for bug 153433 (background pjpeg broken)
sr=jag
Attachment #88723 -
Flags: superreview+
Assignee | ||
Comment 56•22 years ago
|
||
Attachment #88723 -
Attachment is obsolete: true
Assignee | ||
Comment 57•22 years ago
|
||
Attachment #90121 -
Attachment is obsolete: true
Comment 58•22 years ago
|
||
Comment on attachment 90154 [details] [diff] [review]
make sure we show a complete scan during incremental loading
r=biesi if you move the do..while above the for(;;) as discussed on irc
Attachment #90154 -
Flags: review+
Assignee | ||
Comment 59•22 years ago
|
||
Attachment #90154 -
Attachment is obsolete: true
Comment 60•22 years ago
|
||
Comment on attachment 90242 [details] [diff] [review]
loop moved per biesi's comments
sr=jag
Attachment #90242 -
Flags: superreview+
Attachment #90242 -
Flags: review+
Assignee | ||
Comment 61•22 years ago
|
||
Checked in on trunk.
Whiteboard: [imglib][adt2 RTM] [eta: once we pick up reviews and some trunk bake time] → [imglib][adt2 RTM] [eta: baking on trunk]
Reporter | ||
Comment 62•22 years ago
|
||
Fixed
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 63•22 years ago
|
||
Leaving open for possible branch pickup.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 64•22 years ago
|
||
Updating URL; original is 404.
Comment 65•22 years ago
|
||
Comment on attachment 90242 [details] [diff] [review]
loop moved per biesi's comments
branch approval granted; please change mozilla1.0.1+ to fixed1.0.1 when this is
checked into branch.
Attachment #90242 -
Flags: approval+
Updated•22 years ago
|
Assignee | ||
Comment 66•22 years ago
|
||
Checked into branch.
Status: REOPENED → RESOLVED
Closed: 22 years ago → 22 years ago
Keywords: mozilla1.0.1+ → fixed1.0.1
Resolution: --- → FIXED
Comment 67•22 years ago
|
||
Verified fixed win XP branch build 2002073108, Mac branch build 2002073112 and
linux branch build 2002073006, marking verified1.0.1
Keywords: fixed1.0.1 → verified1.0.1
Comment 68•21 years ago
|
||
looks good with recent builds, so verifying on the trunk.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•