[FFmpeg-devel] [PATCH 2/2] vp9: use LOCAL_ALIGNED_32 for left/top intra_pred pointers

Ronald S. Bultje rsbultje at gmail.com
Thu Apr 24 15:35:12 CEST 2014


Hi,

On Apr 23, 2014 10:54 PM, "James Almer" <jamrial at gmail.com> wrote:
>
> This is needed for future AVX2 implementations
>
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
> Even though FATE passes, doing this to a_buf doesn't exactly strike me
with confidence,
> given its size and how it's used afterwards.
> l should be fine, but I'm not sure if a_buf will actually be usable as is
with AVX2.
>
>  libavcodec/vp9.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
> index cbc885b..293bf62 100644
> --- a/libavcodec/vp9.c
> +++ b/libavcodec/vp9.c
> @@ -2448,8 +2448,8 @@ static void intra_recon(AVCodecContext *ctx,
ptrdiff_t y_off, ptrdiff_t uv_off)
>      int tx = 4 * s->lossless + b->tx, uvtx = b->uvtx + 4 * s->lossless;
>      int uvstep1d = 1 << b->uvtx, p;
>      uint8_t *dst = s->dst[0], *dst_r =
s->frames[CUR_FRAME].tf.f->data[0] + y_off;
> -    LOCAL_ALIGNED_16(uint8_t, a_buf, [48]);
> -    LOCAL_ALIGNED_16(uint8_t, l, [32]);
> +    LOCAL_ALIGNED_32(uint8_t, a_buf, [48]);
> +    LOCAL_ALIGNED_32(uint8_t, l, [32]);
>
>      for (n = 0, y = 0; y < end_y; y += step1d) {
>          uint8_t *ptr = dst, *ptr_r = dst_r;

Right, a_buf should be 64 then, and a= buf+32.

Ronald


More information about the ffmpeg-devel mailing list