aboutsummaryrefslogtreecommitdiff
path: root/transupp.c
diff options
context:
space:
mode:
authordcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db>2011-03-04 03:20:34 +0000
committerdcommander <dcommander@632fc199-4ca6-4c93-a231-07263d6284db>2011-03-04 03:20:34 +0000
commitcf6a178a1bbfe16569e7ec367026aa2fdfdb119b (patch)
treeb024a941311e884fc703fc69ec7607fd32f94411 /transupp.c
parent911c9b811175c26fa68a89965f7ce9c62a9bfeb5 (diff)
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://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 5c31416..2513691 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