Mercurial > libavcodec.hg
comparison utils.c @ 5537:3d10c3e84f96 libavcodec
Add av_get_bits_per_sample_format()
| author | conrad |
|---|---|
| date | Mon, 13 Aug 2007 05:23:38 +0000 |
| parents | acaaff7b6fb8 |
| children | b0a566346fb1 |
comparison
equal
deleted
inserted
replaced
| 5536:44e140e3cd6a | 5537:3d10c3e84f96 |
|---|---|
| 1320 default: | 1320 default: |
| 1321 return 0; | 1321 return 0; |
| 1322 } | 1322 } |
| 1323 } | 1323 } |
| 1324 | 1324 |
| 1325 int av_get_bits_per_sample_format(enum SampleFormat sample_fmt) { | |
| 1326 switch (sample_fmt) { | |
| 1327 case SAMPLE_FMT_U8: | |
| 1328 return 8; | |
| 1329 case SAMPLE_FMT_S16: | |
| 1330 return 16; | |
| 1331 case SAMPLE_FMT_S24: | |
| 1332 return 24; | |
| 1333 case SAMPLE_FMT_S32: | |
| 1334 case SAMPLE_FMT_FLT: | |
| 1335 return 32; | |
| 1336 default: | |
| 1337 return 0; | |
| 1338 } | |
| 1339 } | |
| 1340 | |
| 1325 #if !defined(HAVE_THREADS) | 1341 #if !defined(HAVE_THREADS) |
| 1326 int avcodec_thread_init(AVCodecContext *s, int thread_count){ | 1342 int avcodec_thread_init(AVCodecContext *s, int thread_count){ |
| 1327 return -1; | 1343 return -1; |
| 1328 } | 1344 } |
| 1329 #endif | 1345 #endif |
