From patchwork Mon Nov 13 01:44:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dai, Jianhui J" X-Patchwork-Id: 44645 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:92a5:b0:181:818d:5e7f with SMTP id q37csp1065671pzg; Sun, 12 Nov 2023 17:44:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IGG02kqYLPeM5ZR6mx6mMVL+lpW0Sg8434DtttXTYyS+WF+w7jo/H7V80rxsavNPeNnxbPX X-Received: by 2002:a17:906:3c54:b0:9e5:2cb0:4594 with SMTP id i20-20020a1709063c5400b009e52cb04594mr4178343ejg.15.1699839869656; Sun, 12 Nov 2023 17:44:29 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id v22-20020a1709063bd600b009adec4bd971si2253917ejf.294.2023.11.12.17.44.28; Sun, 12 Nov 2023 17:44:29 -0800 (PST) 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; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=BPaSuYNQ; arc=fail (body hash mismatch); 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 B5CC968CC84; Mon, 13 Nov 2023 03:44:24 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7244968CBB4 for ; Mon, 13 Nov 2023 03:44:21 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699839862; x=1731375862; h=from:to:subject:date:message-id: content-transfer-encoding:mime-version; bh=ERYwECOjxUP+xeIuH0RFpJ+IexgsH0hTSImLMQany+0=; b=BPaSuYNQLGI7CjlGIkmrgqfUrYaGT4UvcEXBdAU/3EWb8De+H6lcO1Oh gAXT1OY8SlNRuEcPaQy+Yw206Oy9QRsMZ5qGIlQFJlMpPskh83teS2XLo j8Hntg9VvoyRZgQRp6ZLXP7j5QXjIHUXPf4BfgxAyv0bVqau4/+X1VUod Y4/yG4Qaey2Tsu5SIQV5ulDLaM57i1D8cHs+fWnCK4ZmnCl/whcbNUPZu dXzNvzVBvjMoFJE5TnMy45Bq3CM/hh1Cz2NCXhw1DoJmKDFc1ng74WW0y gTgV9FwrHNfrNTkgaHPC5bEcOzxhwsnvp8oR7fdaMrpIX0LJZ52XJs6/p Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10892"; a="454666415" X-IronPort-AV: E=Sophos;i="6.03,298,1694761200"; d="scan'208";a="454666415" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2023 17:44:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10892"; a="714113873" X-IronPort-AV: E=Sophos;i="6.03,298,1694761200"; d="scan'208";a="714113873" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga003.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 12 Nov 2023 17:44:17 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Sun, 12 Nov 2023 17:44:17 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Sun, 12 Nov 2023 17:44:17 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.100) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Sun, 12 Nov 2023 17:44:09 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Onz8XsH8Jo45IgO8KPPLcQgr16JHYN8pNUtKO87nNy9iCKWJv3YqGLHjj0LiREJztC4foiRHjotlTjZ3HRQ9x7UX5+Oyo0kzb40vGAfKLi24/5GvXhUwrkmOQdE/owE45XCgNxrE2mhYXVKBk27AwB+MnjlungdmUcgQnqq9nIdEbEAaqYTunme31Hgr4fCHC/yjSnaj8c5uJp+IewQjK+MzkkK61ttVHkpUIoS6wUX0+T6mCajxJ91yA1F3IUn7DqN147Lq6ePQn5OB1JfNbk0snh30xb8yldVtJgIUhYgiVQJqWIGTHHoPeONlyFW/UlNr90v9xF5ETnkun1lzJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1k8Yndzqhsk7ad4URK22nQebKdVwThe66MmAFG38O7s=; b=Hn0la40D+hurJDr9P5OA2Ca3LdDLgH6saCwrNKe82DnmRz9n6pcqw1BIf9hmNRjAUbGPdbd+4BNUndQmngvQXs2H2oaPymOp+gW/jbmEXfKHFXCmkRwA2hCYE3I9ssRn5cTxjqfu14DpKx7Cwehtnltr6HpGYUiqOmda/g+Q/ou/kHRGgIiLG/cgELB4bQzgmVUl8EdaOG4/gSZU6JBTg7QNVGLjPxvHeIkPODmSnsuz0NN2y4mJ55fQtbim7EsnzGb+5l6i0XLLlFtjMW1pEhwdW03VRrgOFt2ygRFDAktE2GRBHdu9OMB1tWZJTKcDtWdDuCPoWQqH2DNl0HAJng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM6PR11MB2681.namprd11.prod.outlook.com (2603:10b6:5:bd::33) by CYXPR11MB8664.namprd11.prod.outlook.com (2603:10b6:930:e6::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.26; Mon, 13 Nov 2023 01:44:07 +0000 Received: from DM6PR11MB2681.namprd11.prod.outlook.com ([fe80::554:31e:c67c:1747]) by DM6PR11MB2681.namprd11.prod.outlook.com ([fe80::554:31e:c67c:1747%6]) with mapi id 15.20.6977.029; Mon, 13 Nov 2023 01:44:07 +0000 From: "Dai, Jianhui J" To: "ffmpeg-devel@ffmpeg.org" Thread-Topic: [PATCH v3] avcodec/vp8: Export `vp8_token_update_probs` variable Thread-Index: AdoV0DIsO8BdEOzaTuiwreFjxJ4Plg== Date: Mon, 13 Nov 2023 01:44:06 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM6PR11MB2681:EE_|CYXPR11MB8664:EE_ x-ms-office365-filtering-correlation-id: 53e1e967-1b23-4178-d4a6-08dbe3ea063f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: f0FifARiG3S7IzAdwG8wuftvg4JDOE7YJ55e4bGZz6t476kNSLUtu6zGDLywO2bxYiTSpOEBl1slELPZ5kGZRJFJSs7YdmmFt6i267EbECgqj5TNi1Ja84uzy5fYs/InqItMlKAk+VONXSw//OdC/bbV4NPiqHa2jYcRCAplgeHxzeWmn2svNv20BwBKnCv3mfyGAOhhl3vPJQokuG36NJ4PUVfWIW6PFu1BovaVnkPR3fcfn4WAZ9B54vG4lIJ18VvCZwolXwn6PCMgOWMmrXEiZy6svoA7Y5YE4nnT4xp7/ENWJ3mV0zAfJxVPGNQcNMJjNV5bbDqXApicg4nu5vATQNEf4MoE2wwI16ER/dEjlk9UeVkstJg0g4/QiMJ03E3qdDZP/Nt+QFURpkZmngZSHb6F2tTAvR5aI67ufOaErPu/CaLp5whuiahNgrygd9r+0T/2Js1Wr2IxJs9Qq2M5GmWk2ZOkz8imB7hJnK6N2PmBz77+RYoPwPjukbza7vN1jq29tYkZFuNZm/bMXOcYiuGydNQD10O7VrUhaZAWBHqEb+I4yTji7IZ4TDy5y3QgxuWeo3Mn4uG3IM1xPSyf0TIKPEnZBEMCrOFrwT+vBqWdgavPWfD8bjqBUjJ8pwKkpKqDAH5J0zXBa78XYw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB2681.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(346002)(376002)(136003)(39860400002)(366004)(230922051799003)(64100799003)(1800799009)(451199024)(186009)(55016003)(41300700001)(2906002)(30864003)(5660300002)(8936002)(83380400001)(52536014)(8676002)(316002)(76116006)(38070700009)(66946007)(66476007)(66556008)(66446008)(64756008)(6916009)(33656002)(38100700002)(122000001)(6506007)(7696005)(82960400001)(86362001)(478600001)(71200400001)(9686003)(26005)(81973001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: COUaO9FsTpef1Lio4I9meBP6q9g1AFXUF9j5SaSqDWs5Vpx9Ar2fVrfh8AjuAVoa1180sxySz1sAjDKrFwqsOYrARLAOEXuhIkG7MukcnN1fYekFZOtaRe5NJTlfDWwadwC2wV/W88tt/hNnZRq9BgpqdKsl+AQH+RBLOopCd3X0zq5UK043v4y0dMWfCQvoO7OmydPLSmcIhpdrGLdMR8XK1Wnjvwn7uEQIuo/s3Nw7YaXKUbcoRq8u/JUujDqULv0kZKBkFczL0zjXU1Ynv1Z/Cw6Ip9QArK1tzxvjDg6gtPcsvR40O95AjmQGYLvFGuNl46UyGbU32E67hAGPMXVLZk1tbJm62rfBjr8DHr8TFDJ37TWiS3HzluzIj+NCfFQPr0V5+8751BPm1SO9rB0MZudI2Q5CtMTO06F8MSYhgl5Lsgcyik5WrSnJ8RMebmemB4Ecr6Q4t8dZM/dhZgz9GQ5T0dSDDa1HUGiDYwttdCHXtKn+daScdflEW/7SC8K1Yut90rBSxweWCpErIqk56p6NPMjQST7jwjnp70Cg82WFeKqfw2pM6RftY9rDdccyAXGgLU+gtAV6n1SLx8jdpGl9p8dMe/saa1K4jGizWm+2FpHnc0PnJ/r8yGtky89Zahwq8OTFxBgAVEeQukymYnA5CHJv/WY4uE1WgACANM3hCk0JQGecUfTYM6wyDrig52Tw2jRbw5/UK69Itte4A+F7HSRIDM9vEJ2kIUZo0w7ZufnZQBvOPjw+uZCoyv4i+GxJJs0kxKpGiy/2yTyyK2vRDIMSD8ipiBglBvcQGHFru8zWtPdzWtrHgXF8csGF8DPTizOtDWSKtrUd4nKyw0oDyLWeL/qV5/CbQBhMa2fQCRDBlDJOvjt4xBYq5dq1ZIn6ZHeNL/JcgAswP6tM27SrMM59ApafE3I3xSzJHihdpU0xO6hkEARfbEPqJu5UN1RbbanqpiGLl28+h/nJbHFc5s8Sldfqu3h1fwiksDaRrSbAhSgCczI/2joDjk+OL0Khb8krF5LotKDXe9y7muH4EfGB0+vML+pQ/RNWUHGwbxjfxacf0RB348AEAfwJuewjDttTS6j6WmwD4UXwVO8+ZGx2T3H2fcYDR3j7dSsixiDDlmwfuR2IAfxDp9K/cLFGy5KsqQzkrbb3CfyOKU6uOfErbB4KeDk/E0u1inS6n/cT4BcIVYHKx/HP0RXTghVr4PGyrEVHsk+UAz0lB6GPBDToQqdFLrrJGjcvHUzjRIf9Xh5awteyYmpcn/qwnD5PgXMoENa3LXsr9oKPH9YaJjTSSfaX/m2QB6ZQoKcgCYSl92lJD+alBvU8JJxBSPIhwrlIFJnwN8R9bm+XfyhmAfUJzEj7a9I23qVM47nGEljfGHiUts5p44mMEF7RgnGBmLReA/gUTkKeCynEyM8gvPafGcPwh/D5V+mfMVe1Gjpjj79Zn9+8v15JI8v3pxCDt/86j2s6oQuUt1A9Tyrm/7nLbVNYLBQVe9DSetixfwEVq83JzoTpfaXEa6/N1bzJaDHiEyx9CSjQHBLF5koBuD0SZOFlad4Xcbxj6SsebGLxU9X6/Co1gljz MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB2681.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 53e1e967-1b23-4178-d4a6-08dbe3ea063f X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Nov 2023 01:44:06.9300 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: bQ4HYtJdrh6bE9CspXghwXJZwJZfnSzSv/xz38bHhtE6ieAhrOF5/pXAnsChfL+bDeg1ezVN/sxMIlqw61sPeQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR11MB8664 X-OriginatorOrg: intel.com Subject: [FFmpeg-devel] [PATCH v3] avcodec/vp8: Export `vp8_token_update_probs` variable 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: BfE0RaYVwkAR This commit exports the `vp8_token_update_probs` variable to internal library scope to facilitate its reuse within the library. Signed-off-by: Jianhui Dai --- libavcodec/vp8.c | 2 +- libavcodec/vp8data.c | 170 ++++++++++++++++++++++++++++++++++++++++++ libavcodec/vp8data.h | 171 +------------------------------------------ 3 files changed, 172 insertions(+), 171 deletions(-) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index ffc430dd32..83c60adeb0 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -458,7 +458,7 @@ static void vp78_update_probability_tables(VP8Context *s) for (j = 0; j < 8; j++) for (k = 0; k < 3; k++) for (l = 0; l < NUM_DCT_TOKENS-1; l++) - if (vpx_rac_get_prob_branchy(c, vp8_token_update_probs[i][j][k][l])) { + if (vpx_rac_get_prob_branchy(c, ff_vp8_token_update_probs[i][j][k][l])) { int prob = vp89_rac_get_uint(c, 8); for (m = 0; vp8_coeff_band_indexes[j][m] >= 0; m++) s->prob->token[i][vp8_coeff_band_indexes[j][m]][k][l] = prob; diff --git a/libavcodec/vp8data.c b/libavcodec/vp8data.c index 857406928a..675c2a033d 100644 --- a/libavcodec/vp8data.c +++ b/libavcodec/vp8data.c @@ -40,3 +40,173 @@ const uint8_t *const ff_vp8_dct_cat_prob[] = { vp8_dct_cat6_prob, }; +const uint8_t ff_vp8_token_update_probs[4][8][3][11] = { + { + { + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 223, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255 }, + { 250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255 }, + { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + }, + { + { + { 217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 225, 252, 241, 253, 255, 255, 254, 255, 255, 255, 255 }, + { 234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255 }, + }, + { + { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + }, + { + { + { 186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255 }, + { 251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255 }, + }, + { + { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + }, + { + { + { 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255 }, + { 248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 248, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + { + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, + }, + }, +}; diff --git a/libavcodec/vp8data.h b/libavcodec/vp8data.h index 8b8f1ed111..c8e79fdbeb 100644 --- a/libavcodec/vp8data.h +++ b/libavcodec/vp8data.h @@ -513,176 +513,7 @@ static const uint8_t vp8_token_default_probs[4][8][3][NUM_DCT_TOKENS - 1] = { }, }; -static const uint8_t vp8_token_update_probs[4][8][3][NUM_DCT_TOKENS - 1] = { - { - { - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 223, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255 }, - { 250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255 }, - { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - }, - { - { - { 217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 225, 252, 241, 253, 255, 255, 254, 255, 255, 255, 255 }, - { 234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255 }, - }, - { - { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - }, - { - { - { 186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255 }, - { 251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255 }, - }, - { - { 255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - }, - { - { - { 248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255 }, - { 248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 248, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - { - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 }, - }, - }, -}; +extern const uint8_t ff_vp8_token_update_probs[4][8][3][11]; static const uint8_t vp8_dc_qlookup[VP8_MAX_QUANT + 1] = { 4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 16, 17, 17,