You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// packed_block_info_ptr holds only component type
254
254
if ( decoder->comp_table_huffman_map[i][GPUJPEG_HUFFMAN_DC] !=decoder->comp_table_huffman_map[i][GPUJPEG_HUFFMAN_AC] ) {
255
255
fprintf(stderr, "[GPUJPEG] [Warning] Using different table DC/AC indices (%d and %d) for component %d (ID %d)! Using Huffman CPU decoder. Please report to GPUJPEG developers.\n", decoder->comp_table_huffman_map[i][GPUJPEG_HUFFMAN_AC], decoder->comp_table_huffman_map[i][GPUJPEG_HUFFMAN_DC], i, decoder->comp_id[i]);
256
-
unsupp_gpu_huffman_params=1;
256
+
use_cpu_huffman_decoder=true;
257
257
}
258
258
// only DC/AC tables 0 and 1 are processed gpujpeg_huffman_decoder_table_kernel()
259
259
if ( decoder->comp_table_huffman_map[i][GPUJPEG_HUFFMAN_DC] >1||decoder->comp_table_huffman_map[i][GPUJPEG_HUFFMAN_AC] >1 ) {
260
260
fprintf(stderr, "[GPUJPEG] [Warning] Using Huffman tables (%d, %d) implies extended process! Using Huffman CPU decoder. Please report to GPUJPEG developers.\n", decoder->comp_table_huffman_map[i][GPUJPEG_HUFFMAN_AC], decoder->comp_table_huffman_map[i][GPUJPEG_HUFFMAN_DC]);
261
-
unsupp_gpu_huffman_params=1;
261
+
use_cpu_huffman_decoder=true;
262
262
}
263
263
}
264
264
265
+
if ( coder->segment_count<32 ) { // the CPU Huffman implementation will be likely faster
266
+
VERBOSE_MSG(decoder->coder.param.verbose, "Huffman has only %d segments. Using CPU decoder, which is slower!\n",
267
+
coder->segment_count);
268
+
use_cpu_huffman_decoder= true;
269
+
}
270
+
265
271
// Perform huffman decoding on CPU (when there are not enough segments to saturate GPU)
266
-
if (coder->segment_count<32||unsupp_gpu_huffman_params) {
0 commit comments