Lines Matching refs:ci

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