Unified · Split
| @@ -179,17 +179,10 @@ int ff_side_data_update_matrix_encoding(AVFrame *frame, · 178 unmodified lines | |||
| 179 | return 0; | 179 | return 0; |
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | #if HAVE_SIMD_ALIGN_32 | ||
| 183 | # define STRIDE_ALIGN 32 | ||
| 184 | #elif HAVE_SIMD_ALIGN_16 | ||
| 185 | # define STRIDE_ALIGN 16 | ||
| 186 | #else | ||
| 187 | # define STRIDE_ALIGN 8 | ||
| 188 | #endif | ||
| 189 | |||
| 190 | void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, | 182 | void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, |
| 191 | int linesize_align[AV_NUM_DATA_POINTERS]) | 183 | int linesize_align[AV_NUM_DATA_POINTERS]) |
| 192 | { | 184 | { |
| 185 | size_t max_align = av_cpu_max_align(); | ||
| 193 | int i; | 186 | int i; |
| 194 | int w_align = 1; | 187 | int w_align = 1; |
| 195 | int h_align = 1; | 188 | int h_align = 1; |
| @@ -282,7 +275,7 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, · 86 unmodified lines | |||
| 282 | *height += 2; | 275 | *height += 2; |
| 283 | 276 | ||
| 284 | for (i = 0; i < 4; i++) | 277 | for (i = 0; i < 4; i++) |
| 285 | linesize_align[i] = STRIDE_ALIGN; | 278 | linesize_align[i] = max_align; |
| 286 | } | 279 | } |
| 287 | 280 | ||
| 288 | void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height) | 281 | void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height) |