aboutsummaryrefslogtreecommitdiff
path: root/transupp.c
diff options
context:
space:
mode:
authorDRC <dcommander@users.sourceforge.net>2011-03-04 03:20:34 +0000
committerDRC <dcommander@users.sourceforge.net>2011-03-04 03:20:34 +0000
commitba5ea5143e48b71234414139e3b4cb244599e875 (patch)
treeb024a941311e884fc703fc69ec7607fd32f94411 /transupp.c
parentf2cef492b141e085841acbfd89a98c2eb782781f (diff)
downloadlibjpeg-turbo-ba5ea5143e48b71234414139e3b4cb244599e875.tar.gz
Tile generation did not work with TJXFORM_HFLIP, because the underlying transform code was using an in-place algorithm, which modified the source coefficients after the first tile was generated. Thus, create a new option which allows TurboJPEG to turn off the in-place horizontal flip if there are multiple transforms being performed from the same set of coefficients.
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@495 632fc199-4ca6-4c93-a231-07263d6284db
Diffstat (limited to 'transupp.c')
-rw-r--r--transupp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/transupp.c b/transupp.c
index 5c314168..25136910 100644
--- a/transupp.c
+++ b/transupp.c
@@ -1022,7 +1022,7 @@ jtransform_request_workspace (j_decompress_ptr srcinfo,
case JXFORM_FLIP_H:
if (info->trim)
trim_right_edge(info, srcinfo->output_width);
- if (info->y_crop_offset != 0)
+ if (info->y_crop_offset != 0 || info->slow_hflip)
need_workspace = TRUE;
/* do_flip_h_no_crop doesn't need a workspace array */
break;
@@ -1448,7 +1448,7 @@ jtransform_execute_transform (j_decompress_ptr srcinfo,
src_coef_arrays, dst_coef_arrays);
break;
case JXFORM_FLIP_H:
- if (info->y_crop_offset != 0)
+ if (info->y_crop_offset != 0 || info->slow_hflip)
do_flip_h(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset,
src_coef_arrays, dst_coef_arrays);
else