diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2012-02-08 02:54:46 +0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2012-02-08 02:54:46 +0400 |
commit | 9b027c0d0794b50e3b638cca4bed925638ab68bc (patch) | |
tree | b80ff16b181cea5a942f413c4ccb54e66e51acd5 /libavcodec/utils.c | |
parent | 4ff6dea390be1d57817919105ee76b708e247d64 (diff) |
dsputil: set STRIDE_ALIGN to 16 for x86 also.
This fixes crashes in e.g. PNG decoding with SSE2 enabled. In fact, many
x86 optimizations for codecs assume that our buffer strides are 16-byte
aligned.
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 606537b29a..e85cdfcfe9 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -234,18 +234,6 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, for (i = 0; i < 4; i++) linesize_align[i] = STRIDE_ALIGN; -//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) { - for (i = 0; i < 4; i++) - linesize_align[i] = 16; - } -#endif } void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height){ |