Skip to content

Commit

Permalink
I'm not sure why, but this was necessary in order to return the 32-bi…
Browse files Browse the repository at this point in the history
…t performance to the 0.0.90 baseline

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@165 632fc199-4ca6-4c93-a231-07263d6284db
  • Loading branch information
dcommander committed Mar 20, 2010
1 parent 1e6b5b4 commit 97f8ec4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions jdhuff.c
Expand Up @@ -765,21 +765,25 @@ METHODDEF(boolean)
decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
{
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
int usefast = 1;

/* Process restart marker if needed; may have to suspend */
if (cinfo->restart_interval) {
if (entropy->restarts_to_go == 0)
if (! process_restart(cinfo))
return FALSE;
usefast = 0;
}

if (cinfo->src->bytes_in_buffer < BUFSIZE * cinfo->blocks_in_MCU)
usefast = 0;

/* If we've run out of data, just leave the MCU set to zeroes.
* This way, we return uniform gray for the remainder of the segment.
*/
if (! entropy->pub.insufficient_data) {

if (cinfo->src->bytes_in_buffer >= BUFSIZE * cinfo->blocks_in_MCU
&& !cinfo->restart_interval) {
if (usefast) {
if (!decode_mcu_fast(cinfo, MCU_data)) return FALSE;
}
else {
Expand Down

0 comments on commit 97f8ec4

Please sign in to comment.