mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-06 15:49:50 +08:00
Merge remote-tracking branch 'qatar/master'
* qatar/master: get_bits: remove A32 variant avconv: support stream specifiers in -metadata and -map_metadata wavpack: Fix 32-bit clipping wavpack: Clip samples after shifting h264: don't drop B-frames after next keyframe on POC reset. get_bits: remove useless pointer casts configure: refactor lists of tests and components into variables rv40: NEON optimised weak loop filter mpegts: replace some magic numbers with the existing define swscale: add unscaled packed 16 bit per component endianess conversion Conflicts: libavcodec/get_bits.h libavcodec/h264.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@ -405,12 +405,12 @@ static inline int wv_get_value_integer(WavpackFrameContext *s, uint32_t *crc, in
|
||||
}
|
||||
|
||||
bit = (S & s->and) | s->or;
|
||||
bit = (((S + bit) << s->shift) - bit);
|
||||
bit = (((S + bit) << s->shift) - bit) << s->post_shift;
|
||||
|
||||
if(s->hybrid)
|
||||
bit = av_clip(bit, -s->hybrid_maxclip, s->hybrid_maxclip - 1);
|
||||
bit = av_clip(bit, -s->hybrid_maxclip - 1, s->hybrid_maxclip);
|
||||
|
||||
return bit << s->post_shift;
|
||||
return bit;
|
||||
}
|
||||
|
||||
static float wv_get_value_float(WavpackFrameContext *s, uint32_t *crc, int S)
|
||||
@ -798,7 +798,7 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
|
||||
s->joint = s->frame_flags & WV_JOINT_STEREO;
|
||||
s->hybrid = s->frame_flags & WV_HYBRID_MODE;
|
||||
s->hybrid_bitrate = s->frame_flags & WV_HYBRID_BITRATE;
|
||||
s->hybrid_maxclip = 1 << ((((s->frame_flags & 0x03) + 1) << 3) - 1);
|
||||
s->hybrid_maxclip = (1LL << ((((s->frame_flags & 0x03) + 1) << 3) - 1)) - 1;
|
||||
s->post_shift = 8 * (bpp-1-(s->frame_flags&0x03)) + ((s->frame_flags >> 13) & 0x1f);
|
||||
s->CRC = AV_RL32(buf); buf += 4;
|
||||
if(wc->mkv_mode)
|
||||
|
Reference in New Issue
Block a user