From patchwork Mon May 28 20:29:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 9141 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:11c:0:0:0:0:0 with SMTP id c28-v6csp2326514jad; Mon, 28 May 2018 13:30:28 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrSErF6x/D5J226BZ7Z5iMrEO1AOG7NytSJHR5GNrZ/diXVuRqtQ7pDl4QGiLBqjwMEMb5O X-Received: by 2002:a1c:850c:: with SMTP id h12-v6mr11604425wmd.136.1527539428211; Mon, 28 May 2018 13:30:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527539428; cv=none; d=google.com; s=arc-20160816; b=OwGMxuidOoTOBlkv8yUCUyq5Ob9m/CJbE1/mFQMQGqZaWr6oqh1/13PPdIrsF+Cwpk j5MZ3PHeYve1mej8cxuiNVugdffJQaA9DuwbdW+MyfZ+ItD921rddFDhr5PS8rldaD6V 1NEl9fxSRMqtN26XgGV4v1/ZG7gGTZWMPwd7ChMEKMLpNVo3EtgSwJi0Zfmb+AlZ8pG/ UvRAp9rBo2GBV8czT4v2YyAVq1mXQDBOuEb/ngy1ax4kqMZQzNFpRHocCTDlZ5pbUHI9 AH/fi9nSljOrRINuAvfwqRH8PtMFY1kN+5YnWjsIDdrG8pUiVvyQPApyAKknNknauVk5 /dbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to:arc-authentication-results; bh=Y/ifuikWl1v2d+wh2RpHzoeOXG0lZGGv/Qeauc7pARY=; b=qb3GX5SJA3Lvez/ckRvzVHzEpX1FttYQlCoQL4IkA9yhaw3ZeSKMBwlDQTsy3zcxb1 ZUlA6pMun33747Ga5uen26rWJuhBKsKCxVdmeOGJOtJzEABJinhI01q53fyEL54IJRYi KLuPJnyQ6o6Gb3oHGZLWTFrn85Z6mHK7IUNNUcY/iyo6mTyi3OVPm0U3ZTOwLbGxsaTM 1wNZ1r7XhbsEqhBUG+lhsEZ7NS/RDmcdJXQVyAOFK6/dLi7p6AWitj/Ga8NevnXcgYdc ki+zISwIam/KcDtUovt1buoA0USa79BzbjQTjfSsGcw0QtOrhWPZhH+3s45NCdRDlGNP ZYlw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id m187-v6si10204847wma.134.2018.05.28.13.30.27; Mon, 28 May 2018 13:30:28 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0941068A3A5; Mon, 28 May 2018 23:29:41 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-qmta-pe01-3.mx.upcmail.net (vie01a-qmta-pe01-3.mx.upcmail.net [62.179.121.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2ED5D689B4A for ; Mon, 28 May 2018 23:29:35 +0300 (EEST) Received: from [172.31.218.54] (helo=vie01a-dmta-pe08-3.mx.upcmail.net) by vie01a-pqmta-pe01.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1fNOmY-0000JU-LM for ffmpeg-devel@ffmpeg.org; Mon, 28 May 2018 22:30:18 +0200 Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe08.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1fNOmS-00023S-RJ for ffmpeg-devel@ffmpeg.org; Mon, 28 May 2018 22:30:12 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id rwW71x0260S5wYM01wW8h1; Mon, 28 May 2018 22:30:08 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 28 May 2018 22:29:57 +0200 Message-Id: <20180528202958.4247-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528202958.4247-1-michael@niedermayer.cc> References: <20180528202958.4247-1-michael@niedermayer.cc> Subject: [FFmpeg-devel] [PATCH 2/3] avcodec/idctdsp: Clear idct/idct_add for studio profile X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This does not leave them "as before" which may be a value from a previous profile Signed-off-by: Michael Niedermayer --- 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;