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 772A04695F for ; Mon, 31 Jul 2023 02:14:44 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 498DC68C21B; Mon, 31 Jul 2023 05:14:42 +0300 (EEST) Received: from mgamail.intel.com (unknown [192.55.52.136]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B4CD568BFF8 for ; Mon, 31 Jul 2023 05:14:35 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690769680; x=1722305680; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=0zQMP6Oq3qPQsjKzt4gpKFXVsIgyPI4juMEYAQNqikg=; b=ENB10P3TyRF1I8JWFx2E5s6HbZYPSmKgEmho50L8uiEmCvtA7wQiEu1b /jUk1FBruaYiAIqm68mlU3phJKzyjUXFnBsEDCIOt4EsPR0e/mKEpnmjO 0mJB+b2I8nRvkn7we3qsuKEiOGfnnuleLheE/VnduYjOPD1ZqZjVMw5c5 8mrc7y95jAegG4KwON6eUFsxUYafUhAuWvvD+aQpcnufIM145tIhtQ+wv s+XP3JGVjP21fHjktPTCcAxdvfM5OfRdINrVqqM0WZEc5Cye3QprjTGAm tPAazbqtPK0gnxnDAa9BEsd6sWt7l5psRuVZB0l/gTAz20Az4HmwSNPP4 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10787"; a="348503916" X-IronPort-AV: E=Sophos;i="6.01,243,1684825200"; d="scan'208";a="348503916" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jul 2023 19:14:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.01,202,1684825200"; d="scan'208";a="871456070" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga001.fm.intel.com with ESMTP; 30 Jul 2023 19:14:34 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Sun, 30 Jul 2023 19:14:31 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) 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.27; Sun, 30 Jul 2023 19:14:31 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Sun, 30 Jul 2023 19:14:31 -0700 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.170) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Sun, 30 Jul 2023 19:14:31 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ddta2E5fXts0yPYhc9VCWnJdsDICAXs0D0Fv6jPjjMWRzZNjDTnY7+ejmKPgbYsiy8Z9aIy1bjFr+xrqRoqVo5LkNVc1uJ+VQ1QugcwvPeHuQgVI5pJsJKItHk8KUWTfi07pja8po9CpVMNHgHUtt+qhXBGkjBAUnTP2fjWstv1XrtWbSQpuqrDU1PoJzxpxkkU/TB0LeJw6QP8sO4DvKeAhg79lHJW7EdsdAGzm/XESxnEGq109taMFPwJypZQTs0uFq58rfQtztb707c1J2OvKUvl2ECg04uzZDt8RibsB1ABudbOc0mqWnmFpLNZuYup+MCs8gwFjG9f22ncpnw== 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=j4h1eRPQ8EoD7gF9TmwdGCgpaTUJrVQ/dbLOZntqWBk=; b=kG9UXN4wrXPeU5bp1MX+VXburFfQgfG5ecqzz3Hyy0bSPTF+kQ+3Sa9P9TtnO5geauAV4yKfpODxxHgVJY/rA6QzsFgL9dp0nGYiyo6/UW9H6N6I34QdksMIHSFkfBmLbWhKacmXGzWUpnC/2xhk2e5oLR+iJE94LzX0KAZwI5H3umj4UitVekqvManSp6HlR3CVYNArvI5nh+8YLwseeM/IbdAaq+S1L6KBVnffGoOKTfTiNz8jhwQ/dNImy2jRQN5nxaovIe8FSfeDM1NAoqxokIjb+ZToSI9RNcz52SeFlxblDKnGXrbvwDvUz/4688RdWQT6qjR6AJqcgviymw== 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 BL3PR11MB6340.namprd11.prod.outlook.com (2603:10b6:208:3b4::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.39; Mon, 31 Jul 2023 02:14:28 +0000 Received: from DM6PR11MB2681.namprd11.prod.outlook.com ([fe80::3549:fc64:19cc:c591]) by DM6PR11MB2681.namprd11.prod.outlook.com ([fe80::3549:fc64:19cc:c591%5]) with mapi id 15.20.6631.026; Mon, 31 Jul 2023 02:14:28 +0000 From: "Dai, Jianhui J" To: FFmpeg development discussions and patches Thread-Topic: [PATCH v3] avcodec/cbs_vp8: Add support for VP8 codec bitstream READ methods Thread-Index: AdmG0tDk62vH8netRBa3ofDAEGXBAAS5O13gAlgjf2AIDxZUIA== Date: Mon, 31 Jul 2023 02:14:27 +0000 Message-ID: References: In-Reply-To: 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-publictraffictype: Email x-ms-traffictypediagnostic: DM6PR11MB2681:EE_|BL3PR11MB6340:EE_ x-ms-office365-filtering-correlation-id: 529b886c-53ac-4711-6c28-08db916bde42 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: aWET5kA1Qs96O7SR1LlHDZtRqIdFRyZhUU+P5vlnHMnGkHUGN+ivKwTMaWQscBIzoASYcxNEttx8uIdy0Hhgg9OmhJJz7PWAgwMknmsagW1e4VTz/wMLemFaNoU5kyxRJU5cO/9KidXiu/68ParWTzQFlDk7f84r6deF27Pv5dS2VSBnXSZ2uL+FXTBYzrnqDisfMUQEyIk4lCv6aMxLg83QDa6C42dDE7EDeSWFnLJZVGRD+OCRuMv9ioLxTMXvtogTchdUVxSoHGIL64vLjx/cBSBgwx/vpIgAWy8aMz7FJJrsvIdaQ8jmt0LCH5w2d80ZX/bW/CK7jb99JFOq8kC+XILBK0yI3v09BC7PqkmBoQkwzsufyA13dbu320euHAwH1O+F1nfcDjE2aD1ns6Cese6JIrvfDUlfSvjRTSW/oBkfGShH42pzgc7Ic4QuRusz9Mm4gev4/I73zjloFaVp1LjLX+6ogfzCg3jRvWCTVbI1QeuaNFgNL75V7a8Di2wXqF9rP8qWVs2iwoyE3jByf1rvHgrzkGaaa6c1suWDJ+QgzDDwyy1ZkMdUFa/frVoL/45leKzzhWJh/uw9dlH9ShPrVMu13hIOvmICkET2mVbt+jg3sumDXQtbKeVO 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:(13230028)(39860400002)(366004)(346002)(376002)(396003)(136003)(451199021)(9686003)(966005)(7696005)(55016003)(53546011)(6506007)(26005)(83380400001)(186003)(33656002)(76116006)(66946007)(66556008)(52536014)(38070700005)(122000001)(19627235002)(82960400001)(41300700001)(86362001)(66476007)(316002)(64756008)(66446008)(5660300002)(6916009)(8936002)(8676002)(38100700002)(2906002)(71200400001)(66899021)(478600001)(30864003)(2004002)(559001)(579004); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?hf07Ktlf9kMujYU8WTqZAcxDdUJgaSjHlfc/VMB5Cq37XuHGLMHJjpRkW05X?= =?us-ascii?Q?ibheGZLDaYkotv94Vbf3/vGXQZLFVmAf4nXFvgs4iX40DTGV84t/jKnWwhsT?= =?us-ascii?Q?zRIuLue+nkrpGmLP24V32lJZ7fOe0Fa65dgbvNubWaRpOt4xWNYKslhPxQRr?= =?us-ascii?Q?VpPaU3sadLv8ho4kOz/UvqDuwlg/lz9BtECMYxeu/EbGIDH4iuJe+r1l0jld?= =?us-ascii?Q?jFohmP5eyYvI2Tl0bjSsuzvGjbOLKYwbFmpP4hAbt8vA1+0nRi+kmqp1u5ph?= =?us-ascii?Q?bAztkPI1oUfUKZZg/KA2sU9b5g/HbuyhbCG19Ee4nKL54uJseK4yeTLuDPxo?= =?us-ascii?Q?qV8NMNE3dg5hDC86a2mBEHYv/Q2nMCk0iOtkdNumScikuekM0PXgYk8rp7T/?= =?us-ascii?Q?0zmuJC6s/D8MdMOa65KARHytBXSWUacc0whJqsVmkSTFWSoaGx3bcPeNtZzt?= =?us-ascii?Q?FKUmTmh6ZabATpZ9kfN3YyCMaP6eEvvuuBALGC8wxpukVU6Asn4K/9tF6r53?= =?us-ascii?Q?KGMJ9j8vPOpnNU+QnAtqs1C5lGGC15/mJOpJcUTsnKQsKPnZywlmQiwBnM4l?= =?us-ascii?Q?JTPXD5bL+qc9HkWDTCIIhz+HsP43DkCnWpUKdOXbNBNTde26jYBGwehr/ZT/?= =?us-ascii?Q?V4OT1CpeFr2PBxBZKMl8/HUAIeT+8mgpU+Gp0KQRDKaZAJulVKxmbnzdP8gy?= =?us-ascii?Q?GcmB/p7vK5nfXYVSUCgtqog767ll2m1nAQ2uxSIk0/2yx55qeVyhpifkJQoq?= =?us-ascii?Q?oxU3Sij6hpSMhP2GZLdHbPtVlJtNWzydFYoeKBMmBoY7iHSrRcdCok6sh6Ph?= =?us-ascii?Q?OuQ6RRf6GLaFe0hYvZVBQSkK91soLPVFiPXHvvRc1L7gPXzFB+kUdEL4g+x7?= =?us-ascii?Q?XXRX4rqo8Ks694ZjiXISso+hW8q4i2sGSmxQTLdY9xyPsJCjr1FwK9DYamhU?= =?us-ascii?Q?uasLHkRRN+lZAMoVXZROkGvJ8hR8ulL1ETHDcBu6tXWxid9Z/aL2ZBrOWfqA?= =?us-ascii?Q?16OSAw9LXaJ+b9cVEuE0v3GYH1AuIHWmK5H8uCCI28LRjWmP3xq+nsWm08Ey?= =?us-ascii?Q?WXs0sCKDp2ZUY5N/ezmE5dPv+U910CEXejCb2aHdDEx+iM77o1RKUWF/XIQb?= =?us-ascii?Q?z7Dk8HCNs8bJaOR8pJSULmYJ64QJIA5zXaD7pxASLFYw+V2h5AEQu+nJHU25?= =?us-ascii?Q?+PY6JB4yb7Dcr/ufTxeN1u0piX4WvaHAtlF8Wb4OY/2h6f3OpIuS5RvCD22d?= =?us-ascii?Q?8Q4X34cv2KGQCbIx27+VNdaSRgDtqmhlULew6M2P31z+RKTziqFiYXOWRjWl?= =?us-ascii?Q?ew2n4N/LhRR+m2mCzWOVGC8Do9KfikYUmKMw6Mei/q3VNBdk0Caj/g5ovKVZ?= =?us-ascii?Q?KRlfQIOn5mCjjvjJPyYRSddD0JiQNDvP6zd5/SYWBpXLGAfbcNM/Lm5E6RfA?= =?us-ascii?Q?bdSOoLsK07YWp26Us1RDAjqr4rxsZ/LiPMW5VzcYZwjAvInTzuOkhKMEMX4Q?= =?us-ascii?Q?+OvdIjZFQFRUXupYCb3Qr33Tzaf3SrsBvEcGuhoL9LvXNLrTDwCOQkTo4fFE?= =?us-ascii?Q?IdA8J3/uzS4Zh4l8U9icwalSFJzt+IZStvtEiQpf?= 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: 529b886c-53ac-4711-6c28-08db916bde42 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Jul 2023 02:14:27.8992 (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: hBwwN3aydoWGd49+eJT7yP32EHFLsMr1bDRfaYxC6smVp2aIBe0Kso7Jce3hzvYLh3Rwcq07Fm3bG0exsFxSdg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR11MB6340 X-OriginatorOrg: intel.com Subject: Re: [FFmpeg-devel] [PATCH v3] avcodec/cbs_vp8: Add support for VP8 codec bitstream READ methods 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 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: > -----Original Message----- > From: ffmpeg-devel On Behalf Of Dai, > Jianhui J > Sent: Tuesday, June 20, 2023 9:42 AM > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] [PATCH v3] avcodec/cbs_vp8: Add support for VP8 > codec bitstream READ methods > > > > > -----Original Message----- > > From: Dai, Jianhui J > > Sent: Thursday, June 8, 2023 11:18 AM > > To: FFmpeg development discussions and patches > > > > Subject: RE: [PATCH v3] avcodec/cbs_vp8: Add support for VP8 codec > > bitstream READ methods > > > > > > > > > -----Original Message----- > > > From: ffmpeg-devel On Behalf Of > > > Dai, Jianhui J > > > Sent: Tuesday, May 30, 2023 4:00 PM > > > To: ffmpeg-devel@ffmpeg.org > > > Subject: [FFmpeg-devel] [PATCH v3] avcodec/cbs_vp8: Add support for > > > VP8 codec bitstream READ methods > > > > > > This commit adds VP8 into cbs supported codec list, and enables the > > > `trace_headers` bitstream filters to support VP8, besides existing > > > AV1, H.264, > > > H.265 and VP9. It can be useful to debug VP8 stream issues. > > > > > > Only the READ methods `read_unit` and `split_fragment` are > > > implemented, the WRITE methods `write_unit` and `assemble_fragment` > > > return `AVERROR_PATCHWELCOME` error code. It is because the CBS VP8 > > > WRITE is unlikely used by any applications at the moment. The WRITE > > > methods can be added later if there are real requirments. > > > > > > TESTS: ffmpeg -i fate-suite/vp8/frame_size_change.webm -vcodec copy > > > -bsf:v trace_headers -f null - > > > > > > Signed-off-by: Jianhui Dai > > > --- > > > configure | 4 +- > > > libavcodec/Makefile | 1 + > > > libavcodec/cbs.c | 6 + > > > libavcodec/cbs_internal.h | 1 + > > > libavcodec/cbs_vp8.c | 360 +++++++++++++++++++++++++++ > > > libavcodec/cbs_vp8.h | 112 +++++++++ > > > libavcodec/cbs_vp8_syntax_template.c | 224 +++++++++++++++++ > > > 7 files changed, 707 insertions(+), 1 deletion(-) create mode > > > 100644 libavcodec/cbs_vp8.c create mode 100644 libavcodec/cbs_vp8.h > > > create mode > > > 100644 libavcodec/cbs_vp8_syntax_template.c > > > > > > diff --git a/configure b/configure > > > index bb7be67676..b8960d2639 100755 > > > --- a/configure > > > +++ b/configure > > > @@ -2432,6 +2432,7 @@ CONFIG_EXTRA=" > > > cbs_h265 > > > cbs_jpeg > > > cbs_mpeg2 > > > + cbs_vp8 > > > cbs_vp9 > > > deflate_wrapper > > > dirac_parse > > > @@ -2713,6 +2714,7 @@ cbs_h264_select="cbs" > > > cbs_h265_select="cbs" > > > cbs_jpeg_select="cbs" > > > cbs_mpeg2_select="cbs" > > > +cbs_vp8_select="cbs" > > > cbs_vp9_select="cbs" > > > dct_select="rdft" > > > deflate_wrapper_deps="zlib" > > > @@ -3284,7 +3286,7 @@ h264_redundant_pps_bsf_select="cbs_h264" > > > hevc_metadata_bsf_select="cbs_h265" > > > mjpeg2jpeg_bsf_select="jpegtables" > > > mpeg2_metadata_bsf_select="cbs_mpeg2" > > > -trace_headers_bsf_select="cbs" > > > +trace_headers_bsf_select="cbs cbs_vp8" > > > vp9_metadata_bsf_select="cbs_vp9" > > > > > > # external libraries > > > diff --git a/libavcodec/Makefile b/libavcodec/Makefile index > > > 3cf4444b7e..1c4f0da1d2 100644 > > > --- a/libavcodec/Makefile > > > +++ b/libavcodec/Makefile > > > @@ -78,6 +78,7 @@ OBJS-$(CONFIG_CBS_H264) += cbs_h2645.o > > > cbs_sei.o h2645_parse.o > > > OBJS-$(CONFIG_CBS_H265) += cbs_h2645.o cbs_sei.o > h2645_parse.o > > > OBJS-$(CONFIG_CBS_JPEG) += cbs_jpeg.o > > > OBJS-$(CONFIG_CBS_MPEG2) += cbs_mpeg2.o > > > +OBJS-$(CONFIG_CBS_VP8) += cbs_vp8.o vpx_rac.o > > > OBJS-$(CONFIG_CBS_VP9) += cbs_vp9.o > > > OBJS-$(CONFIG_CRYSTALHD) += crystalhd.o > > > OBJS-$(CONFIG_DCT) += dct.o dct32_fixed.o dct32_float.o > > > diff --git a/libavcodec/cbs.c b/libavcodec/cbs.c index > > > 504197e06d..c77110abb1 > > > 100644 > > > --- a/libavcodec/cbs.c > > > +++ b/libavcodec/cbs.c > > > @@ -46,6 +46,9 @@ static const CodedBitstreamType *const > > > cbs_type_table[] = { #if CONFIG_CBS_MPEG2 > > > &ff_cbs_type_mpeg2, > > > #endif > > > +#if CONFIG_CBS_VP8 > > > + &ff_cbs_type_vp8, > > > +#endif > > > #if CONFIG_CBS_VP9 > > > &ff_cbs_type_vp9, > > > #endif > > > @@ -67,6 +70,9 @@ const enum AVCodecID ff_cbs_all_codec_ids[] = { > > > #if > > > CONFIG_CBS_MPEG2 > > > AV_CODEC_ID_MPEG2VIDEO, > > > #endif > > > +#if CONFIG_CBS_VP8 > > > + AV_CODEC_ID_VP8, > > > +#endif > > > #if CONFIG_CBS_VP9 > > > AV_CODEC_ID_VP9, > > > #endif > > > diff --git a/libavcodec/cbs_internal.h b/libavcodec/cbs_internal.h > > > index > > > e585c77934..beaf8505d1 100644 > > > --- a/libavcodec/cbs_internal.h > > > +++ b/libavcodec/cbs_internal.h > > > @@ -247,6 +247,7 @@ extern const CodedBitstreamType > > > ff_cbs_type_h264; extern const CodedBitstreamType ff_cbs_type_h265; > > > extern const CodedBitstreamType ff_cbs_type_jpeg; extern const > > > CodedBitstreamType ff_cbs_type_mpeg2; > > > +extern const CodedBitstreamType ff_cbs_type_vp8; > > > extern const CodedBitstreamType ff_cbs_type_vp9; > > > > > > > > > diff --git a/libavcodec/cbs_vp8.c b/libavcodec/cbs_vp8.c new file > > > mode > > > 100644 index 0000000000..a890590cd9 > > > --- /dev/null > > > +++ b/libavcodec/cbs_vp8.c > > > @@ -0,0 +1,360 @@ > > > +/* > > > + * This file is part of FFmpeg. > > > + * > > > + * FFmpeg is free software; you can redistribute it and/or > > > + * modify it under the terms of the GNU Lesser General Public > > > + * License as published by the Free Software Foundation; either > > > + * version 2.1 of the License, or (at your option) any later version. > > > + * > > > + * FFmpeg is distributed in the hope that it will be useful, > > > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > > > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > > > +GNU > > > + * Lesser General Public License for more details. > > > + * > > > + * You should have received a copy of the GNU Lesser General Public > > > + * License along with FFmpeg; if not, write to the Free Software > > > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > > > +02110-1301 USA */ > > > + > > > +#include "libavutil/avassert.h" > > > + > > > +#include "cbs.h" > > > +#include "cbs_internal.h" > > > +#include "cbs_vp8.h" > > > + > > > +#include "vp8data.h" > > > + > > > +// Wrap of VPXRangeCoder to support size check. > > > +typedef struct CBSVP8RangeCoder { > > > + VPXRangeCoder c; > > > + const uint8_t *buffer; > > > + int buffer_size; > > > +} CBSVP8RangeCoder; > > > + > > > +static int cbs_vp8_read_unsigned(CodedBitstreamContext *ctx, > > > +GetBitContext > > > *gbc, > > > + int width, const char *name, > > > + const int *subscripts, uint32_t > > > +*write_to) { > > > + int pos; > > > + uint32_t value; > > > + > > > + av_assert0(width > 0 && width <= 24); > > > + > > > + if (get_bits_left(gbc) < width) { > > > + av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid value: > > > + bitstream > > ended.\n"); > > > + return AVERROR_INVALIDDATA; > > > + } > > > + > > > + pos = get_bits_count(gbc); > > > + value = get_bits_le(gbc, width); > > > + > > > + if (ctx->trace_enable) { > > > + int i; > > > + char bits[33]; > > > + for (i = 0; i < width; i++) > > > + bits[i] = value >> (width - i - 1) & 1 ? '1' : '0'; > > > + bits[i] = 0; > > > + > > > + ff_cbs_trace_syntax_element(ctx, pos, name, subscripts, bits, value); > > > + } > > > + > > > + *write_to = value; > > > + return 0; > > > +} > > > + > > > +static int cbs_vp8_init_range_decoder(CBSVP8RangeCoder *rac, const > > > +uint8_t > > > *buf, > > > + int buf_size) { > > > + int err; > > > + > > > + err = ff_vpx_init_range_decoder(&rac->c, buf, buf_size); > > > + if (err < 0) > > > + return err; > > > + > > > + rac->buffer = buf; > > > + rac->buffer_size = buf_size; > > > + return 0; > > > +} > > > + > > > +static av_unused int cbs_vp8_rac_get(CBSVP8RangeCoder *rac, int > > > +width) { > > > + int value = 0; > > > + > > > + while (width--) > > > + value = (value << 1) | vpx_rac_get_prob(&rac->c, 128); > > > + > > > + return value; > > > +} > > > + > > > +static int cbs_vp8_rac_get_prob_branchy(CBSVP8RangeCoder *rac, int > > > +prob) { > > > + return vpx_rac_get_prob_branchy(&rac->c, prob); } > > > + > > > +static int cbs_vp8_rac_get_bits_count(CBSVP8RangeCoder *rac) { > > > + int bits_count = (rac->c.buffer - rac->buffer) * 8; > > > + bits_count += rac->c.bits; > > > + return bits_count; > > > +} > > > + > > > +static int cbs_vp8_rac_read_unsigned(CodedBitstreamContext *ctx, > > > + CBSVP8RangeCoder *rac, int width, > > > + const char *name, const int *subscripts, > > > + uint32_t *write_to) { > > > + CodedBitstreamVP8Context *vp8 = ctx->priv_data; > > > + uint32_t value; > > > + int pos; > > > + > > > + av_assert0(width >= 0 && width <= 8); > > > + > > > + if (vpx_rac_is_end(&rac->c)) { > > > + av_log(ctx->log_ctx, AV_LOG_ERROR, > > > + "Invalid value at " > > > + "%s: bitstream ended.\n", > > > + name); > > > + return AVERROR_INVALIDDATA; > > > + } > > > + > > > + pos = cbs_vp8_rac_get_bits_count(rac); > > > + if (pos > rac->buffer_size * 8) { > > > + av_log(ctx->log_ctx, AV_LOG_ERROR, > > > + "Invalid value at " > > > + "%s: bitstream ended.\n", > > > + name); > > > + return AVERROR_INVALIDDATA; > > > + } > > > + > > > + pos += vp8->uncompressed_header_size * 8; > > > + > > > + value = cbs_vp8_rac_get(rac, width); > > > + > > > + if (ctx->trace_enable) { > > > + char bits[33] = "-"; > > > + ff_cbs_trace_syntax_element(ctx, pos, name, subscripts, bits, value); > > > + } > > > + > > > + *write_to = value; > > > + return 0; > > > +} > > > + > > > +static int cbs_vp8_rac_read_signed(CodedBitstreamContext *ctx, > > > + CBSVP8RangeCoder *rac, int width, > > > + const char *name, const int *subscripts, > > > + int32_t *write_to) { > > > + CodedBitstreamVP8Context *vp8 = ctx->priv_data; > > > + int32_t value; > > > + int pos; > > > + > > > + av_assert0(width >= 0 && width <= 8); > > > + > > > + if (vpx_rac_is_end(&rac->c)) { > > > + av_log(ctx->log_ctx, AV_LOG_ERROR, > > > + "Invalid value at " > > > + "%s: bitstream ended.\n", > > > + name); > > > + return AVERROR_INVALIDDATA; > > > + } > > > + > > > + pos = cbs_vp8_rac_get_bits_count(rac); > > > + if (pos > rac->buffer_size * 8) { > > > + av_log(ctx->log_ctx, AV_LOG_ERROR, > > > + "Invalid value at " > > > + "%s: bitstream ended.\n", > > > + name); > > > + return AVERROR_INVALIDDATA; > > > + } > > > + > > > + pos += vp8->uncompressed_header_size * 8; > > > + > > > + value = cbs_vp8_rac_get(rac, width); > > > + if (cbs_vp8_rac_get(rac, 1)) > > > + value = -value; > > > + > > > + if (ctx->trace_enable) { > > > + char bits[33] = "-"; > > > + ff_cbs_trace_syntax_element(ctx, pos, name, subscripts, bits, value); > > > + } > > > + > > > + *write_to = value; > > > + return 0; > > > +} > > > + > > > +#define HEADER(name) \ > > > + do { \ > > > + ff_cbs_trace_header(ctx, name); \ > > > + } while (0) > > > + > > > +#define CHECK(call) \ > > > + do { \ > > > + int err = (call); \ > > > + if (err < 0) \ > > > + return err; \ > > > + } while (0) > > > + > > > +#define FUNC_NAME(rw, codec, name) cbs_##codec##_##rw##_##name > > > #define > > > +FUNC_VP8(rw, name) FUNC_NAME(rw, vp8, name) #define FUNC(name) > > > +FUNC_VP8(READWRITE, name) > > > + > > > +#define SUBSCRIPTS(subs, ...) \ > > > + (subs > 0 ? ((int[subs + 1]){subs, __VA_ARGS__}) : NULL) > > > + > > > +#define f(width, name) xf(width, name, 0) > > > + > > > +#define rac_f(width, name) rac_unsigned_subs(width, name, 0) > > > +#define rac_s(width, name) rac_signed_subs(width, name, 0) #define > > > +rac_fs(width, name, subs, ...) \ > > > + rac_unsigned_subs(width, name, subs, __VA_ARGS__) #define > > > +rac_ss(width, name, subs, ...) \ > > > + rac_signed_subs(width, name, subs, __VA_ARGS__) > > > + > > > +#define READ > > > +#define READWRITE read > > > +#define RWContext GetBitContext > > > + > > > +#define xf(width, name, subs, ...) \ > > > + do { \ > > > + uint32_t value; \ > > > + CHECK(cbs_vp8_read_unsigned(ctx, rw, width, #name, \ > > > + SUBSCRIPTS(subs, __VA_ARGS__), &value)); \ > > > + current->name = value; \ > > > + } while (0) > > > + > > > +#define fixed(width, name, value) \ > > > + do { \ > > > + av_unused uint32_t fixed_value; \ > > > + CHECK(ff_cbs_read_unsigned(ctx, rw, width, #name, 0, &fixed_value, \ > > > + value, value)); \ > > > + } while (0) > > > + > > > +#define rac_unsigned_subs(width, name, subs, ...) \ > > > + do { \ > > > + uint32_t value; \ > > > + CHECK(cbs_vp8_rac_read_unsigned( \ > > > + ctx, rac, width, #name, SUBSCRIPTS(subs, __VA_ARGS__), &value)); \ > > > + current->name = value; \ > > > + } while (0) > > > + > > > +#define rac_signed_subs(width, name, subs, ...) \ > > > + do { \ > > > + int32_t value; \ > > > + CHECK(cbs_vp8_rac_read_signed(ctx, rac, width, #name, \ > > > + SUBSCRIPTS(subs, __VA_ARGS__), &value)); \ > > > + current->name = value; \ > > > + } while (0) > > > + > > > +#include "cbs_vp8_syntax_template.c" > > > + > > > +static int cbs_vp8_split_fragment(CodedBitstreamContext *ctx, > > > + CodedBitstreamFragment *frag, int > > > +header) { > > > + int err; > > > + > > > + if (frag->data_size == 0) > > > + return AVERROR_INVALIDDATA; > > > + > > > + err = ff_cbs_append_unit_data(frag, 0, frag->data, frag->data_size, > > > + frag->data_ref); > > > + if (err < 0) > > > + return err; > > > + > > > + return 0; > > > +} > > > + > > > +static int cbs_vp8_read_unit(CodedBitstreamContext *ctx, > > > + CodedBitstreamUnit *unit) { > > > + CodedBitstreamVP8Context *vp8 = ctx->priv_data; > > > + VP8RawFrame *frame; > > > + GetBitContext gbc; > > > + CBSVP8RangeCoder rac; > > > + int err, pos; > > > + > > > + err = ff_cbs_alloc_unit_content(ctx, unit); > > > + if (err < 0) > > > + return err; > > > + frame = unit->content; > > > + > > > + // Create GetBitContext for uncompressed header. > > > + err = init_get_bits8_le(&gbc, unit->data, 8 * unit->data_size); > > > + if (err < 0) > > > + return err; > > > + > > > + err = cbs_vp8_read_uncompressed_header(ctx, &gbc, frame); > > > + if (err < 0) > > > + return err; > > > + > > > + pos = get_bits_count(&gbc); > > > + av_assert0(pos % 8 == 0); > > > + pos /= 8; > > > + av_assert0(pos <= unit->data_size); > > > + > > > + if (pos == unit->data_size) > > > + return AVERROR_INVALIDDATA; > > > + > > > + vp8->uncompressed_header_size = pos; > > > + > > > + // Create range decoder for compressed header. > > > + err = cbs_vp8_init_range_decoder( > > > + &rac, unit->data + pos, frame->header.first_partition_length_in_bytes); > > > + if (err < 0) > > > + return err; > > > + > > > + err = cbs_vp8_read_compressed_header(ctx, &rac, frame); > > > + if (err < 0) > > > + return err; > > > + > > > + pos = cbs_vp8_rac_get_bits_count(&rac); > > > + if (pos > rac.buffer_size * 8) > > > + return AVERROR_INVALIDDATA; > > > + > > > + frame->data_ref = av_buffer_ref(unit->data_ref); > > > + if (!frame->data_ref) > > > + return AVERROR(ENOMEM); > > > + > > > + frame->data = unit->data + pos; > > > + frame->data_size = unit->data_size - pos; > > > + > > > + return 0; > > > +} > > > + > > > +static int cbs_vp8_write_unit(CodedBitstreamContext *ctx, > > > + CodedBitstreamUnit *unit, > > > +PutBitContext > > > +*pbc) { > > > + return AVERROR_PATCHWELCOME; > > > +} > > > + > > > +static int cbs_vp8_assemble_fragment(CodedBitstreamContext *ctx, > > > + CodedBitstreamFragment *frag) { > > > + return AVERROR_PATCHWELCOME; > > > +} > > > + > > > +static void cbs_vp8_flush(CodedBitstreamContext *ctx) { > > > + CodedBitstreamVP8Context *vp8 = ctx->priv_data; > > > + > > > + vp8->uncompressed_header_size = 0; } > > > + > > > +static const CodedBitstreamUnitTypeDescriptor cbs_vp8_unit_types[] = { > > > + CBS_UNIT_TYPE_INTERNAL_REF(0, VP8RawFrame, data), > > > + CBS_UNIT_TYPE_END_OF_LIST}; > > > + > > > +const CodedBitstreamType ff_cbs_type_vp8 = { > > > + .codec_id = AV_CODEC_ID_VP8, > > > + > > > + .priv_data_size = sizeof(CodedBitstreamVP8Context), > > > + > > > + .unit_types = cbs_vp8_unit_types, > > > + > > > + .split_fragment = &cbs_vp8_split_fragment, > > > + .read_unit = &cbs_vp8_read_unit, > > > + .write_unit = &cbs_vp8_write_unit, > > > + > > > + .flush = &cbs_vp8_flush, > > > + > > > + .assemble_fragment = &cbs_vp8_assemble_fragment, }; > > > diff --git a/libavcodec/cbs_vp8.h b/libavcodec/cbs_vp8.h new file > > > mode > > > 100644 index 0000000000..0bfa465ff7 > > > --- /dev/null > > > +++ b/libavcodec/cbs_vp8.h > > > @@ -0,0 +1,112 @@ > > > +/* > > > + * This file is part of FFmpeg. > > > + * > > > + * FFmpeg is free software; you can redistribute it and/or > > > + * modify it under the terms of the GNU Lesser General Public > > > + * License as published by the Free Software Foundation; either > > > + * version 2.1 of the License, or (at your option) any later version. > > > + * > > > + * FFmpeg is distributed in the hope that it will be useful, > > > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > > > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > > > +GNU > > > + * Lesser General Public License for more details. > > > + * > > > + * You should have received a copy of the GNU Lesser General Public > > > + * License along with FFmpeg; if not, write to the Free Software > > > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > > > +02110-1301 USA */ > > > + > > > +#ifndef AVCODEC_CBS_VP8_H > > > +#define AVCODEC_CBS_VP8_H > > > + > > > +#include > > > +#include > > > + > > > +#include "cbs.h" > > > +#include "vpx_rac.h" > > > + > > > +enum { > > > + VP8_START_CODE_0 = 0x9D, > > > + VP8_START_CODE_1 = 0x01, > > > + VP8_START_CODE_2 = 0x2A, > > > +}; > > > + > > > +enum { > > > + VP8_KEY_FRAME = 0, > > > + VP8_NON_KEY_FRAME = 1, > > > +}; > > > + > > > +typedef struct VP8RawFrameHeader { > > > + // frame tag > > > + uint8_t frame_type; > > > + uint8_t profile; > > > + uint8_t show_frame; > > > + uint32_t first_partition_length_in_bytes; > > > + > > > + uint16_t width; > > > + uint8_t horizontal_scale; > > > + uint16_t height; > > > + uint8_t vertical_scale; > > > + > > > + // frame header > > > + uint8_t color_space; > > > + uint8_t clamping_type; > > > + > > > + // segmentation > > > + uint8_t segmentation_enabled; > > > + uint8_t update_segment_map; > > > + uint8_t update_segment_feature_data; > > > + uint8_t segment_feature_mode; > > > + int8_t segment_update_qp[4]; > > > + int8_t segment_update_loop_filter_level[4]; > > > + uint8_t segment_update_probs[3]; > > > + > > > + // loop filter > > > + uint8_t loop_filter_type; > > > + uint8_t loop_filter_level; > > > + uint8_t loop_filter_sharpness; > > > + uint8_t mode_ref_lf_delta_enabled; > > > + int8_t ref_lf_deltas[4]; > > > + int8_t mode_lf_deltas[4]; > > > + > > > + uint8_t log2_token_partitions; > > > + > > > + // qp > > > + uint8_t base_qindex; > > > + int8_t y1dc_delta_q; > > > + int8_t y2dc_delta_q; > > > + int8_t y2ac_delta_q; > > > + int8_t uvdc_delta_q; > > > + int8_t uvac_delta_q; > > > + > > > + // ref > > > + uint8_t refresh_golden_frame; > > > + uint8_t refresh_alternate_frame; > > > + uint8_t ref_frame_sign_bias_golden; > > > + uint8_t ref_frame_sign_bias_alternate; > > > + uint8_t refresh_last_frame; > > > + > > > + // token probs > > > + uint8_t refresh_entropy_probs; > > > + > > > + uint8_t mb_no_skip_coeff; > > > + uint8_t prob_skip_false; > > > + > > > + uint8_t prob_intra; > > > + uint8_t prob_last; > > > + uint8_t prob_golden; > > > +} VP8RawFrameHeader; > > > + > > > +typedef struct VP8RawFrame { > > > + VP8RawFrameHeader header; > > > + > > > + uint8_t *data; > > > + AVBufferRef *data_ref; > > > + size_t data_size; > > > +} VP8RawFrame; > > > + > > > +typedef struct CodedBitstreamVP8Context { > > > + uint32_t uncompressed_header_size; } CodedBitstreamVP8Context; > > > + > > > +#endif /* AVCODEC_CBS_VP8_H */ > > > diff --git a/libavcodec/cbs_vp8_syntax_template.c > > > b/libavcodec/cbs_vp8_syntax_template.c > > > new file mode 100644 > > > index 0000000000..5ab034a164 > > > --- /dev/null > > > +++ b/libavcodec/cbs_vp8_syntax_template.c > > > @@ -0,0 +1,224 @@ > > > +/* > > > + * This file is part of FFmpeg. > > > + * > > > + * FFmpeg is free software; you can redistribute it and/or > > > + * modify it under the terms of the GNU Lesser General Public > > > + * License as published by the Free Software Foundation; either > > > + * version 2.1 of the License, or (at your option) any later version. > > > + * > > > + * FFmpeg is distributed in the hope that it will be useful, > > > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > > > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > > > +GNU > > > + * Lesser General Public License for more details. > > > + * > > > + * You should have received a copy of the GNU Lesser General Public > > > + * License along with FFmpeg; if not, write to the Free Software > > > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > > > +02110-1301 USA */ > > > + > > > +static int FUNC(update_segmentation)(CodedBitstreamContext *ctx, > > > + CBSVP8RangeCoder *rac, > > > + VP8RawFrameHeader *current) { > > > + rac_f(1, update_segment_map); > > > + rac_f(1, update_segment_feature_data); > > > + > > > + if (current->update_segment_feature_data) { > > > + rac_f(1, segment_feature_mode); > > > + // quantizer > > > + for (int i = 0; i < 4; i++) > > > + if (cbs_vp8_rac_get(rac, 1)) > > > + rac_ss(7, segment_update_qp[i], 1, i); > > > + // loop filter > > > + for (int i = 0; i < 4; i++) > > > + if (cbs_vp8_rac_get(rac, 1)) > > > + rac_ss(6, segment_update_loop_filter_level[i], 1, i); > > > + } > > > + > > > + if (current->update_segment_map) { > > > + for (int i = 0; i < 3; i++) > > > + if (cbs_vp8_rac_get(rac, 1)) > > > + rac_fs(8, segment_update_probs[i], 1, i); > > > + } > > > + > > > + return 0; > > > +} > > > + > > > +static int FUNC(mode_ref_lf_deltas)(CodedBitstreamContext *ctx, > > > + CBSVP8RangeCoder *rac, > > > + VP8RawFrameHeader *current) { > > > + rac_f(1, mode_ref_lf_delta_enabled); > > > + if (current->mode_ref_lf_delta_enabled) { > > > + if (cbs_vp8_rac_get(rac, 1)) { > > > + // ref_lf_deltas > > > + for (int i = 0; i < 4; i++) > > > + if (cbs_vp8_rac_get(rac, 1)) > > > + rac_ss(6, ref_lf_deltas[i], 1, i); > > > + // mode_lf_deltas > > > + for (int i = 0; i < 4; i++) > > > + if (cbs_vp8_rac_get(rac, 1)) > > > + rac_ss(6, mode_lf_deltas[i], 1, i); > > > + } > > > + } > > > + > > > + return 0; > > > +} > > > + > > > +static int FUNC(quantization_params)(CodedBitstreamContext *ctx, > > > + CBSVP8RangeCoder *rac, > > > + VP8RawFrameHeader *current) { > > > + rac_f(7, base_qindex); > > > + > > > + if (cbs_vp8_rac_get(rac, 1)) > > > + rac_s(4, y1dc_delta_q); > > > + > > > + if (cbs_vp8_rac_get(rac, 1)) > > > + rac_s(4, y2dc_delta_q); > > > + > > > + if (cbs_vp8_rac_get(rac, 1)) > > > + rac_s(4, y2ac_delta_q); > > > + > > > + if (cbs_vp8_rac_get(rac, 1)) > > > + rac_s(4, uvdc_delta_q); > > > + > > > + if (cbs_vp8_rac_get(rac, 1)) > > > + rac_s(4, uvac_delta_q); > > > + > > > + return 0; > > > +} > > > + > > > +static int FUNC(update_token_probs)(CodedBitstreamContext *ctx, > > > + CBSVP8RangeCoder *rac, > > > + VP8RawFrameHeader *current) { > > > + for (int i = 0; i < 4; ++i) { > > > + for (int j = 0; j < 8; ++j) { > > > + for (int k = 0; k < 3; ++k) { > > > + for (int l = 0; l < 11; ++l) > > > + if (cbs_vp8_rac_get_prob_branchy( > > > + rac, vp8_token_update_probs[i][j][k][l])) > > > + cbs_vp8_rac_get(rac, 8); > > > + } > > > + } > > > + } > > > + > > > + return 0; > > > +} > > > + > > > +static int FUNC(update_mv_probs)(CodedBitstreamContext *ctx, > > > + CBSVP8RangeCoder *rac, > > > + VP8RawFrameHeader *current) { > > > + for (int i = 0; i < 2; ++i) { > > > + for (int j = 0; j < 19; ++j) > > > + if (cbs_vp8_rac_get(rac, 1)) > > > + cbs_vp8_rac_get(rac, 7); > > > + } > > > + > > > + return 0; > > > +} > > > + > > > +static int FUNC(frame_tag)(CodedBitstreamContext *ctx, RWContext *rw, > > > + VP8RawFrameHeader *current) { > > > + f(1, frame_type); > > > + f(3, profile); > > > + f(1, show_frame); > > > + f(19, first_partition_length_in_bytes); > > > + > > > + if (current->frame_type == VP8_KEY_FRAME) { > > > + fixed(8, start_code_0, VP8_START_CODE_0); > > > + fixed(8, start_code_1, VP8_START_CODE_1); > > > + fixed(8, start_code_2, VP8_START_CODE_2); > > > + > > > + f(14, width); > > > + f(2, horizontal_scale); > > > + f(14, height); > > > + f(2, vertical_scale); > > > + } > > > + > > > + return 0; > > > +} > > > + > > > +static int FUNC(frame_header)(CodedBitstreamContext *ctx, > > > CBSVP8RangeCoder *rac, > > > + VP8RawFrameHeader *current) { > > > + if (current->frame_type == VP8_KEY_FRAME) { > > > + rac_f(1, color_space); > > > + rac_f(1, clamping_type); > > > + } > > > + > > > + rac_f(1, segmentation_enabled); > > > + if (current->segmentation_enabled) > > > + CHECK(FUNC(update_segmentation)(ctx, rac, current)); > > > + > > > + rac_f(1, loop_filter_type); > > > + rac_f(6, loop_filter_level); > > > + rac_f(3, loop_filter_sharpness); > > > + > > > + CHECK(FUNC(mode_ref_lf_deltas)(ctx, rac, current)); > > > + > > > + rac_f(2, log2_token_partitions); > > > + > > > + CHECK(FUNC(quantization_params)(ctx, rac, current)); > > > + > > > + if (current->frame_type != VP8_KEY_FRAME) { > > > + rac_f(1, refresh_golden_frame); > > > + rac_f(1, refresh_alternate_frame); > > > + if (!current->refresh_golden_frame) > > > + cbs_vp8_rac_get(rac, 2); > > > + if (!current->refresh_alternate_frame) > > > + cbs_vp8_rac_get(rac, 2); > > > + rac_f(1, ref_frame_sign_bias_golden); > > > + rac_f(1, ref_frame_sign_bias_alternate); > > > + } > > > + rac_f(1, refresh_entropy_probs); > > > + if (current->frame_type != VP8_KEY_FRAME) > > > + rac_f(1, refresh_last_frame); > > > + > > > + CHECK(FUNC(update_token_probs)(ctx, rac, current)); > > > + > > > + rac_f(1, mb_no_skip_coeff); > > > + if (current->mb_no_skip_coeff) > > > + rac_f(8, prob_skip_false); > > > + > > > + if (current->frame_type != VP8_KEY_FRAME) { > > > + rac_f(8, prob_intra); > > > + rac_f(8, prob_last); > > > + rac_f(8, prob_golden); > > > + > > > + // intra_16x16_prob > > > + if (cbs_vp8_rac_get(rac, 1)) > > > + for (int i = 0; i < 4; i++) > > > + cbs_vp8_rac_get(rac, 8); > > > + > > > + // intra_chroma_prob > > > + if (cbs_vp8_rac_get(rac, 1)) > > > + for (int i = 0; i < 4; i++) > > > + cbs_vp8_rac_get(rac, 8); > > > + > > > + CHECK(FUNC(update_mv_probs)(ctx, rac, current)); > > > + } > > > + > > > + return 0; > > > +} > > > + > > > +static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, > > > RWContext *rw, > > > + VP8RawFrame *current) { > > > + HEADER("Frame"); > > > + > > > + CHECK(FUNC(frame_tag)(ctx, rw, ¤t->header)); > > > + > > > + return 0; > > > +} > > > + > > > +static int FUNC(compressed_header)(CodedBitstreamContext *ctx, > > > + CBSVP8RangeCoder *rac, > > > +VP8RawFrame > > > +*current) { > > > + CHECK(FUNC(frame_header)(ctx, rac, ¤t->header)); > > > + > > > + return 0; > > > +} > > > -- > > > 2.25.1 > > > > > > > Friendly ping reviews to take a look. > > Ping reviewer to submit, if no additional comments. Thanks, Ping reviewers, thanks. > > > > > > _______________________________________________ > > > 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". > _______________________________________________ > 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". _______________________________________________ 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".