On Sun, Aug 19, 2012 at 12:54:30PM +0600, Mashiat Sarker Shakkhar wrote:
> ---
> libavcodec/vc1dec.c | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
> index a9043a5..58e106a 100644
> --- a/libavcodec/vc1dec.c
> +++ b/libavcodec/vc1dec.c
> @@ -1458,10 +1458,16 @@ static inline void vc1_pred_mv(VC1Context *v, int n,
> int dmv_x, int dmv_y,
> }
>
> if (v->field_mode) {
> - if (num_samefield <= num_oppfield)
> - opposite = 1 - pred_flag;
> - else
> - opposite = pred_flag;
> + if (!v->numref)
> + // REFFIELD determines if the last field or the second-last
> field is
> + // to be used as reference
> + opposite = 1 - v->reffield;
> + else {
> + if (num_samefield <= num_oppfield)
> + opposite = 1 - pred_flag;
> + else
> + opposite = pred_flag;
> + }
> } else
> opposite = 0;
> if (opposite) {
> --
LGTM
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel