On Tue, Nov 08, 2011 at 03:47:30PM +0600, Mashiat Sarker Shakkhar wrote:
> ---
>  libavcodec/vc1dec.c |   20 ++++++++++++++------
>  1 files changed, 14 insertions(+), 6 deletions(-)
> 
> diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
> index be3da41..e389040 100644
> --- a/libavcodec/vc1dec.c
> +++ b/libavcodec/vc1dec.c
> @@ -1422,29 +1422,36 @@ static av_always_inline int scaleforsame(VC1Context 
> *v, int i, int n /* MV */,
>                                           int dim, int dir)
>  {
>      int brfd, scalesame;
> +    int hpel = 1 - v->s.quarter_sample;
>  
> +    n >>= hpel;
>      if (v->s.pict_type != AV_PICTURE_TYPE_B || v->second_field || !dir) {
>          if (dim)
> -            return scaleforsame_y(v, i, n, dir);
> +            n = scaleforsame_y(v, i, n, dir) << hpel;
>          else
> -            return scaleforsame_x(v, n, dir);
> +            n = scaleforsame_x(v, n, dir) << hpel;

return scaleforsame_{x,y}(v, n, dir) << hpel
 is enough :)

In general patch looks OK
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to