On 24/03/2017 19:46, Vittorio Giovara wrote:
> From: Michael Niedermayer <[email protected]>
> 
> Signed-off-by: Vittorio Giovara <[email protected]>
> ---
>  libavcodec/vc1_pred.c | 28 ++++++++++++++++------------
>  1 file changed, 16 insertions(+), 12 deletions(-)
> 
> diff --git a/libavcodec/vc1_pred.c b/libavcodec/vc1_pred.c
> index 25be78778a..d5392a4b7b 100644
> --- a/libavcodec/vc1_pred.c
> +++ b/libavcodec/vc1_pred.c
> @@ -170,15 +170,15 @@ static av_always_inline int scaleforsame(VC1Context *v, 
> int i, int n /* MV */,
>      n >>= hpel;
>      if (v->s.pict_type != AV_PICTURE_TYPE_B || v->second_field || !dir) {
>          if (dim)
> -            n = scaleforsame_y(v, i, n, dir) << hpel;
> +            n = scaleforsame_y(v, i, n, dir) * (1 << hpel);
>          else
> -            n = scaleforsame_x(v, n, dir) << hpel;
> +            n = scaleforsame_x(v, n, dir) * (1 << hpel);
>          return n;
>      }
>      brfd      = FFMIN(v->brfd, 3);
>      scalesame = ff_vc1_b_field_mvpred_scales[0][brfd];
>  
> -    n = (n * scalesame >> 8) << hpel;
> +    n = (n * scalesame >> 8) * (1 << hpel);
>      return n;
>  }
>  

why hpel is negative?


lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to