[FFmpeg-devel] [PATCH] Is flipping correct for MJPEG encoder?

Michael Niedermayer michaelni
Sun Oct 14 01:44:18 CEST 2007


Hi

On Sat, Oct 13, 2007 at 12:09:26PM +0700, Vladimir Voroshilov wrote:
> Hi, All
> 
> In AMV video encoder (read MJPEG) picture have to be mirrored upside down.
> 
> I have made quick patch for handling this (attached).
> Patch requires cleared CODEC_FLAG_EMU_EDGE (to avoid out of bounds error).
> 
> 1. Is used in patch method correct ?
> 2. Where should i clear CODEC_FLAG_EMU_EDGE flag (currently it looks
> like cleared, but i want to be sure)?

hmm, it should always be cleared but as the user app could in principle
set it it might be a good idea to check for it bein cleared by if()
instead of assert() and fail with an error message if its set

and patch looks ok except that


> 3. where can i get decoder's v_max equivalent (maximum of
> mjpeg_vsample[i]), currently i've just hardcoded 2 there
> ("s->height/2", which is true for AMV, but hackish)

its hardcoded to 2 everywhere like mpegvideo_enc.c, you can replace all the
2 by some V_MAX #define maybe, so they can easily be found if we ever want to
change it ...

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

No great genius has ever existed without some touch of madness. -- 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-devel/attachments/20071014/284d2c41/attachment.pgp>



More information about the ffmpeg-devel mailing list