From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 46CB845531 for ; Thu, 31 Aug 2023 07:21:43 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 035E568C6D1; Thu, 31 Aug 2023 10:21:41 +0300 (EEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DD85C688158 for ; Thu, 31 Aug 2023 10:21:33 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1693466499; x=1725002499; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=zvquBowizyP8kPT1iDcD+teYCDuNWLFUJjtCLJrqTe4=; b=JP3TS1WqaZ1XRHvRuCl9TA/UhpfCRTlBxDRzDvbp8hdB8TFPO6qKkMxx whI3jS90FtYmHZ/hHfBapaTTB0zXhUQjWqYAXFKqDyF8CVSPLa8Xm6qH2 1IUqbzTn0r+8bXGUx0K2tB+otgEhUrPXFPtbcNpYodHp4sC2QFHyitZa+ ugtXDo7jGh9XU0Aozf+aKjmDgUR9UrO8FmcwKqQQ4ZVI4ytzQjmbM7rqx ENThDT7GsdxxWGpfMJkJBR5VP9QrShDCTEkPEhuBnAp+VCTILsSFvViNC 5InasLJq8vzchUMvNOKlurwtC93zDRQqL6yWt1BWq42dLlNfSe03Rio1h w==; X-IronPort-AV: E=McAfee;i="6600,9927,10818"; a="355344938" X-IronPort-AV: E=Sophos;i="6.02,216,1688454000"; d="scan'208";a="355344938" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2023 00:21:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10818"; a="854045378" X-IronPort-AV: E=Sophos;i="6.02,216,1688454000"; d="scan'208";a="854045378" Received: from t-dg2.sh.intel.com ([10.239.159.29]) by fmsmga002.fm.intel.com with ESMTP; 31 Aug 2023 00:21:18 -0700 From: fei.w.wang-at-intel.com@ffmpeg.org To: ffmpeg-devel@ffmpeg.org Date: Thu, 31 Aug 2023 15:21:00 +0800 Message-Id: <20230831072107.1051955-1-fei.w.wang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v4 1/8] avcodec/cbs_av1: Add tx mode enum values X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Cc: fei.w.wang@intel.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Fei Wang Signed-off-by: Fei Wang --- libavcodec/av1.h | 7 +++++++ libavcodec/cbs_av1_syntax_template.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/libavcodec/av1.h b/libavcodec/av1.h index 384f7cddc7..8704bc41c1 100644 --- a/libavcodec/av1.h +++ b/libavcodec/av1.h @@ -175,6 +175,13 @@ enum { AV1_RESTORE_SWITCHABLE = 3, }; +// TX mode (section 6.8.21) +enum { + AV1_ONLY_4X4 = 0, + AV1_TX_MODE_LARGEST = 1, + AV1_TX_MODE_SELECT = 2, +}; + // Sequence Headers are actually unbounded because one can use // an arbitrary number of leading zeroes when encoding via uvlc. // The following estimate is based around using the lowest number diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c index a747e17784..3a5cafbfb7 100644 --- a/libavcodec/cbs_av1_syntax_template.c +++ b/libavcodec/cbs_av1_syntax_template.c @@ -1028,9 +1028,9 @@ static int FUNC(read_tx_mode)(CodedBitstreamContext *ctx, RWContext *rw, int err; if (priv->coded_lossless) - infer(tx_mode, 0); + infer(tx_mode, AV1_ONLY_4X4); else - increment(tx_mode, 1, 2); + increment(tx_mode, AV1_TX_MODE_LARGEST, AV1_TX_MODE_SELECT); return 0; } -- 2.25.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".