[FFmpeg-cvslog] r12987 - trunk/libavcodec/rv34.c
Kostya
kostya.shishkov
Sat Apr 26 19:04:10 CEST 2008
On Sat, Apr 26, 2008 at 03:56:16PM +0200, Michael Niedermayer wrote:
> 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.
Ehh, the only big standard I've read is VC-1 and I admit it distorted my perception.
In B-type frames it always performs motion compensation on whole macroblock
and uses motion vector from next reference frame in similar fashion.
Now I'm collecting data from file with two B-frames between P-frames. Let's see
what will be there.
> [...]
>
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
More information about the ffmpeg-cvslog
mailing list