[FFmpeg-cvslog] avcodec/idctdsp: Clear idct/idct_add for studio profile

Michael Niedermayer git at videolan.org
Sat Jun 16 01:32:01 EEST 2018


ffmpeg | branch: release/4.0 | Michael Niedermayer <michael at niedermayer.cc> | Mon May 28 22:29:57 2018 +0200| [07767c704bc5d9b5768edf43424329d95f047d8e] | committer: Michael Niedermayer

avcodec/idctdsp: Clear idct/idct_add for studio profile

This does not leave them "as before" which may be a value from a previous profile

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 8c50d0cccfe4c9f25a8494f76da55dcdc2275058)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=07767c704bc5d9b5768edf43424329d95f047d8e
---

 libavcodec/idctdsp.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/idctdsp.c b/libavcodec/idctdsp.c
index 954066a5e3..846ed0b0f8 100644
--- a/libavcodec/idctdsp.c
+++ b/libavcodec/idctdsp.c
@@ -258,9 +258,11 @@ av_cold void ff_idctdsp_init(IDCTDSPContext *c, AVCodecContext *avctx)
         if (avctx->bits_per_raw_sample == 10 || avctx->bits_per_raw_sample == 9) {
             /* 10-bit MPEG-4 Simple Studio Profile requires a higher precision IDCT
                However, it only uses idct_put */
-            if (c->mpeg4_studio_profile)
+            if (c->mpeg4_studio_profile) {
                 c->idct_put              = ff_simple_idct_put_int32_10bit;
-            else {
+                c->idct_add              = NULL;
+                c->idct                  = NULL;
+            } else {
                 c->idct_put              = ff_simple_idct_put_int16_10bit;
                 c->idct_add              = ff_simple_idct_add_int16_10bit;
                 c->idct                  = ff_simple_idct_int16_10bit;



More information about the ffmpeg-cvslog mailing list