| OLD | NEW |
| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 * FIXME DOC | 208 * FIXME DOC |
| 209 */ | 209 */ |
| 210 static void opj_pi_update_decode_poc ( opj_pi_iterator_t * p_pi, | 210 static void opj_pi_update_decode_poc ( opj_pi_iterator_t * p_pi, |
| 211 opj_tcp_t * p_tcp, | 211 opj_tcp_t * p_tcp, |
| 212 OPJ_UINT32 p_max_precision, | 212 OPJ_UINT32 p_max_precision, |
| 213 OPJ_UINT32 p_max_res); | 213 OPJ_UINT32 p_max_res); |
| 214 | 214 |
| 215 /** | 215 /** |
| 216 * FIXME DOC | 216 * FIXME DOC |
| 217 */ | 217 */ |
| 218 OPJ_BOOL opj_pi_check_next_level(» OPJ_INT32 pos, | 218 static OPJ_BOOL opj_pi_check_next_level(» OPJ_INT32 pos, |
| 219 opj_cp_t *cp, | 219 opj_cp_t *cp, |
| 220 OPJ_UINT32 tilen
o, | 220 OPJ_UINT32 tilen
o, |
| 221 OPJ_UINT32 pino, | 221 OPJ_UINT32 pino, |
| 222 const OPJ_CHAR *
prog); | 222 const OPJ_CHAR *
prog); |
| 223 | 223 |
| 224 /*@}*/ | 224 /*@}*/ |
| 225 | 225 |
| 226 /*@}*/ | 226 /*@}*/ |
| 227 | 227 |
| 228 /* | 228 /* |
| 229 ========================================================== | 229 ========================================================== |
| 230 local functions | 230 local functions |
| 231 ========================================================== | 231 ========================================================== |
| 232 */ | 232 */ |
| 233 | 233 |
| 234 OPJ_BOOL opj_pi_next_lrcp(opj_pi_iterator_t * pi) { | 234 static OPJ_BOOL opj_pi_next_lrcp(opj_pi_iterator_t * pi) { |
| 235 opj_pi_comp_t *comp = NULL; | 235 opj_pi_comp_t *comp = NULL; |
| 236 opj_pi_resolution_t *res = NULL; | 236 opj_pi_resolution_t *res = NULL; |
| 237 OPJ_UINT32 index = 0; | 237 OPJ_UINT32 index = 0; |
| 238 | 238 |
| 239 if (!pi->first) { | 239 if (!pi->first) { |
| 240 comp = &pi->comps[pi->compno]; | 240 comp = &pi->comps[pi->compno]; |
| 241 res = &comp->resolutions[pi->resno]; | 241 res = &comp->resolutions[pi->resno]; |
| 242 goto LABEL_SKIP; | 242 goto LABEL_SKIP; |
| 243 } else { | 243 } else { |
| 244 pi->first = 0; | 244 pi->first = 0; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 264 } | 264 } |
| 265 LABEL_SKIP:; | 265 LABEL_SKIP:; |
| 266 } | 266 } |
| 267 } | 267 } |
| 268 } | 268 } |
| 269 } | 269 } |
| 270 | 270 |
| 271 return OPJ_FALSE; | 271 return OPJ_FALSE; |
| 272 } | 272 } |
| 273 | 273 |
| 274 OPJ_BOOL opj_pi_next_rlcp(opj_pi_iterator_t * pi) { | 274 static OPJ_BOOL opj_pi_next_rlcp(opj_pi_iterator_t * pi) { |
| 275 opj_pi_comp_t *comp = NULL; | 275 opj_pi_comp_t *comp = NULL; |
| 276 opj_pi_resolution_t *res = NULL; | 276 opj_pi_resolution_t *res = NULL; |
| 277 OPJ_UINT32 index = 0; | 277 OPJ_UINT32 index = 0; |
| 278 | 278 |
| 279 if (!pi->first) { | 279 if (!pi->first) { |
| 280 comp = &pi->comps[pi->compno]; | 280 comp = &pi->comps[pi->compno]; |
| 281 res = &comp->resolutions[pi->resno]; | 281 res = &comp->resolutions[pi->resno]; |
| 282 goto LABEL_SKIP; | 282 goto LABEL_SKIP; |
| 283 } else { | 283 } else { |
| 284 pi->first = 0; | 284 pi->first = 0; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 303 } | 303 } |
| 304 LABEL_SKIP:; | 304 LABEL_SKIP:; |
| 305 } | 305 } |
| 306 } | 306 } |
| 307 } | 307 } |
| 308 } | 308 } |
| 309 | 309 |
| 310 return OPJ_FALSE; | 310 return OPJ_FALSE; |
| 311 } | 311 } |
| 312 | 312 |
| 313 OPJ_BOOL opj_pi_next_rpcl(opj_pi_iterator_t * pi) { | 313 static OPJ_BOOL opj_pi_next_rpcl(opj_pi_iterator_t * pi) { |
| 314 opj_pi_comp_t *comp = NULL; | 314 opj_pi_comp_t *comp = NULL; |
| 315 opj_pi_resolution_t *res = NULL; | 315 opj_pi_resolution_t *res = NULL; |
| 316 OPJ_UINT32 index = 0; | 316 OPJ_UINT32 index = 0; |
| 317 | 317 |
| 318 if (!pi->first) { | 318 if (!pi->first) { |
| 319 goto LABEL_SKIP; | 319 goto LABEL_SKIP; |
| 320 } else { | 320 } else { |
| 321 OPJ_UINT32 compno, resno; | 321 OPJ_UINT32 compno, resno; |
| 322 pi->first = 0; | 322 pi->first = 0; |
| 323 pi->dx = 0; | 323 pi->dx = 0; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 LABEL_SKIP:; | 386 LABEL_SKIP:; |
| 387 } | 387 } |
| 388 } | 388 } |
| 389 } | 389 } |
| 390 } | 390 } |
| 391 } | 391 } |
| 392 | 392 |
| 393 return OPJ_FALSE; | 393 return OPJ_FALSE; |
| 394 } | 394 } |
| 395 | 395 |
| 396 OPJ_BOOL opj_pi_next_pcrl(opj_pi_iterator_t * pi) { | 396 static OPJ_BOOL opj_pi_next_pcrl(opj_pi_iterator_t * pi) { |
| 397 opj_pi_comp_t *comp = NULL; | 397 opj_pi_comp_t *comp = NULL; |
| 398 opj_pi_resolution_t *res = NULL; | 398 opj_pi_resolution_t *res = NULL; |
| 399 OPJ_UINT32 index = 0; | 399 OPJ_UINT32 index = 0; |
| 400 | 400 |
| 401 if (!pi->first) { | 401 if (!pi->first) { |
| 402 comp = &pi->comps[pi->compno]; | 402 comp = &pi->comps[pi->compno]; |
| 403 goto LABEL_SKIP; | 403 goto LABEL_SKIP; |
| 404 } else { | 404 } else { |
| 405 OPJ_UINT32 compno, resno; | 405 OPJ_UINT32 compno, resno; |
| 406 pi->first = 0; | 406 pi->first = 0; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 LABEL_SKIP:; | 467 LABEL_SKIP:; |
| 468 } | 468 } |
| 469 } | 469 } |
| 470 } | 470 } |
| 471 } | 471 } |
| 472 } | 472 } |
| 473 | 473 |
| 474 return OPJ_FALSE; | 474 return OPJ_FALSE; |
| 475 } | 475 } |
| 476 | 476 |
| 477 OPJ_BOOL opj_pi_next_cprl(opj_pi_iterator_t * pi) { | 477 static OPJ_BOOL opj_pi_next_cprl(opj_pi_iterator_t * pi) { |
| 478 opj_pi_comp_t *comp = NULL; | 478 opj_pi_comp_t *comp = NULL; |
| 479 opj_pi_resolution_t *res = NULL; | 479 opj_pi_resolution_t *res = NULL; |
| 480 OPJ_UINT32 index = 0; | 480 OPJ_UINT32 index = 0; |
| 481 | 481 |
| 482 if (!pi->first) { | 482 if (!pi->first) { |
| 483 comp = &pi->comps[pi->compno]; | 483 comp = &pi->comps[pi->compno]; |
| 484 goto LABEL_SKIP; | 484 goto LABEL_SKIP; |
| 485 } else { | 485 } else { |
| 486 pi->first = 0; | 486 pi->first = 0; |
| 487 } | 487 } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 LABEL_SKIP:; | 546 LABEL_SKIP:; |
| 547 } | 547 } |
| 548 } | 548 } |
| 549 } | 549 } |
| 550 } | 550 } |
| 551 } | 551 } |
| 552 | 552 |
| 553 return OPJ_FALSE; | 553 return OPJ_FALSE; |
| 554 } | 554 } |
| 555 | 555 |
| 556 void opj_get_encoding_parameters(» const opj_image_t *p_image, | 556 static void opj_get_encoding_parameters(» const opj_image_t *p_image, |
| 557 const opj_cp_t *p_cp, | 557 const opj_cp_t *p_cp, |
| 558 OPJ_UINT32 p_tileno, | 558 OPJ_UINT32 p_tileno, |
| 559 OPJ_INT32 * p_tx0, | 559 OPJ_INT32 * p_tx0, |
| 560 OPJ_INT32 * p_tx1, | 560 OPJ_INT32 * p_tx1, |
| 561 OPJ_INT32 * p_ty0, | 561 OPJ_INT32 * p_ty0, |
| 562 OPJ_INT32 * p_ty1, | 562 OPJ_INT32 * p_ty1, |
| 563 OPJ_UINT32 * p_dx_min, | 563 OPJ_UINT32 * p_dx_min, |
| 564 OPJ_UINT32 * p_dy_min, | 564 OPJ_UINT32 * p_dy_min, |
| 565 OPJ_UINT32 * p_max_prec, | 565 OPJ_UINT32 * p_max_prec, |
| 566 OPJ_UINT32 * p_max_res ) | 566 OPJ_UINT32 * p_max_res ) |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 if (l_product > *p_max_prec) { | 660 if (l_product > *p_max_prec) { |
| 661 *p_max_prec = l_product; | 661 *p_max_prec = l_product; |
| 662 } | 662 } |
| 663 } | 663 } |
| 664 ++l_img_comp; | 664 ++l_img_comp; |
| 665 ++l_tccp; | 665 ++l_tccp; |
| 666 } | 666 } |
| 667 } | 667 } |
| 668 | 668 |
| 669 | 669 |
| 670 void opj_get_all_encoding_parameters( const opj_image_t *p_image, | 670 static void opj_get_all_encoding_parameters( const opj_image_t *p_image, |
| 671 const opj_cp_t *p_cp, | 671 const opj_cp_t *p_cp, |
| 672 OPJ_UINT32 tileno, | 672 OPJ_UINT32 tileno, |
| 673 OPJ_INT32 * p_tx0, | 673 OPJ_INT32 * p_tx0, |
| 674 OPJ_INT32 * p_tx1, | 674 OPJ_INT32 * p_tx1, |
| 675 OPJ_INT32 * p_ty0, | 675 OPJ_INT32 * p_ty0, |
| 676 OPJ_INT32 * p_ty1, | 676 OPJ_INT32 * p_ty1, |
| 677 OPJ_UINT32 * p_dx_min, | 677 OPJ_UINT32 * p_dx_min, |
| 678 OPJ_UINT32 * p_dy_min, | 678 OPJ_UINT32 * p_dy_min, |
| 679 OPJ_UINT32 * p_max_prec, | 679 OPJ_UINT32 * p_max_prec, |
| 680 OPJ_UINT32 * p_max_res, | 680 OPJ_UINT32 * p_max_res, |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 *p_max_prec = l_product; | 783 *p_max_prec = l_product; |
| 784 } | 784 } |
| 785 | 785 |
| 786 --l_level_no; | 786 --l_level_no; |
| 787 } | 787 } |
| 788 ++l_tccp; | 788 ++l_tccp; |
| 789 ++l_img_comp; | 789 ++l_img_comp; |
| 790 } | 790 } |
| 791 } | 791 } |
| 792 | 792 |
| 793 opj_pi_iterator_t * opj_pi_create(» const opj_image_t *image, | 793 static opj_pi_iterator_t * opj_pi_create(» const opj_image_t *image, |
| 794 const opj_cp_t *cp, | 794 const opj_cp_t *cp, |
| 795 OPJ_UINT32 tileno ) | 795 OPJ_UINT32 tileno ) |
| 796 { | 796 { |
| 797 /* loop*/ | 797 /* loop*/ |
| 798 OPJ_UINT32 pino, compno; | 798 OPJ_UINT32 pino, compno; |
| 799 /* number of poc in the p_pi*/ | 799 /* number of poc in the p_pi*/ |
| 800 OPJ_UINT32 l_poc_bound; | 800 OPJ_UINT32 l_poc_bound; |
| 801 | 801 |
| 802 /* pointers to tile coding parameters and components.*/ | 802 /* pointers to tile coding parameters and components.*/ |
| 803 opj_pi_iterator_t *l_pi = 00; | 803 opj_pi_iterator_t *l_pi = 00; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 return 00; | 844 return 00; |
| 845 } | 845 } |
| 846 | 846 |
| 847 comp->numresolutions = tccp->numresolutions; | 847 comp->numresolutions = tccp->numresolutions; |
| 848 } | 848 } |
| 849 ++l_current_pi; | 849 ++l_current_pi; |
| 850 } | 850 } |
| 851 return l_pi; | 851 return l_pi; |
| 852 } | 852 } |
| 853 | 853 |
| 854 void opj_pi_update_encode_poc_and_final ( opj_cp_t *p_cp, | 854 static void opj_pi_update_encode_poc_and_final ( opj_cp_t *p_cp, |
| 855 OPJ_UINT32 p_tileno, | 855 OPJ_UINT32 p_tileno, |
| 856 OPJ_INT32 p_tx0, | 856 OPJ_INT32 p_tx0, |
| 857 OPJ_INT32 p_tx1, | 857 OPJ_INT32 p_tx1, |
| 858 OPJ_INT32 p_ty0, | 858 OPJ_INT32 p_ty0, |
| 859 OPJ_INT32 p_ty1, | 859 OPJ_INT32 p_ty1, |
| 860 OPJ_UINT32 p_max_prec, | 860 OPJ_UINT32 p_max_prec, |
| 861 OPJ_UINT32 p_max_res, | 861 OPJ_UINT32 p_max_res, |
| 862 OPJ_UINT32 p_dx_min, | 862 OPJ_UINT32 p_dx_min, |
| 863 OPJ_UINT32 p_dy_min) | 863 OPJ_UINT32 p_dy_min) |
| 864 { | 864 { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 l_current_poc->txS = (OPJ_UINT32)p_tx0; | 922 l_current_poc->txS = (OPJ_UINT32)p_tx0; |
| 923 l_current_poc->txE = (OPJ_UINT32)p_tx1; | 923 l_current_poc->txE = (OPJ_UINT32)p_tx1; |
| 924 l_current_poc->tyS = (OPJ_UINT32)p_ty0; | 924 l_current_poc->tyS = (OPJ_UINT32)p_ty0; |
| 925 l_current_poc->tyE = (OPJ_UINT32)p_ty1; | 925 l_current_poc->tyE = (OPJ_UINT32)p_ty1; |
| 926 l_current_poc->dx = p_dx_min; | 926 l_current_poc->dx = p_dx_min; |
| 927 l_current_poc->dy = p_dy_min; | 927 l_current_poc->dy = p_dy_min; |
| 928 ++ l_current_poc; | 928 ++ l_current_poc; |
| 929 } | 929 } |
| 930 } | 930 } |
| 931 | 931 |
| 932 void opj_pi_update_encode_not_poc (» opj_cp_t *p_cp, | 932 static void opj_pi_update_encode_not_poc (» opj_cp_t *p_cp, |
| 933 OPJ_UINT32 p_num_comps, | 933 OPJ_UINT32 p_num_comps, |
| 934 OPJ_UINT32 p_tileno, | 934 OPJ_UINT32 p_tileno, |
| 935 OPJ_INT32 p_tx0, | 935 OPJ_INT32 p_tx0, |
| 936 OPJ_INT32 p_tx1, | 936 OPJ_INT32 p_tx1, |
| 937 OPJ_INT32 p_ty0, | 937 OPJ_INT32 p_ty0, |
| 938 OPJ_INT32 p_ty1, | 938 OPJ_INT32 p_ty1, |
| 939 OPJ_UINT32 p_max_prec, | 939 OPJ_UINT32 p_max_prec, |
| 940 OPJ_UINT32 p_max_res, | 940 OPJ_UINT32 p_max_res, |
| 941 OPJ_UINT32 p_dx_min, | 941 OPJ_UINT32 p_dx_min, |
| 942 OPJ_UINT32 p_dy_min) | 942 OPJ_UINT32 p_dy_min) |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 l_current_poc->txS = (OPJ_UINT32)p_tx0; | 977 l_current_poc->txS = (OPJ_UINT32)p_tx0; |
| 978 l_current_poc->txE = (OPJ_UINT32)p_tx1; | 978 l_current_poc->txE = (OPJ_UINT32)p_tx1; |
| 979 l_current_poc->tyS = (OPJ_UINT32)p_ty0; | 979 l_current_poc->tyS = (OPJ_UINT32)p_ty0; |
| 980 l_current_poc->tyE = (OPJ_UINT32)p_ty1; | 980 l_current_poc->tyE = (OPJ_UINT32)p_ty1; |
| 981 l_current_poc->dx = p_dx_min; | 981 l_current_poc->dx = p_dx_min; |
| 982 l_current_poc->dy = p_dy_min; | 982 l_current_poc->dy = p_dy_min; |
| 983 ++ l_current_poc; | 983 ++ l_current_poc; |
| 984 } | 984 } |
| 985 } | 985 } |
| 986 | 986 |
| 987 void opj_pi_update_decode_poc (opj_pi_iterator_t * p_pi, | 987 static void opj_pi_update_decode_poc (opj_pi_iterator_t * p_pi, |
| 988 opj_tcp_t * p_tcp, | 988 opj_tcp_t * p_tcp, |
| 989 OPJ_UINT32 p_max_precision, | 989 OPJ_UINT32 p_max_precision, |
| 990 OPJ_UINT32 p_max_res) | 990 OPJ_UINT32 p_max_res) |
| 991 { | 991 { |
| 992 /* loop*/ | 992 /* loop*/ |
| 993 OPJ_UINT32 pino; | 993 OPJ_UINT32 pino; |
| 994 | 994 |
| 995 /* encoding prameters to set*/ | 995 /* encoding prameters to set*/ |
| 996 OPJ_UINT32 l_bound; | 996 OPJ_UINT32 l_bound; |
| 997 | 997 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1019 l_current_pi->poc.precno0 = 0; | 1019 l_current_pi->poc.precno0 = 0; |
| 1020 l_current_pi->poc.resno1 = l_current_poc->resno1; /* Resolution
Level Index #0 (End) */ | 1020 l_current_pi->poc.resno1 = l_current_poc->resno1; /* Resolution
Level Index #0 (End) */ |
| 1021 l_current_pi->poc.compno1 = l_current_poc->compno1; /* Component
Index #0 (End) */ | 1021 l_current_pi->poc.compno1 = l_current_poc->compno1; /* Component
Index #0 (End) */ |
| 1022 l_current_pi->poc.layno1 = l_current_poc->layno1; /* Layer Index
#0 (End) */ | 1022 l_current_pi->poc.layno1 = l_current_poc->layno1; /* Layer Index
#0 (End) */ |
| 1023 l_current_pi->poc.precno1 = p_max_precision; | 1023 l_current_pi->poc.precno1 = p_max_precision; |
| 1024 ++l_current_pi; | 1024 ++l_current_pi; |
| 1025 ++l_current_poc; | 1025 ++l_current_poc; |
| 1026 } | 1026 } |
| 1027 } | 1027 } |
| 1028 | 1028 |
| 1029 void opj_pi_update_decode_not_poc (opj_pi_iterator_t * p_pi, | 1029 static void opj_pi_update_decode_not_poc (opj_pi_iterator_t * p_pi, |
| 1030 opj_tcp_t * p_tcp, | 1030 opj_tcp_t * p_tcp, |
| 1031 OPJ_UINT32 p_max_precision, | 1031 OPJ_UINT32 p_max_precision, |
| 1032 OPJ_UINT32 p_max_res) | 1032 OPJ_UINT32 p_max_res) |
| 1033 { | 1033 { |
| 1034 /* loop*/ | 1034 /* loop*/ |
| 1035 OPJ_UINT32 pino; | 1035 OPJ_UINT32 pino; |
| 1036 | 1036 |
| 1037 /* encoding prameters to set*/ | 1037 /* encoding prameters to set*/ |
| 1038 OPJ_UINT32 l_bound; | 1038 OPJ_UINT32 l_bound; |
| 1039 | 1039 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1056 l_current_pi->poc.resno1 = p_max_res; | 1056 l_current_pi->poc.resno1 = p_max_res; |
| 1057 l_current_pi->poc.compno1 = l_current_pi->numcomps; | 1057 l_current_pi->poc.compno1 = l_current_pi->numcomps; |
| 1058 l_current_pi->poc.layno1 = p_tcp->numlayers; | 1058 l_current_pi->poc.layno1 = p_tcp->numlayers; |
| 1059 l_current_pi->poc.precno1 = p_max_precision; | 1059 l_current_pi->poc.precno1 = p_max_precision; |
| 1060 ++l_current_pi; | 1060 ++l_current_pi; |
| 1061 } | 1061 } |
| 1062 } | 1062 } |
| 1063 | 1063 |
| 1064 | 1064 |
| 1065 | 1065 |
| 1066 OPJ_BOOL opj_pi_check_next_level(» OPJ_INT32 pos, | 1066 static OPJ_BOOL opj_pi_check_next_level(» OPJ_INT32 pos, |
| 1067 opj_cp_t *cp, | 1067 opj_cp_t *cp, |
| 1068 OPJ_UINT32 tilen
o, | 1068 OPJ_UINT32 tilen
o, |
| 1069 OPJ_UINT32 pino, | 1069 OPJ_UINT32 pino, |
| 1070 const OPJ_CHAR *
prog) | 1070 const OPJ_CHAR *
prog) |
| 1071 { | 1071 { |
| 1072 OPJ_INT32 i; | 1072 OPJ_INT32 i; |
| 1073 opj_tcp_t *tcps =&cp->tcps[tileno]; | 1073 opj_tcp_t *tcps =&cp->tcps[tileno]; |
| 1074 opj_poc_t *tcp = &tcps->pocs[pino]; | 1074 opj_poc_t *tcp = &tcps->pocs[pino]; |
| 1075 | 1075 |
| 1076 if(pos>=0){ | 1076 if(pos>=0){ |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1234 l_step_l = l_max_res * l_step_r; | 1234 l_step_l = l_max_res * l_step_r; |
| 1235 | 1235 |
| 1236 /* set values for first packet iterator */ | 1236 /* set values for first packet iterator */ |
| 1237 l_current_pi = l_pi; | 1237 l_current_pi = l_pi; |
| 1238 | 1238 |
| 1239 /* memory allocation for include */ | 1239 /* memory allocation for include */ |
| 1240 l_current_pi->include = 00; | 1240 l_current_pi->include = 00; |
| 1241 if | 1241 if |
| 1242 (l_step_l && l_tcp->numlayers < UINT_MAX / l_step_l - 1) | 1242 (l_step_l && l_tcp->numlayers < UINT_MAX / l_step_l - 1) |
| 1243 { | 1243 { |
| 1244 » » l_current_pi->include = (OPJ_INT16*) opj_calloc((l_tcp->numlayer
s + 1) * l_step_l, sizeof(OPJ_INT16)); | 1244 » » l_current_pi->include = (OPJ_INT16*)opj_calloc((l_tcp->numlayers
+ 1) * l_step_l, sizeof(OPJ_INT16)); |
| 1245 } | 1245 } |
| 1246 | 1246 |
| 1247 if | 1247 if |
| 1248 (!l_current_pi->include) | 1248 (!l_current_pi->include) |
| 1249 { | 1249 { |
| 1250 opj_free(l_tmp_data); | 1250 opj_free(l_tmp_data); |
| 1251 opj_free(l_tmp_ptr); | 1251 opj_free(l_tmp_ptr); |
| 1252 opj_pi_destroy(l_pi, l_bound); | 1252 opj_pi_destroy(l_pi, l_bound); |
| 1253 return 00; | 1253 return 00; |
| 1254 } | 1254 } |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 /* get encoding parameters*/ | 1430 /* get encoding parameters*/ |
| 1431 opj_get_all_encoding_parameters(p_image,p_cp,p_tile_no,&l_tx0,&l_tx1,&l_
ty0,&l_ty1,&l_dx_min,&l_dy_min,&l_max_prec,&l_max_res,l_tmp_ptr); | 1431 opj_get_all_encoding_parameters(p_image,p_cp,p_tile_no,&l_tx0,&l_tx1,&l_
ty0,&l_ty1,&l_dx_min,&l_dy_min,&l_max_prec,&l_max_res,l_tmp_ptr); |
| 1432 | 1432 |
| 1433 /* step calculations*/ | 1433 /* step calculations*/ |
| 1434 l_step_p = 1; | 1434 l_step_p = 1; |
| 1435 l_step_c = l_max_prec * l_step_p; | 1435 l_step_c = l_max_prec * l_step_p; |
| 1436 l_step_r = p_image->numcomps * l_step_c; | 1436 l_step_r = p_image->numcomps * l_step_c; |
| 1437 l_step_l = l_max_res * l_step_r; | 1437 l_step_l = l_max_res * l_step_r; |
| 1438 | 1438 |
| 1439 /* set values for first packet iterator*/ | 1439 /* set values for first packet iterator*/ |
| 1440 » l_pi->tp_on = p_cp->m_specific_param.m_enc.m_tp_on; | 1440 » l_pi->tp_on = (OPJ_BYTE)p_cp->m_specific_param.m_enc.m_tp_on; |
| 1441 l_current_pi = l_pi; | 1441 l_current_pi = l_pi; |
| 1442 | 1442 |
| 1443 /* memory allocation for include*/ | 1443 /* memory allocation for include*/ |
| 1444 l_current_pi->include = (OPJ_INT16*) opj_calloc(l_tcp->numlayers * l_ste
p_l, sizeof(OPJ_INT16)); | 1444 l_current_pi->include = (OPJ_INT16*) opj_calloc(l_tcp->numlayers * l_ste
p_l, sizeof(OPJ_INT16)); |
| 1445 if (!l_current_pi->include) { | 1445 if (!l_current_pi->include) { |
| 1446 opj_free(l_tmp_data); | 1446 opj_free(l_tmp_data); |
| 1447 opj_free(l_tmp_ptr); | 1447 opj_free(l_tmp_ptr); |
| 1448 opj_pi_destroy(l_pi, l_bound); | 1448 opj_pi_destroy(l_pi, l_bound); |
| 1449 return 00; | 1449 return 00; |
| 1450 } | 1450 } |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1875 case OPJ_PCRL: | 1875 case OPJ_PCRL: |
| 1876 return opj_pi_next_pcrl(pi); | 1876 return opj_pi_next_pcrl(pi); |
| 1877 case OPJ_CPRL: | 1877 case OPJ_CPRL: |
| 1878 return opj_pi_next_cprl(pi); | 1878 return opj_pi_next_cprl(pi); |
| 1879 case OPJ_PROG_UNKNOWN: | 1879 case OPJ_PROG_UNKNOWN: |
| 1880 return OPJ_FALSE; | 1880 return OPJ_FALSE; |
| 1881 } | 1881 } |
| 1882 | 1882 |
| 1883 return OPJ_FALSE; | 1883 return OPJ_FALSE; |
| 1884 } | 1884 } |
| OLD | NEW |