I did a git pull on a project, and started getting this message:

Warning: data is not aligned! This can lead to a speedloss

This message is uttered by swscale because the U and V pictures are not 16-byte aligned as required for SSE2, but only 8-byte aligned.

The source code indicates this is a known problem - quoting avcodec/utils.c:250-

//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 || s->codec_id == CODEC_ID_DIRAC) {
        for (i = 0; i < AV_NUM_DATA_POINTERS; i++)
            linesize_align[i] = 16;
    }
#endif

Might it be time to bump STRIDE_ALIGN to 16 if SSE2 is supported, as the most common use case (swscale) requires it?

Is there anything I can do to fix this without changing STRIDE_ALIGN or an upstream change?

Thanks in advance
_______________________________________________
Libav-user mailing list
Libav-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to