Skip to content
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

Support all progression orders #5494

Merged
merged 1 commit into from
Dec 18, 2014
Merged

Support all progression orders #5494

merged 1 commit into from
Dec 18, 2014

Conversation

MaMazav
Copy link
Contributor

@MaMazav MaMazav commented Nov 18, 2014

Add support for all progression orders not supported yet: RPCL, CPRL,
PCRL.

@CodingFabian
Copy link
Contributor

did you run node make lint

these errors came up

src/core/jpx.js: line 718, col 18, 'c' is already defined.
src/core/jpx.js: line 731, col 18, 'r' is already defined.
src/core/jpx.js: line 731, col 25, 'c' is already defined.

@CodingFabian
Copy link
Contributor

in js vars get hoisted up to function scope, you should define them once in the beginning

@MaMazav
Copy link
Contributor Author

MaMazav commented Nov 18, 2014

I just wrote at the issue about the fact that I didn't succeed to run testing, and I mean also lint. I just didn't want to delay more the PR...

Thanks for feedback. I'll fix it and try to overcome my problems with the testing.

var layersCount = tile.codingStyleDefaultParameters.layersCount;
var componentsCount = siz.Csiz;

var l, r, c, p;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: the indentation is incorrect here, please use spaces instead of tabs when indenting.

@Snuffleupagus
Copy link
Collaborator

I've added a few initial review comments (mostly about code style). Once you have addressed those, please squash the commits, see https://github.com/mozilla/pdf.js/wiki/Squashing-Commits.

@CodingFabian
Copy link
Contributor

looks ok to me. I personally do not like the for loop style in some places and the variable names are a bit to verbose, but that might be my personal problem :-)

@Snuffleupagus can you trigger a regression test? While I would love to have new PDFs with images covering the recent fixes to jpx.js I think we should at least try to have a look if there was no change to existing functionality (which shouldnt be, but you never know :)) Maybe we already have a test of the changes hidden in the current pdfs.

@MaMazav
Copy link
Contributor Author

MaMazav commented Nov 19, 2014

Thanks for your feedback.
I think I finally did it. Please tell me if something got wrong or any additional issues exist.

Just a few things about coding style:

  • The coding style I'm used to are quite different. I tried to adapt my code to the coding conventions I saw in jpx.js. For example, the for loop style is quite similar to the ones appear in the functions near my new ones.
  • (Just a question to learn) about all the comments about redundant lines and variables: Do these comments are only about coding style, or they have a meaning to the javascript performance? Although I'm new to javascript and web development I knew the minifying issue, but I thought it has nothing with development code and that the minifier should solve the problem.

Anyway I would be happy to learn your coding conventions (I will be greatful to a link documents it, if any exist), in order to align my code with them in following contributions.

@CodingFabian
Copy link
Contributor

None of the comments is related to performance. Maybe in esoteric edge cases, but usually its just about style used here in the project, which is mainly introduced by mozilla contributors. Thats why I kept back on my personal feelings about the style :-)
There is a short style guide here:
https://github.com/mozilla/pdf.js/wiki/Style-Guide

@Snuffleupagus
Copy link
Collaborator

This PR still needs proper review by a developer, but let's check that there are no regressions.

/botio test

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.22.172.223:8877/e38329d42f020ab/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.21.233.14:8877/b72b42a3867cc2c/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/e38329d42f020ab/output.txt

Total script time: 20.42 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/b72b42a3867cc2c/output.txt

Total script time: 23.87 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@CodingFabian
Copy link
Contributor

lets ping @yurydelendik :-)

@fkaelberer fkaelberer mentioned this pull request Dec 2, 2014
@MaMazav
Copy link
Contributor Author

MaMazav commented Dec 14, 2014

Another ping ;)

Just wanted to ensure it is not forgotten.

@timvandermeij
Copy link
Contributor

@yurydelendik Could you review this?

@yurydelendik yurydelendik self-assigned this Dec 15, 2014
maxDecompositionLevelsCount = Math.max(maxDecompositionLevelsCount,
component.codingStyleParameters.decompositionLevelsCount);
}
var maxNumPrecinctsInLevel = new Array(maxDecompositionLevelsCount + 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use new Int32Array(maxDecompositionLevelsCount + 1); (will go over 80 cols, might need to break line)

@yurydelendik
Copy link
Contributor

Looks good, thanks! Good to go after commets above are addressed.

@yurydelendik
Copy link
Contributor

/botio test

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_test from @yurydelendik received. Current queue size: 0

Live output at: http://107.22.172.223:8877/e00476742d82402/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_test from @yurydelendik received. Current queue size: 0

Live output at: http://107.21.233.14:8877/e73c9d2ffbfc1a5/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/e00476742d82402/output.txt

Total script time: 17.08 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/e73c9d2ffbfc1a5/output.txt

Total script time: 22.66 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

yurydelendik added a commit that referenced this pull request Dec 18, 2014
@yurydelendik yurydelendik merged commit c918cc5 into mozilla:master Dec 18, 2014
@yurydelendik
Copy link
Contributor

Thank you for the patch!

@MaMazav MaMazav deleted the Issue5418_Progression_Orders branch December 19, 2014 08:13
speedplane pushed a commit to speedplane/pdf.js that referenced this pull request Feb 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants