[FFmpeg-devel] [PATCH 5/5] avcodec/wavpackenc: use put_sbits

Paul B Mahol onemda at gmail.com
Wed Jan 20 20:38:50 CET 2016


On 1/20/16, James Almer <jamrial at gmail.com> wrote:
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>  libavcodec/wavpackenc.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/libavcodec/wavpackenc.c b/libavcodec/wavpackenc.c
> index 98a011f..979b921 100644
> --- a/libavcodec/wavpackenc.c
> +++ b/libavcodec/wavpackenc.c
> @@ -2216,8 +2216,7 @@ static void pack_float_sample(WavPackEncodeContext *s,
> int32_t *sample)
>          }
>      } else if (shift_count) {
>          if (s->float_flags & FLOAT_SHIFT_SENT) {
> -            int32_t data = get_mantissa(*sample) & ((1 << shift_count) -
> 1);
> -            put_bits(pb, shift_count, data);
> +            put_sbits(pb, shift_count, get_mantissa(*sample));
>          } else if (s->float_flags & FLOAT_SHIFT_SAME) {
>              put_bits(pb, 1, get_mantissa(*sample) & 1);
>          }
> --
> 2.7.0
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

lgtm


More information about the ffmpeg-devel mailing list