Home | History | Annotate | Download | only in lib

Lines Matching refs:ci

150   codec_setup_info *ci = vi->codec_setup;
151 return ci ? ci->blocksizes[zo] : -1;
161 codec_setup_info *ci=vi->codec_setup;
164 if(ci){
166 for(i=0;i<ci->modes;i++)
167 if(ci->mode_param[i])_ogg_free(ci->mode_param[i]);
169 for(i=0;i<ci->maps;i++) /* unpack does the range checking */
170 if(ci->map_param[i]) /* this may be cleaning up an aborted
173 _mapping_P[ci->map_type[i]]->free_info(ci->map_param[i]);
175 for(i=0;i<ci->floors;i++) /* unpack does the range checking */
176 if(ci->floor_param[i]) /* this may be cleaning up an aborted
179 _floor_P[ci->floor_type[i]]->free_info(ci->floor_param[i]);
181 for(i=0;i<ci->residues;i++) /* unpack does the range checking */
182 if(ci->residue_param[i]) /* this may be cleaning up an aborted
185 _residue_P[ci->residue_type[i]]->free_info(ci->residue_param[i]);
187 for(i=0;i<ci->books;i++){
188 if(ci->book_param[i]){
190 vorbis_staticbook_destroy(ci->book_param[i]);
192 if(ci->fullbooks)
193 vorbis_book_clear(ci->fullbooks+i);
195 if(ci->fullbooks)
196 _ogg_free(ci->fullbooks);
198 for(i=0;i<ci->psys;i++)
199 _vi_psy_free(ci->psy_param[i]);
201 _ogg_free(ci);
210 codec_setup_info *ci=vi->codec_setup;
211 if(!ci)return(OV_EFAULT);
223 ci->blocksizes[0]=1<<oggpack_read(opb,4);
224 ci->blocksizes[1]=1<<oggpack_read(opb,4);
228 if(ci->blocksizes[0]<64)goto err_out;
229 if(ci->blocksizes[1]<ci->blocksizes[0])goto err_out;
230 if(ci->blocksizes[1]>8192)goto err_out;
273 codec_setup_info *ci=vi->codec_setup;
275 if(!ci)return(OV_EFAULT);
278 ci->books=oggpack_read(opb,8)+1;
279 if(ci->books<=0)goto err_out;
280 for(i=0;i<ci->books;i++){
281 ci->book_param[i]=vorbis_staticbook_unpack(opb);
282 if(!ci->book_param[i])goto err_out;
296 ci->floors=oggpack_read(opb,6)+1;
297 if(ci->floors<=0)goto err_out;
298 for(i=0;i<ci->floors;i++){
299 ci->floor_type[i]=oggpack_read(opb,16);
300 if(ci->floor_type[i]<0 || ci->floor_type[i]>=VI_FLOORB)goto err_out;
301 ci->floor_param[i]=_floor_P[ci->floor_type[i]]->unpack(vi,opb);
302 if(!ci->floor_param[i])goto err_out;
306 ci->residues=oggpack_read(opb,6)+1;
307 if(ci->residues<=0)goto err_out;
308 for(i=0;i<ci->residues;i++){
309 ci->residue_type[i]=oggpack_read(opb,16);
310 if(ci->residue_type[i]<0 || ci->residue_type[i]>=VI_RESB)goto err_out;
311 ci->residue_param[i]=_residue_P[ci->residue_type[i]]->unpack(vi,opb);
312 if(!ci->residue_param[i])goto err_out;
316 ci->maps=oggpack_read(opb,6)+1;
317 if(ci->maps<=0)goto err_out;
318 for(i=0;i<ci->maps;i++){
319 ci->map_type[i]=oggpack_read(opb,16);
320 if(ci->map_type[i]<0 || ci->map_type[i]>=VI_MAPB)goto err_out;
321 ci->map_param[i]=_mapping_P[ci->map_type[i]]->unpack(vi,opb);
322 if(!ci->map_param[i])goto err_out;
326 ci->modes=oggpack_read(opb,6)+1;
327 if(ci->modes<=0)goto err_out;
328 for(i=0;i<ci->modes;i++){
329 ci->mode_param[i]=_ogg_calloc(1,sizeof(*ci->mode_param[i]));
330 ci->mode_param[i]->blockflag=oggpack_read(opb,1);
331 ci->mode_param[i]->windowtype=oggpack_read(opb,16);
332 ci->mode_param[i]->transformtype=oggpack_read(opb,16);
333 ci->mode_param[i]->mapping=oggpack_read(opb,8);
335 if(ci->mode_param[i]->windowtype>=VI_WINDOWB)goto err_out;
336 if(ci->mode_param[i]->transformtype>=VI_WINDOWB)goto err_out;
337 if(ci->mode_param[i]->mapping>=ci->maps)goto err_out;
338 if(ci->mode_param[i]->mapping<0)goto err_out;
438 codec_setup_info *ci=vi->codec_setup;
439 if(!ci)return(OV_EFAULT);
454 oggpack_write(opb,ilog2(ci->blocksizes[0]),4);
455 oggpack_write(opb,ilog2(ci->blocksizes[1]),4);
492 codec_setup_info *ci=vi->codec_setup;
494 if(!ci)return(OV_EFAULT);
500 oggpack_write(opb,ci->books-1,8);
501 for(i=0;i<ci->books;i++)
502 if(vorbis_staticbook_pack(ci->book_param[i],opb))goto err_out;
509 oggpack_write(opb,ci->floors-1,6);
510 for(i=0;i<ci->floors;i++){
511 oggpack_write(opb,ci->floor_type[i],16);
512 if(_floor_P[ci->floor_type[i]]->pack)
513 _floor_P[ci->floor_type[i]]->pack(ci->floor_param[i],opb);
519 oggpack_write(opb,ci->residues-1,6);
520 for(i=0;i<ci->residues;i++){
521 oggpack_write(opb,ci->residue_type[i],16);
522 _residue_P[ci->residue_type[i]]->pack(ci->residue_param[i],opb);
526 oggpack_write(opb,ci->maps-1,6);
527 for(i=0;i<ci->maps;i++){
528 oggpack_write(opb,ci->map_type[i],16);
529 _mapping_P[ci->map_type[i]]->pack(vi,ci->map_param[i],opb);
533 oggpack_write(opb,ci->modes-1,6);
534 for(i=0;i<ci->modes;i++){
535 oggpack_write(opb,ci->mode_param[i]->blockflag,1);
536 oggpack_write(opb,ci->mode_param[i]->windowtype,16);
537 oggpack_write(opb,ci->mode_param[i]->transformtype,16);
538 oggpack_write(opb,ci->mode_param[i]->mapping,8);