From: IndecisiveTurtle <geoste...@gmail.com>

---
 libavcodec/vc2enc.c        |  2 +-
 libavcodec/vc2enc_common.c | 18 +++++++++---------
 libavcodec/vc2enc_common.h |  2 +-
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c
index 2e849eb09e..c0f542e116 100644
--- a/libavcodec/vc2enc.c
+++ b/libavcodec/vc2enc.c
@@ -160,7 +160,7 @@ static int calc_slice_sizes(VC2EncContext *s)
     SliceArgs *enc_args = s->slice_args;
     SliceArgs *top_loc[SLICE_REDIST_TOTAL] = {NULL};
 
-    vc2_init_quant_matrix(s);
+    vc2_init_quant_matrix(s, s->quant);
 
     for (slice_y = 0; slice_y < s->num_y; slice_y++) {
         for (slice_x = 0; slice_x < s->num_x; slice_x++) {
diff --git a/libavcodec/vc2enc_common.c b/libavcodec/vc2enc_common.c
index 7452e9fd8a..fdcb04d8dd 100644
--- a/libavcodec/vc2enc_common.c
+++ b/libavcodec/vc2enc_common.c
@@ -293,17 +293,17 @@ static const uint8_t vc2_qm_flat_tab[][4] = {
     { 0,  0,  0,  0}
 };
 
-void vc2_init_quant_matrix(VC2EncContext *s)
+void vc2_init_quant_matrix(VC2EncContext *s, int quant[MAX_DWT_LEVELS][4])
 {
     int level, orientation;
 
     if (s->wavelet_depth <= 4 && s->quant_matrix == VC2_QM_DEF) {
         s->custom_quant_matrix = 0;
         for (level = 0; level < s->wavelet_depth; level++) {
-            s->quant[level][0] = 
ff_dirac_default_qmat[s->wavelet_idx][level][0];
-            s->quant[level][1] = 
ff_dirac_default_qmat[s->wavelet_idx][level][1];
-            s->quant[level][2] = 
ff_dirac_default_qmat[s->wavelet_idx][level][2];
-            s->quant[level][3] = 
ff_dirac_default_qmat[s->wavelet_idx][level][3];
+            quant[level][0] = ff_dirac_default_qmat[s->wavelet_idx][level][0];
+            quant[level][1] = ff_dirac_default_qmat[s->wavelet_idx][level][1];
+            quant[level][2] = ff_dirac_default_qmat[s->wavelet_idx][level][2];
+            quant[level][3] = ff_dirac_default_qmat[s->wavelet_idx][level][3];
         }
         return;
     }
@@ -314,21 +314,21 @@ void vc2_init_quant_matrix(VC2EncContext *s)
         for (level = 0; level < s->wavelet_depth; level++) {
             for (orientation = 0; orientation < 4; orientation++) {
                 if (level <= 3)
-                    s->quant[level][orientation] = 
ff_dirac_default_qmat[s->wavelet_idx][level][orientation];
+                    quant[level][orientation] = 
ff_dirac_default_qmat[s->wavelet_idx][level][orientation];
                 else
-                    s->quant[level][orientation] = 
vc2_qm_col_tab[level][orientation];
+                    quant[level][orientation] = 
vc2_qm_col_tab[level][orientation];
             }
         }
     } else if (s->quant_matrix == VC2_QM_COL) {
         for (level = 0; level < s->wavelet_depth; level++) {
             for (orientation = 0; orientation < 4; orientation++) {
-                s->quant[level][orientation] = 
vc2_qm_col_tab[level][orientation];
+                quant[level][orientation] = vc2_qm_col_tab[level][orientation];
             }
         }
     } else {
         for (level = 0; level < s->wavelet_depth; level++) {
             for (orientation = 0; orientation < 4; orientation++) {
-                s->quant[level][orientation] = 
vc2_qm_flat_tab[level][orientation];
+                quant[level][orientation] = 
vc2_qm_flat_tab[level][orientation];
             }
         }
     }
diff --git a/libavcodec/vc2enc_common.h b/libavcodec/vc2enc_common.h
index 40c9ff85b5..b049fe5974 100644
--- a/libavcodec/vc2enc_common.h
+++ b/libavcodec/vc2enc_common.h
@@ -185,7 +185,7 @@ av_cold void vc2_init_static_data(void);
 
 void put_vc2_ue_uint(PutBitContext *pb, uint32_t val);
 
-void vc2_init_quant_matrix(VC2EncContext *s);
+void vc2_init_quant_matrix(VC2EncContext *s, int quant[MAX_DWT_LEVELS][4]);
 
 void vc2_encode_parse_info(VC2EncContext *s, enum DiracParseCodes pcode);
 
-- 
2.49.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to