diff mbox series

[FFmpeg-devel] libdav1d: correctly copy ar_coeffs_uv to our struct

Message ID MN0chcP--7-2@lynne.ee
State Accepted
Commit 18933dbde04eaf70975543d848ad24e2a2a9ab6e
Headers show
Series [FFmpeg-devel] libdav1d: correctly copy ar_coeffs_uv to our struct | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Lynne Nov. 25, 2020, 11 p.m. UTC
Our struct is a [2][25], libdav1d's is a [2][25 + 3] so the last 3 
v coefficients were missing.
Copy each plane's coefficients separately.

Patch attached.
Subject: [PATCH] libdav1d: correctly copy ar_coeffs_uv to our struct

Our struct is a [2][25], libdav1d's is a [2][25 + 3] so the last 3
v coefficients were missing.
Copy each plane's coefficients separately.
---
 libavcodec/libdav1d.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

James Almer Nov. 26, 2020, 12:02 a.m. UTC | #1
On 11/25/2020 8:00 PM, Lynne wrote:
> Our struct is a [2][25], libdav1d's is a [2][25 + 3] so the last 3
> v coefficients were missing.
> Copy each plane's coefficients separately.
> 
> Patch attached.

Ok if tested to match values after copying.
Lynne Nov. 26, 2020, 12:08 a.m. UTC | #2
Nov 26, 2020, 01:02 by jamrial@gmail.com:

> On 11/25/2020 8:00 PM, Lynne wrote:
>
>> Our struct is a [2][25], libdav1d's is a [2][25 + 3] so the last 3
>> v coefficients were missing.
>> Copy each plane's coefficients separately.
>>
>> Patch attached.
>>
>
> Ok if tested to match values after copying.
>

Values tested to match after copying.
Thanks, pushed.
diff mbox series

Patch

diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
index c9b439a007..04587b88da 100644
--- a/libavcodec/libdav1d.c
+++ b/libavcodec/libdav1d.c
@@ -425,8 +425,10 @@  FF_ENABLE_DEPRECATION_WARNINGS
                sizeof(fgp->codec.aom.uv_points));
         memcpy(&fgp->codec.aom.ar_coeffs_y, &p->frame_hdr->film_grain.data.ar_coeffs_y,
                sizeof(fgp->codec.aom.ar_coeffs_y));
-        memcpy(&fgp->codec.aom.ar_coeffs_uv, &p->frame_hdr->film_grain.data.ar_coeffs_uv,
-               sizeof(fgp->codec.aom.ar_coeffs_uv));
+        memcpy(&fgp->codec.aom.ar_coeffs_uv[0], &p->frame_hdr->film_grain.data.ar_coeffs_uv[0],
+               sizeof(fgp->codec.aom.ar_coeffs_uv[0]));
+        memcpy(&fgp->codec.aom.ar_coeffs_uv[1], &p->frame_hdr->film_grain.data.ar_coeffs_uv[1],
+               sizeof(fgp->codec.aom.ar_coeffs_uv[1]));
         memcpy(&fgp->codec.aom.uv_mult, &p->frame_hdr->film_grain.data.uv_mult,
                sizeof(fgp->codec.aom.uv_mult));
         memcpy(&fgp->codec.aom.uv_mult_luma, &p->frame_hdr->film_grain.data.uv_luma_mult,