Merge mozjpeg into libjpeg-turbo

* origin/master: (23 commits)
  Update .gitignore
  .func/.endfunc are only necessary when generating STABS debug info, which basically went out of style with parachute pants and Rick Astley.  At any rate, none of the platforms for which we're building the ARM code use it (DWARF is the common format these days), and the .func/.endfunc directives cause the clang integrated assembler to fail (http://llvm.org/bugs/show_bug.cgi?id=20424).
  Enable DC trellis by default
  Avoid double inline attribute
  Detect libpng
  Implement DHT Merging
  Add .gitignore for autotools files
  Check memory alloc success
  Update cjpeg usage text
  Implement DQT merging
  Fix issue with scan printout
  Get rid of unnecessary and obsolete platform configuration instructions.
  Add error checks for malloc calls that don't already have them. Issue #87.
  yuvjpeg: fix trivial leak
  Parse quality as float
  PNG reading support
  Fix issue with DC trellis
  Add option to split DC scans
  Add trellis for DC
  Bump version to 2.1.
  ...

Conflicts:
	BUILDING.txt
	cdjpeg.h
	jcdctmgr.c
	jchuff.h
	jcmarker.c
	jcmaster.c
	jconfig.txt
	jpeglib.h
	rdswitch.c
This commit is contained in:
Kornel Lesiński
2014-09-07 17:57:06 +01:00
22 changed files with 1031 additions and 568 deletions

View File

@@ -360,10 +360,13 @@ compress_trellis_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
JBLOCKARRAY buffer_dst;
for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
c_derived_tbl dctbl_data;
c_derived_tbl *dctbl = &dctbl_data;
c_derived_tbl actbl_data;
c_derived_tbl *actbl = &actbl_data;
compptr = cinfo->cur_comp_info[ci];
jpeg_make_c_derived_tbl(cinfo, TRUE, compptr->dc_tbl_no, &dctbl);
jpeg_make_c_derived_tbl(cinfo, FALSE, compptr->ac_tbl_no, &actbl);
/* Align the virtual buffer for this component. */
@@ -391,12 +394,15 @@ compress_trellis_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
ndummy = (int) (blocks_across % h_samp_factor);
if (ndummy > 0)
ndummy = h_samp_factor - ndummy;
lastDC = 0;
/* Perform DCT for all non-dummy blocks in this iMCU row. Each call
* on forward_DCT processes a complete horizontal row of DCT blocks.
*/
for (block_row = 0; block_row < block_rows; block_row++) {
thisblockrow = buffer[block_row];
quantize_trellis(cinfo, actbl, thisblockrow, buffer_dst[block_row], blocks_across, cinfo->quant_tbl_ptrs[compptr->quant_tbl_no], cinfo->norm_src[compptr->quant_tbl_no], cinfo->norm_coef[compptr->quant_tbl_no]);
quantize_trellis(cinfo, dctbl, actbl, thisblockrow, buffer_dst[block_row], blocks_across, cinfo->quant_tbl_ptrs[compptr->quant_tbl_no], cinfo->norm_src[compptr->quant_tbl_no], cinfo->norm_coef[compptr->quant_tbl_no], &lastDC);
if (ndummy > 0) {
/* Create dummy blocks at the right edge of the image. */