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 | |
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')
-rw-r--r-- | libavcodec/aacdec.c | 12 | ||||
-rw-r--r-- | libavcodec/audioconvert.c | 4 | ||||
-rw-r--r-- | libavcodec/dsputil.c | 4 | ||||
-rw-r--r-- | libavcodec/fraps.c | 4 | ||||
-rw-r--r-- | libavcodec/libvo-aacenc.c | 4 | ||||
-rw-r--r-- | libavcodec/libvo-amrwbenc.c | 4 | ||||
-rw-r--r-- | libavcodec/ppc/fft_altivec.c | 2 | ||||
-rw-r--r-- | libavcodec/vorbis_enc.c | 2 |
8 files changed, 18 insertions, 18 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index 5f86b89b38..a0b67f4af7 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -969,19 +969,19 @@ static inline float *VMUL4S(float *dst, const float *v, unsigned idx, union float754 s = { .f = *scale }; union float754 t; - t.i = s.i ^ (sign & 1<<31); + t.i = s.i ^ (sign & 1U<<31); *dst++ = v[idx & 3] * t.f; sign <<= nz & 1; nz >>= 1; - t.i = s.i ^ (sign & 1<<31); + t.i = s.i ^ (sign & 1U<<31); *dst++ = v[idx>>2 & 3] * t.f; sign <<= nz & 1; nz >>= 1; - t.i = s.i ^ (sign & 1<<31); + t.i = s.i ^ (sign & 1U<<31); *dst++ = v[idx>>4 & 3] * t.f; sign <<= nz & 1; nz >>= 1; - t.i = s.i ^ (sign & 1<<31); + t.i = s.i ^ (sign & 1U<<31); *dst++ = v[idx>>6 & 3] * t.f; return dst; @@ -1174,11 +1174,11 @@ static int decode_spectrum_and_dequant(AACContext *ac, float coef[1024], b += 4; n = (1 << b) + SHOW_UBITS(re, gb, b); LAST_SKIP_BITS(re, gb, b); - *icf++ = cbrt_tab[n] | (bits & 1<<31); + *icf++ = cbrt_tab[n] | (bits & 1U<<31); bits <<= 1; } else { unsigned v = ((const uint32_t*)vq)[cb_idx & 15]; - *icf++ = (bits & 1<<31) | v; + *icf++ = (bits & 1U<<31) | v; bits <<= !!v; } cb_idx >>= 4; 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)))) diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index de74fe7ac5..90e6440a87 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -2610,7 +2610,7 @@ static inline uint32_t clipf_c_one(uint32_t a, uint32_t mini, { if(a > mini) return mini; - else if((a^(1<<31)) > maxisign) return maxi; + else if((a^(1U<<31)) > maxisign) return maxi; else return a; } @@ -2618,7 +2618,7 @@ static void vector_clipf_c_opposite_sign(float *dst, const float *src, float *mi int i; uint32_t mini = *(uint32_t*)min; uint32_t maxi = *(uint32_t*)max; - uint32_t maxisign = maxi ^ (1<<31); + uint32_t maxisign = maxi ^ (1U<<31); uint32_t *dsti = (uint32_t*)dst; const uint32_t *srci = (const uint32_t*)src; for(i=0; i<len; i+=8) { diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c index 0938ccd630..dd086d2e3f 100644 --- a/libavcodec/fraps.c +++ b/libavcodec/fraps.c @@ -180,7 +180,7 @@ static int decode_frame(AVCodecContext *avctx, return -1; } /* bit 31 means same as previous pic */ - f->pict_type = (header & (1<<31))? FF_P_TYPE : FF_I_TYPE; + f->pict_type = (header & (1U<<31))? FF_P_TYPE : FF_I_TYPE; f->key_frame = f->pict_type == FF_I_TYPE; if (f->pict_type == FF_I_TYPE) { @@ -223,7 +223,7 @@ static int decode_frame(AVCodecContext *avctx, return -1; } /* bit 31 means same as previous pic */ - f->pict_type = (header & (1<<31))? FF_P_TYPE : FF_I_TYPE; + f->pict_type = (header & (1U<<31))? FF_P_TYPE : FF_I_TYPE; f->key_frame = f->pict_type == FF_I_TYPE; if (f->pict_type == FF_I_TYPE) { diff --git a/libavcodec/libvo-aacenc.c b/libavcodec/libvo-aacenc.c index 7e2e3070b1..205c00e922 100644 --- a/libavcodec/libvo-aacenc.c +++ b/libavcodec/libvo-aacenc.c @@ -122,7 +122,7 @@ AVCodec ff_libvo_aacenc_encoder = { aac_encode_frame, aac_encode_close, NULL, - .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE}, - .long_name = NULL_IF_CONFIG_SMALL("VisualOn libvo-aacenc AAC"), + .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, + .long_name = NULL_IF_CONFIG_SMALL("libvo-aacenc AAC"), }; diff --git a/libavcodec/libvo-amrwbenc.c b/libavcodec/libvo-amrwbenc.c index c5c3b4eaf7..661a15d445 100644 --- a/libavcodec/libvo-amrwbenc.c +++ b/libavcodec/libvo-amrwbenc.c @@ -120,8 +120,8 @@ AVCodec ff_libvo_amrwbenc_encoder = { amr_wb_encode_frame, amr_wb_encode_close, NULL, - .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE}, - .long_name = NULL_IF_CONFIG_SMALL("VisualOn libvo-amrwbenc Adaptive Multi-Rate " + .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, + .long_name = NULL_IF_CONFIG_SMALL("libvo-amrwbenc Adaptive Multi-Rate " "(AMR) Wide-Band"), }; diff --git a/libavcodec/ppc/fft_altivec.c b/libavcodec/ppc/fft_altivec.c index ec610b0a4c..1ea2369f55 100644 --- a/libavcodec/ppc/fft_altivec.c +++ b/libavcodec/ppc/fft_altivec.c @@ -122,7 +122,7 @@ static void ff_imdct_calc_altivec(FFTContext *s, FFTSample *output, const FFTSam int n = 1 << s->mdct_bits; int n4 = n >> 2; int n16 = n >> 4; - vec_u32 sign = {1<<31,1<<31,1<<31,1<<31}; + vec_u32 sign = {1U<<31,1U<<31,1U<<31,1U<<31}; vec_u32 *p0 = (vec_u32*)(output+n4); vec_u32 *p1 = (vec_u32*)(output+n4*3); diff --git a/libavcodec/vorbis_enc.c b/libavcodec/vorbis_enc.c index 7dae4cb2b0..d15d3454eb 100644 --- a/libavcodec/vorbis_enc.c +++ b/libavcodec/vorbis_enc.c @@ -394,7 +394,7 @@ static void put_float(PutBitContext *pb, float f) mant = (int)ldexp(frexp(f, &exp), 20); exp += 788 - 20; if (mant < 0) { - res |= (1 << 31); + res |= (1U << 31); mant = -mant; } res |= mant | (exp << 21); |