diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-01-11 23:29:02 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-01-11 23:43:32 +0300 |
commit | 376e425c02ae3ead9137f1a7d019fe3b2f43343e (patch) | |
tree | 226aae6817d445ab112d8aa0f9d6999eb9556a37 /source/blender/imbuf | |
parent | 45bb6b836a21fc6fd53f9c4d83447c1805df4f26 (diff) |
Fix T93588: some videos loaded flipped over Y axis on macOS Arm
Was not actually flipping in the need_aligned_ffmpeg_buffer case.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/intern/anim_movie.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c index 1d81653c7cd..6a05b681c88 100644 --- a/source/blender/imbuf/intern/anim_movie.c +++ b/source/blender/imbuf/intern/anim_movie.c @@ -879,7 +879,7 @@ static void ffmpeg_postprocess(struct anim *anim) dst2, dstStride2); # else - /* Scale with swscale then flip image over Y axis. */ + /* Scale with swscale. */ int *dstStride = anim->pFrameRGB->linesize; uint8_t **dst = anim->pFrameRGB->data; const int dstStride2[4] = {dstStride[0], 0, 0, 0}; @@ -896,11 +896,12 @@ static void ffmpeg_postprocess(struct anim *anim) dst2, dstStride2); - bottom = (unsigned char *)ibuf->rect; - top = bottom + ibuf->x * (ibuf->y - 1) * 4; + /* Flip destination image buffer over Y axis. */ + bottom = (unsigned char *)dst[0]; + top = bottom + anim->x * (anim->y - 1) * 4; - h = (ibuf->y + 1) / 2; - w = ibuf->x; + h = (anim->y + 1) / 2; + w = anim->x; for (y = 0; y < h; y++) { unsigned char tmp[4]; |