[FFmpeg-devel] [PATCH] move sqv1, flv alignment hack to align_dimensions

Michael Niedermayer michaelni
Mon Feb 15 22:49:14 CET 2010


On Mon, Feb 15, 2010 at 08:45:54PM +0100, Reimar D?ffinger wrote:
> Hello,
> I don't see the point in doing this in default_get_buffer which leaves all
> applications using their own allocation still crashing without any advantage
> I can see - align_dimensions already has codec-specific hacks for the height,
> so why not for width as well.

>  utils.c |   21 ++++++++++-----------
>  1 file changed, 10 insertions(+), 11 deletions(-)
> fba4a2e1f6979fc51a9ded9e6ce6c0144012e8f4  alignhack.diff
> Index: libavcodec/utils.c
> ===================================================================
> --- libavcodec/utils.c	(revision 21839)
> +++ libavcodec/utils.c	(working copy)
> @@ -140,6 +140,16 @@
>          h_align= 16;
>          if(s->codec_id == CODEC_ID_MPEG2VIDEO || s->codec_id == CODEC_ID_MJPEG || s->codec_id == CODEC_ID_AMV || s->codec_id == CODEC_ID_THP)
>              h_align= 32; // interlaced is rounded up to 2 MBs
> +//STRIDE_ALIGN is 8 for SSE* but this does not work for SVQ1 chroma planes
> +//we could change STRIDE_ALIGN to 16 for x86/sse but it would increase the
> +//picture size unneccessarily in some cases. The solution here is not
> +//pretty and better ideas are welcome!
> +#if HAVE_MMX
> +        if(s->codec_id == CODEC_ID_SVQ1 || s->codec_id == CODEC_ID_VP5 ||
> +           s->codec_id == CODEC_ID_VP6 || s->codec_id == CODEC_ID_VP6F ||
> +           s->codec_id == CODEC_ID_VP6A)
> +            w_align= 32;
> +#endif

svq1 is yuv 4:1:0 32luma is 8 chroma


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

Incandescent light bulbs waste a lot of energy as heat so the EU forbids them.
Their replacement, compact fluorescent lamps, much more expensive, dont fit in
many old lamps, flicker, contain toxic mercury, produce a fraction of the light
that is claimed and in a unnatural spectrum rendering colors different than
in natural light. Ah and we now need to turn the heaters up more in winter to
compensate the lower wasted heat. Who wins? Not the environment, thats for sure
-------------- 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/20100215/0a956ec1/attachment.pgp>



More information about the ffmpeg-devel mailing list