Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1118)

Side by Side Diff: core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t2.c

Issue 758593002: Update to openjpeg r2944 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: tab Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * The copyright in this software is being made available under the 2-clauses 2 * The copyright in this software is being made available under the 2-clauses
3 * BSD License, included below. This software may be subject to other third 3 * BSD License, included below. This software may be subject to other third
4 * party and contributor rights, including patent rights, and no such rights 4 * party and contributor rights, including patent rights, and no such rights
5 * are granted under this license. 5 * are granted under this license.
6 * 6 *
7 * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium 7 * Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
8 * Copyright (c) 2002-2014, Professor Benoit Macq 8 * Copyright (c) 2002-2014, Professor Benoit Macq
9 * Copyright (c) 2001-2003, David Janssens 9 * Copyright (c) 2001-2003, David Janssens
10 * Copyright (c) 2002-2003, Yannick Verschueren 10 * Copyright (c) 2002-2003, Yannick Verschueren
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 380
381 l_current_pi = l_pi; 381 l_current_pi = l_pi;
382 382
383 for (pino = 0; pino <= l_tcp->numpocs; ++pino) { 383 for (pino = 0; pino <= l_tcp->numpocs; ++pino) {
384 384
385 /* if the resolution needed is too low, one dim of the tilec cou ld be equal to zero 385 /* if the resolution needed is too low, one dim of the tilec cou ld be equal to zero
386 * and no packets are used to decode this resolution and 386 * and no packets are used to decode this resolution and
387 * l_current_pi->resno is always >= p_tile->comps[l_current_pi-> compno].minimum_num_resolutions 387 * l_current_pi->resno is always >= p_tile->comps[l_current_pi-> compno].minimum_num_resolutions
388 * and no l_img_comp->resno_decoded are computed 388 * and no l_img_comp->resno_decoded are computed
389 */ 389 */
390 OPJ_BOOL* first_pass_failed = (OPJ_BOOL*)opj_malloc(l_image->num comps * sizeof(OPJ_BOOL)); 390 OPJ_BOOL* first_pass_failed = NULL;
391
392 if (l_current_pi->poc.prg == OPJ_PROG_UNKNOWN) {
393 /* TODO ADE : add an error */
394 opj_pi_destroy(l_pi, l_nb_pocs);
395 return OPJ_FALSE;
396 }
397
398 first_pass_failed = (OPJ_BOOL*)opj_malloc(l_image->numcomps * si zeof(OPJ_BOOL));
391 if (!first_pass_failed) 399 if (!first_pass_failed)
392 { 400 {
393 opj_pi_destroy(l_pi,l_nb_pocs); 401 opj_pi_destroy(l_pi,l_nb_pocs);
394 return OPJ_FALSE; 402 return OPJ_FALSE;
395 } 403 }
396 memset(first_pass_failed, OPJ_TRUE, l_image->numcomps * sizeof(O PJ_BOOL)); 404 memset(first_pass_failed, OPJ_TRUE, l_image->numcomps * sizeof(O PJ_BOOL));
397 405
398 if (l_current_pi->poc.prg == OPJ_PROG_UNKNOWN) {
399 /* TODO ADE : add an error */
400 opj_pi_destroy(l_pi, l_nb_pocs);
401 return OPJ_FALSE;
402 }
403 while (opj_pi_next(l_current_pi)) { 406 while (opj_pi_next(l_current_pi)) {
404 JAS_FPRINTF( stderr, "packet offset=00000166 prg=%d cmptno=%02 d rlvlno=%02d prcno=%03d lyrno=%02d\n\n", 407 JAS_FPRINTF( stderr, "packet offset=00000166 prg=%d cmptno=%02 d rlvlno=%02d prcno=%03d lyrno=%02d\n\n",
405 l_current_pi->poc.prg1, l_current_pi->compno, l_current_pi-> resno, l_current_pi->precno, l_current_pi->layno ); 408 l_current_pi->poc.prg1, l_current_pi->compno, l_current_pi-> resno, l_current_pi->precno, l_current_pi->layno );
406 409
407 if (l_tcp->num_layers_to_decode > l_current_pi->layno 410 if (l_tcp->num_layers_to_decode > l_current_pi->layno
408 && l_current_pi->resno < p_tile->comps[l _current_pi->compno].minimum_num_resolutions) { 411 && l_current_pi->resno < p_tile->comps[l _current_pi->compno].minimum_num_resolutions) {
409 l_nb_bytes_read = 0; 412 l_nb_bytes_read = 0;
410 413
411 first_pass_failed[l_current_pi->compno] = OPJ_FA LSE; 414 first_pass_failed[l_current_pi->compno] = OPJ_FA LSE;
412 415
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 seg->maxpasses = 10; 1364 seg->maxpasses = 10;
1362 } else { 1365 } else {
1363 seg->maxpasses = (((seg - 1)->maxpasses == 1) || ((seg - 1)->maxpasses == 10)) ? 2 : 1; 1366 seg->maxpasses = (((seg - 1)->maxpasses == 1) || ((seg - 1)->maxpasses == 10)) ? 2 : 1;
1364 } 1367 }
1365 } else { 1368 } else {
1366 seg->maxpasses = 109; 1369 seg->maxpasses = 109;
1367 } 1370 }
1368 1371
1369 return OPJ_TRUE; 1372 return OPJ_TRUE;
1370 } 1373 }
OLDNEW
« no previous file with comments | « core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/t1.c ('k') | core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/tcd.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698