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

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

Issue 589243004: Update openjpeg (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Update to openjpeg r2891 Created 6 years, 2 months 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) 2008, Jerome Fimes, Communications & Systemes <jerome.fimes@c-s .fr> 7 * Copyright (c) 2008, Jerome Fimes, Communications & Systemes <jerome.fimes@c-s .fr>
8 * All rights reserved. 8 * All rights reserved.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
(...skipping 21 matching lines...) Expand all
32 #include "opj_includes.h" 32 #include "opj_includes.h"
33 33
34 /** 34 /**
35 * Default size of the validation list, if not sufficient, data will be realloca ted with a double size. 35 * Default size of the validation list, if not sufficient, data will be realloca ted with a double size.
36 */ 36 */
37 #define OPJ_VALIDATION_SIZE 10 37 #define OPJ_VALIDATION_SIZE 10
38 38
39 opj_procedure_list_t * opj_procedure_list_create() 39 opj_procedure_list_t * opj_procedure_list_create()
40 { 40 {
41 /* memory allocation */ 41 /* memory allocation */
42 opj_procedure_list_t * l_validation = (opj_procedure_list_t *) opj_mallo c(sizeof(opj_procedure_list_t)); 42 opj_procedure_list_t * l_validation = (opj_procedure_list_t *) opj_callo c(1,sizeof(opj_procedure_list_t));
43 if (! l_validation) 43 if (! l_validation)
44 { 44 {
45 return 00; 45 return 00;
46 } 46 }
47 /* initialization */ 47 /* initialization */
48 memset(l_validation,0,sizeof(opj_procedure_list_t));
49 l_validation->m_nb_max_procedures = OPJ_VALIDATION_SIZE; 48 l_validation->m_nb_max_procedures = OPJ_VALIDATION_SIZE;
50 l_validation->m_procedures = (opj_procedure*)opj_malloc( 49 l_validation->m_procedures = (opj_procedure*)opj_calloc(OPJ_VALIDATION_S IZE, sizeof(opj_procedure));
51 OPJ_VALIDATION_SIZE * sizeof(opj_procedure));
52 if (! l_validation->m_procedures) 50 if (! l_validation->m_procedures)
53 { 51 {
54 opj_free(l_validation); 52 opj_free(l_validation);
55 return 00; 53 return 00;
56 } 54 }
57 memset(l_validation->m_procedures,0,OPJ_VALIDATION_SIZE * sizeof(opj_pro cedure));
58 return l_validation; 55 return l_validation;
59 } 56 }
60 57
61 void opj_procedure_list_destroy(opj_procedure_list_t * p_list) 58 void opj_procedure_list_destroy(opj_procedure_list_t * p_list)
62 { 59 {
63 if (! p_list) 60 if (! p_list)
64 { 61 {
65 return; 62 return;
66 } 63 }
67 /* initialization */ 64 /* initialization */
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 107
111 opj_procedure* opj_procedure_list_get_first_procedure (opj_procedure_list_t * p_ validation_list) 108 opj_procedure* opj_procedure_list_get_first_procedure (opj_procedure_list_t * p_ validation_list)
112 { 109 {
113 return p_validation_list->m_procedures; 110 return p_validation_list->m_procedures;
114 } 111 }
115 112
116 void opj_procedure_list_clear (opj_procedure_list_t * p_validation_list) 113 void opj_procedure_list_clear (opj_procedure_list_t * p_validation_list)
117 { 114 {
118 p_validation_list->m_nb_procedures = 0; 115 p_validation_list->m_nb_procedures = 0;
119 } 116 }
OLDNEW
« no previous file with comments | « core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/dwt.c ('k') | core/src/fxcodec/fx_libopenjpeg/libopenjpeg20/image.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698