diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-04-13 02:49:22 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-04-13 02:49:22 +0200 |
commit | 9891004ba91a126f56cd02c6f7a7b0c368a158b9 (patch) | |
tree | 05dd1b2b9250a7d09d9e9142be55100a581d2396 /libavcodec/audioconvert.c | |
parent | a0f17473b37589d8e05f42fefa5a266a2b33831c (diff) | |
parent | 578d6861a753eb0b9d277f7ec17d1502eb2bb35a (diff) | |
download | ffmpeg-9891004ba91a126f56cd02c6f7a7b0c368a158b9.tar.gz |
Merge remote branch 'qatar/master'
* qatar/master:
Partially merged:flvdec: Allow parsing keyframes metadata without seeking in most cases
Error out if vaapi is not found
avio: undeprecate av_url_read_fseek/fpause under nicer names
libvo-*: Don't use deprecated sample format names and enum names
DUPLICATE flvdec: Fix support for flvtool2 "keyframes based" generated index
DUPLICATE libavcodec: Use "const enum AVSampleFormat[]" in AVCodec initialization
Fix the conversion of AV_SAMPLE_FMT_FLT and _DBL to AV_SAMPLE_FMT_S32.
Convert some undefined 1<<31 shifts into 1U<<31.
Conflicts:
configure
libavcodec/libvo-aacenc.c
libavcodec/libvo-amrwbenc.c
libavformat/flvdec.c
Marged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/audioconvert.c')
-rw-r--r-- | libavcodec/audioconvert.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/audioconvert.c b/libavcodec/audioconvert.c index 67cacbdcf1..e101095e40 100644 --- a/libavcodec/audioconvert.c +++ b/libavcodec/audioconvert.c @@ -145,8 +145,8 @@ if(ctx->fmt_pair == ofmt + AV_SAMPLE_FMT_NB*ifmt){\ else CONV(AV_SAMPLE_FMT_U8 , uint8_t, AV_SAMPLE_FMT_S32, (*(const int32_t*)pi>>24) + 0x80) else CONV(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_S32, *(const int32_t*)pi>>16) else CONV(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_S32, *(const int32_t*)pi) - else CONV(AV_SAMPLE_FMT_FLT, float , AV_SAMPLE_FMT_S32, *(const int32_t*)pi*(1.0 / (1<<31))) - else CONV(AV_SAMPLE_FMT_DBL, double , AV_SAMPLE_FMT_S32, *(const int32_t*)pi*(1.0 / (1<<31))) + else CONV(AV_SAMPLE_FMT_FLT, float , AV_SAMPLE_FMT_S32, *(const int32_t*)pi*(1.0 / (1U<<31))) + else CONV(AV_SAMPLE_FMT_DBL, double , AV_SAMPLE_FMT_S32, *(const int32_t*)pi*(1.0 / (1U<<31))) else CONV(AV_SAMPLE_FMT_U8 , uint8_t, AV_SAMPLE_FMT_FLT, av_clip_uint8( lrintf(*(const float*)pi * (1<<7)) + 0x80)) else CONV(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, av_clip_int16( lrintf(*(const float*)pi * (1<<15)))) else CONV(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, av_clipl_int32(llrintf(*(const float*)pi * (1U<<31)))) |