Refactored YUVImage Java class so that it supports both unified YUV image buffers as well as separate YUV image planes; modified the JNI functions accordingly and added new helper functions to the TurboJPEG C API (tjPlaneWidth(), tjPlaneHeight(), tjPlaneSizeYUV()) to facilitate those modifications; changed potentially confusing "component width" and "component height" terms to "plane width" and "plane height" and modified variable names in turbojpeg.c to reflect this; numerous other documentation tweaks

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1360 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
DRC
2014-08-17 12:23:49 +00:00
parent ef5d1ea229
commit 3d037a5c72
28 changed files with 2278 additions and 904 deletions

View File

@@ -42,6 +42,7 @@ public class TJScalingFactor {
/**
* Returns numerator
*
* @return numerator
*/
public int getNum() {
@@ -50,6 +51,7 @@ public class TJScalingFactor {
/**
* Returns denominator
*
* @return denominator
*/
public int getDenom() {
@@ -60,7 +62,8 @@ public class TJScalingFactor {
* Returns the scaled value of <code>dimension</code>. This function
* performs the integer equivalent of
* <code>ceil(dimension * scalingFactor)</code>.
* @return the scaled value of <code>dimension</code>
*
* @return the scaled value of <code>dimension</code>.
*/
public int getScaled(int dimension) {
return (dimension * num + denom - 1) / denom;
@@ -69,8 +72,9 @@ public class TJScalingFactor {
/**
* Returns true or false, depending on whether this instance and
* <code>other</code> have the same numerator and denominator.
*
* @return true or false, depending on whether this instance and
* <code>other</code> have the same numerator and denominator
* <code>other</code> have the same numerator and denominator.
*/
public boolean equals(TJScalingFactor other) {
return (this.num == other.num && this.denom == other.denom);
@@ -79,8 +83,9 @@ public class TJScalingFactor {
/**
* Returns true or false, depending on whether this instance is equal to
* 1/1.
*
* @return true or false, depending on whether this instance is equal to
* 1/1
* 1/1.
*/
public boolean isOne() {
return (num == 1 && denom == 1);