[FFmpeg-cvslog] r11361 - trunk/libavcodec/rv34.c

Michael Niedermayer michaelni
Mon Dec 31 21:36:54 CET 2007


On Mon, Dec 31, 2007 at 08:12:50AM +0100, kostya wrote:
> Author: kostya
> Date: Mon Dec 31 08:12:50 2007
> New Revision: 11361
> 
> Log:
> Direct blocks should use motion vectors from the second reference frame
> 
> Modified:
>    trunk/libavcodec/rv34.c
> 
> Modified: trunk/libavcodec/rv34.c
> ==============================================================================
> --- trunk/libavcodec/rv34.c	(original)
> +++ trunk/libavcodec/rv34.c	Mon Dec 31 08:12:50 2007
> @@ -474,6 +474,21 @@ static void rv34_pred_mv(RV34DecContext 
>  }
>  
>  /**
> + * Calculate motion vector component that should be added for direct blocks.
> + */
> +static int calc_add_mv(MpegEncContext *s, int dir, int component)
> +{
> +    int mv_pos = s->mb_x * 2 + s->mb_y * 2 * s->b8_stride;
> +    int sum;
> +
> +    sum = (s->next_picture_ptr->motion_val[0][mv_pos][component] +
> +           s->next_picture_ptr->motion_val[0][mv_pos + 1][component] +
> +           s->next_picture_ptr->motion_val[0][mv_pos + s->b8_stride][component] +
> +           s->next_picture_ptr->motion_val[0][mv_pos + s->b8_stride + 1][component]) >> 2;
> +    return dir ? -(sum >> 1) : ((sum + 1) >> 1);
> +}

normally direct MBs have seperate MVs for each block instead of one averaged
one ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20071231/b32ea5d9/attachment.pgp>



More information about the ffmpeg-cvslog mailing list