[FFmpeg-devel] [PATCH] Change roqvideo.c to acomodate splitting (was: [PATCH] RoQ video encoder, take 2)

Michael Niedermayer michaelni
Mon May 28 16:20:22 CEST 2007


Hi

On Mon, May 28, 2007 at 01:21:32PM +0200, Vitor wrote:
> Hi,
> 
> Agreed with the comments. In this patch I just make minor changes in 
> roqvideo.c to split it in a future patch and then add the encoder. I've 
> tried to keep changes to a minimum. See also next message.
> 
> Comments welcome.
> 
> -Vitor

[...]
> @@ -54,6 +54,10 @@
>      AVFrame frames[2];
>      AVFrame *last_frame;
>      AVFrame *current_frame;
> +
> +    uint8_t *last_frame_data[3];
> +    uint8_t *current_frame_data[3];

i think the AVFrame *_frame; is enough


[...]
> @@ -329,18 +333,19 @@
>  
>                  switch(vqid) {
>                  case RoQ_ID_MOT:
> -                    apply_motion_8x8(ri, xp, yp, 0, 8, 8);
> +                    ff_apply_motion_8x8(ri, xp, yp, 0, 0);
>                      break;
>                  case RoQ_ID_FCC:
> -                    apply_motion_8x8(ri, xp, yp, buf[bpos++], chunk_arg >> 8,
> -                        chunk_arg & 0xff);
> +                    mx = 8 - (buf[bpos] >> 4) - (((signed char) chunk_arg) >> 8);
> +                    my = 8 - (buf[bpos++] & 0xf) - (((signed char) chunk_arg) & 0xff);
> +                    ff_apply_motion_8x8(ri, xp, yp, mx, my);

i think the signed char casts are at the wrong spot


[...]
>                              break;
>                          case RoQ_ID_FCC:
> -                            apply_motion_4x4(ri, x, y, buf[bpos++],
> -                                chunk_arg >> 8, chunk_arg & 0xff);
> +                            mx = 8 - (buf[bpos] >> 4) - ((signed char) (chunk_arg >> 8));
> +                            my = 8 - (buf[bpos++] & 0xf) - ((signed char) (chunk_arg & 0xff));
> +                            ff_apply_motion_4x4(ri, x, y, mx, my);

the & 0xff is unneeded


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

Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070528/3497119a/attachment.pgp>



More information about the ffmpeg-devel mailing list