Mercurial > libavcodec.hg
comparison utils.c @ 7613:ff395fe35161 libavcodec
Add F64BE, F64LE and F64BE PCM codecs.
author | pross |
---|---|
date | Tue, 19 Aug 2008 10:43:47 +0000 |
parents | 1302ec81afc0 |
children | b5b4bf0944b8 |
comparison
equal
deleted
inserted
replaced
7612:1302ec81afc0 | 7613:ff395fe35161 |
---|---|
1156 ", %s", avcodec_get_sample_fmt_name(enc->sample_fmt)); | 1156 ", %s", avcodec_get_sample_fmt_name(enc->sample_fmt)); |
1157 } | 1157 } |
1158 | 1158 |
1159 /* for PCM codecs, compute bitrate directly */ | 1159 /* for PCM codecs, compute bitrate directly */ |
1160 switch(enc->codec_id) { | 1160 switch(enc->codec_id) { |
1161 case CODEC_ID_PCM_F64BE: | |
1162 case CODEC_ID_PCM_F64LE: | |
1163 bitrate = enc->sample_rate * enc->channels * 64; | |
1164 break; | |
1161 case CODEC_ID_PCM_S32LE: | 1165 case CODEC_ID_PCM_S32LE: |
1162 case CODEC_ID_PCM_S32BE: | 1166 case CODEC_ID_PCM_S32BE: |
1163 case CODEC_ID_PCM_U32LE: | 1167 case CODEC_ID_PCM_U32LE: |
1164 case CODEC_ID_PCM_U32BE: | 1168 case CODEC_ID_PCM_U32BE: |
1165 case CODEC_ID_PCM_F32BE: | 1169 case CODEC_ID_PCM_F32BE: |
1170 case CODEC_ID_PCM_F32LE: | |
1166 bitrate = enc->sample_rate * enc->channels * 32; | 1171 bitrate = enc->sample_rate * enc->channels * 32; |
1167 break; | 1172 break; |
1168 case CODEC_ID_PCM_S24LE: | 1173 case CODEC_ID_PCM_S24LE: |
1169 case CODEC_ID_PCM_S24BE: | 1174 case CODEC_ID_PCM_S24BE: |
1170 case CODEC_ID_PCM_U24LE: | 1175 case CODEC_ID_PCM_U24LE: |
1310 case CODEC_ID_PCM_S32BE: | 1315 case CODEC_ID_PCM_S32BE: |
1311 case CODEC_ID_PCM_S32LE: | 1316 case CODEC_ID_PCM_S32LE: |
1312 case CODEC_ID_PCM_U32BE: | 1317 case CODEC_ID_PCM_U32BE: |
1313 case CODEC_ID_PCM_U32LE: | 1318 case CODEC_ID_PCM_U32LE: |
1314 case CODEC_ID_PCM_F32BE: | 1319 case CODEC_ID_PCM_F32BE: |
1320 case CODEC_ID_PCM_F32LE: | |
1315 return 32; | 1321 return 32; |
1322 case CODEC_ID_PCM_F64BE: | |
1323 case CODEC_ID_PCM_F64LE: | |
1324 return 64; | |
1316 default: | 1325 default: |
1317 return 0; | 1326 return 0; |
1318 } | 1327 } |
1319 } | 1328 } |
1320 | 1329 |