Unified · Split
| @@ -179,17 +179,10 @@ int ff_side_data_update_matrix_encoding(AVFrame *frame, · 178 unmodified lines | ||
| 179 | 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 | 182 | void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, |
| 191 | 183 | int linesize_align[AV_NUM_DATA_POINTERS]) |
| 192 | 184 | { |
| 185 | + size_t max_align = av_cpu_max_align(); | |
| 193 | 186 | int i; |
| 194 | 187 | int w_align = 1; |
| 195 | 188 | int h_align = 1; |
| @@ -282,7 +275,7 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, · 86 unmodified lines | ||
| 282 | 275 | *height += 2; |
| 283 | 276 | |
| 284 | 277 | for (i = 0; i < 4; i++) |
| 285 | − linesize_align[i] = STRIDE_ALIGN; | |
| 278 | + linesize_align[i] = max_align; | |
| 286 | 279 | } |
| 287 | 280 | |
| 288 | 281 | void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height) |