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

Michael Niedermayer michaelni
Sat Apr 26 15:56:16 CEST 2008


On Sat, Apr 26, 2008 at 03:09:36PM +0200, kostya wrote:
> Author: kostya
> Date: Sat Apr 26 15:09:36 2008
> New Revision: 12987
> 
> Log:
> Skip blocks in B-frames reuse motion vectors from next reference frame.
> So if referenced blocks is 16x8, 8x16 or 8x8 partitions, skip block
> will have them too.
[...]
> @@ -697,9 +715,19 @@ static int rv34_decode_mv(RV34DecContext
>              break;
>          }
>      case RV34_MB_B_DIRECT:
> -        rv34_pred_mv_b  (r, RV34_MB_B_DIRECT, 0);
> -        rv34_pred_mv_b  (r, RV34_MB_B_DIRECT, 1);
> -        rv34_mc_2mv     (r, RV34_MB_B_DIRECT);
> +        //surprisingly, it uses motion scheme from next reference frame
> +        next_bt = s->next_picture_ptr->mb_type[s->mb_x + s->mb_y * s->mb_stride];
> +        for(j = 0; j < 2; j++)
> +            for(i = 0; i < 2; i++)
> +                for(k = 0; k < 2; k++){

> +                    s->current_picture_ptr->motion_val[0][mv_pos + i + j*s->b8_stride][k] =  (s->next_picture_ptr->motion_val[0][mv_pos + i + j*s->b8_stride][k] + 1) >> 1;
> +                    s->current_picture_ptr->motion_val[1][mv_pos + i + j*s->b8_stride][k] = -(s->next_picture_ptr->motion_val[0][mv_pos + i + j*s->b8_stride][k] >> 1);
                                                                                               ^                                 ^
I dont belive this is correct

Also the vectors are not scaled by /2 but by the relative distances of the
frames (timewise). This just ends at /2 for constant framerate with no droped
frames.

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Thouse who are best at talking, realize last or never when they are wrong.
-------------- 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/20080426/f8325bb9/attachment.pgp>



More information about the ffmpeg-cvslog mailing list