-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For JPX decoding only read next packet after checking for byte aligning. #5350
Conversation
/botio-windows preview |
From: Bot.io (Windows)ReceivedCommand cmd_preview from @yurydelendik received. Current queue size: 0 Live output at: http://107.22.172.223:8877/320587b54bb289a/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/320587b54bb289a/output.txt Total script time: 0.85 mins Published
|
the main "fix" is to invoke "var packet = packetsIterator.nextPacket();" only when the byte aligning has happened. |
ee0592f
to
7b0f638
Compare
this patch also makes #4814 render better - the screenshot by @yurydelendik where the girl is blurry is fixed. but the document still has other issues |
/botio test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @yurydelendik received. Current queue size: 0 Live output at: http://107.21.233.14:8877/a0c1b5392c8c250/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @yurydelendik received. Current queue size: 0 Live output at: http://107.22.172.223:8877/f1715d6d13ccf3b/output.txt |
From: Bot.io (Windows)FailedFull output at http://107.22.172.223:8877/f1715d6d13ccf3b/output.txt Total script time: 2.85 mins
Image differences available at: http://107.22.172.223:8877/f1715d6d13ccf3b/reftest-analyzer.html#web=eq.log |
From: Bot.io (Linux)FailedFull output at http://107.21.233.14:8877/a0c1b5392c8c250/output.txt Total script time: 22.13 mins
Image differences available at: http://107.21.233.14:8877/a0c1b5392c8c250/reftest-analyzer.html#web=eq.log |
interesting, seems like the 3591 issue is the same issue in reverse :) |
7b0f638
to
2c5711d
Compare
fixed the regression of #3591. still want to look a bit more into it. |
I would say the fix is correct. There is an issue with the last tile when its dimension is small. I added a comment to #4358, that i assume that it is caused by not limiting the decoding size correctly for small tiles. |
I think its good to merge. who can verify for me @yurydelendik , @Snuffleupagus, @fkaelberer |
var colorspace = readUint32(data, position + 3); | ||
switch (colorspace) { | ||
case 16: | ||
warn('sRGB colorspace not supported'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sRGB and grayscale are the two supported colorspaces, aren't they?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well yes :-) I only expanded the todo from the previous code. This was not handling colorspaces at all. Maybe I should reword this to warn: Todo ?
2c5711d
to
35b72ef
Compare
@fkaelberer thanks for the review Felix. |
Travis complains: |
strange, travis didnt complain earlier and i did not remove the import. thanks for pointing this out |
35b72ef
to
0b4dfe7
Compare
// TODO | ||
break; | ||
default: | ||
warn('Unsupported header type ' + tbox); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should make the errors more human readable:
default:
var headerType = String.fromCharCode((tbox >> 24) & 0xFF,
(tbox >> 16) & 0xFF,
(tbox >> 8) & 0xFF,
tbox & 0xFF);
warn('Unsupported header type ' + tbox + ' (' + headerType + ')');
0b4dfe7
to
009cc3d
Compare
@fkaelberer okay i reverted some of the experimental changes which did not have benefit. |
009cc3d
to
808c8e1
Compare
Nice! The code looks very good to me. |
// this indicates a YUV colorspace | ||
break; | ||
default: | ||
warn('Unknown colorspace'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: here and below, add break;
for default:
This patch makes the image from mozilla#5349 appear correctly, the artefacts for the last packet are fixed in mozilla#5426. This patch also optimizes some "in-checks" and adds a few header parsings.
808c8e1
to
b2d7c28
Compare
/botio-windows test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @yurydelendik received. Current queue size: 0 Live output at: http://107.22.172.223:8877/baa0a5cde81447b/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/baa0a5cde81447b/output.txt Total script time: 19.46 mins
|
For JPX decoding only read next packet after checking for byte aligning.
Thank you |
This patch makes the image from #5349 appear correctly, however artefacts
for the last packet seem to still be there.
This patch also optimizes some "in-checks" and adds a few header parsings.