From patchwork Tue Jan 3 13:40:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Siedel X-Patchwork-Id: 34873 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:bc95:b0:ad:ade2:bfd2 with SMTP id fx21csp8075972pzb; Tue, 3 Jan 2023 05:41:44 -0800 (PST) X-Google-Smtp-Source: AMrXdXsG1qIWiQJyqFguzWHOlt3kjiIUrKl9tdqKCYqTDa1JoxjA0MlNniRVVHwkv53CSufTFoR+ X-Received: by 2002:a17:907:a08d:b0:7c0:dac7:36d8 with SMTP id hu13-20020a170907a08d00b007c0dac736d8mr39397807ejc.10.1672753303823; Tue, 03 Jan 2023 05:41:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672753303; cv=none; d=google.com; s=arc-20160816; b=0kA4Tc7TaKinTkegJxfKntsQ+e9a56ai+PyDrAeIE/8PjHYRYROrCJ4k4kDz+5la3H fionBp8Qi0/Wo1+sfmkQ3RS7GtZ3tSR10nTORguvsWgxz24WhftN+ZIQ3HVaLJ2P7lVC Zw0yc9KjH5evn2tvnlVvS+xvR45iEsu2NmOw+eyu+dJTgSDLfIyMC7251JXYOcVH+m7R APVF3UUkOtdTrq9jJ7shlZFdH7BKomKNa6AsHEnYovaVlbFl1e5n7EiBvzH9a5lTL+p3 vfjokdb2KkMB1c94d/4bbywhVTtBM/kaA/B+AG3txZV4k/Egg5UYhJu11AZDtgiydmdF rDPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=WI5GKZ19Yu0N7J9QBD8wTdQ9KzDgFqOMJWqXdxz9nVg=; b=lXqckgtt4j5nC3CF0PQLZZyrmU+mTYhBMSBECf8xHD8UZgewbvT28WfmoQysrSlrEZ LRq+1lFbwz9fAFGVrUGVn6MOdxa0+JrYmtHhrkBYwmE/tSI+EsjNWYY9mLzd72wDnsXB LZT+Q48WFRXisBUfH6tNdSv47q5AZIELJgvddSD7J6GFoAg/rqOpD9kmDiyf02GcuKQr r/En9H6GC2QDjT1UJUhX/KwpEIpRYRdOCkaU6NTuzPqLl/dbwplmaqhOM/aQgFbsLsxo +FMctMJhJ36IG3OjoKv+iyeOgmKIN0fZeHxx6BNki06d6ePHu7kynt6iXxXciIRViaBe q9Bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@spin-digital-com.20210112.gappssmtp.com header.s=20210112 header.b="vUr/RFSR"; 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 gt44-20020a1709072dac00b007adf16570c3si30255638ejc.17.2023.01.03.05.41.42; Tue, 03 Jan 2023 05:41:43 -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=@spin-digital-com.20210112.gappssmtp.com header.s=20210112 header.b="vUr/RFSR"; 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 33D2D688127; Tue, 3 Jan 2023 15:41:39 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2730268037B for ; Tue, 3 Jan 2023 15:41:32 +0200 (EET) Received: by mail-ej1-f41.google.com with SMTP id x22so73610139ejs.11 for ; Tue, 03 Jan 2023 05:41:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spin-digital-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=AevMYjEJ/4G+CHQhVsxyghzGYfstbzkBAvkIc3RFTuM=; b=vUr/RFSRckkkt/SfKKpZUVB2GdE21bFsAwxiMWr2k0FI767a1DLY9mtUx+HypZqRi0 OhfxtnBUKrOeIgqU2oUr61jQd5nIpeiZ0BQpJuhAmUg68IQ8zShW64efMF+4TpI5U8rN 9BGb4I9r4ZJsEvFeCfvheh3flDtJS9jxg9YZMOguo8iLi6k3vXlOYtCsnnPrvynebzIF 48OJaxvdi1fLfUtab4/RXzp2F4mQ+aqGdIbuXV07kWn7sV+9WOYPxsG74MmPkkHiMpyO F96CoAgBkSlGcI4/soMI31gwp5lZpQYBYiQp94oC2vtPMf/5MAqlINV9pZ4CpbdvaPLT 5tVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AevMYjEJ/4G+CHQhVsxyghzGYfstbzkBAvkIc3RFTuM=; b=B+7izOLFhlnB1VFkVX09sozeCU5GKLLZ2YQaiSPF7214sFZbpilwfj01YTY2RGOtIL 2iV9D/049gCF7f6L/8DMtdJWvcYgq77hMhs3XwD3rOjkv6WCWKcy5LiVp3GPjPaM8jWE Aqa1KTHwMtbR5yW7NTVY5De9DmEQSRaXgzwd+fIN5C9fU8e80k5bqJUz/gZBtB1eGNHC XtJmaqFbxMMsyKWBeYQkeXq1tD5gV0UyL1eS6WMXyFTPwJ1UVuvOv2UsfyYuHa3cpaNl GEz5RQfjfRXsbruBh7o/uqTspgtXGL66fvr7FAba3b1pcPCTDVsqId4Yo7Gu2I66mxQL PRoA== X-Gm-Message-State: AFqh2kqPxtUB7eZG4xlxOlTNHeMqqrtDJu+jTQxgAZOWEek2KMHrVcjN gbAD6/nAHvCSnlXhsccIso57J8y2jNskA/ap X-Received: by 2002:a17:907:8d17:b0:7c1:1ada:5e1e with SMTP id tc23-20020a1709078d1700b007c11ada5e1emr35947982ejc.26.1672753291067; Tue, 03 Jan 2023 05:41:31 -0800 (PST) Received: from thomas-win.localdomain ([213.138.44.237]) by smtp.gmail.com with ESMTPSA id q26-20020a17090676da00b008302732f569sm14151095ejn.78.2023.01.03.05.41.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Jan 2023 05:41:30 -0800 (PST) From: Thomas Siedel To: ffmpeg-devel@ffmpeg.org Date: Tue, 3 Jan 2023 14:40:30 +0100 Message-Id: <20230103134040.41140-1-thomas.ff@spin-digital.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v5 00/10] Add support for H266/VVC 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: jXMjE2MltX5L This patch set adds H266/VVC support. This includes parsing, muxing, demuxing, decoding and encoding. Decoding is done using the external library VVdeC (https://github.com/fraunhoferhhi/vvdec.git) and can be enabled with --enable-libvvdec. Encoding is done using the external library VVenC (https://github.com/fraunhoferhhi/vvenc.git) and can be enabled with --enable-libvvenc. Changes since v4: General: - Add original author to patches 01-03 - Add co-author to patches 04 and 05 PATCH 02/10 configure / cbs_h266_syntax_template - bugfix: add cbs_h266, cbs_h266_select (moved from patch 03/10) - bugfix: parsing multilayer in cbs_h265_syntax_template PATCH 03/10 libavcodec/vvc_parser.c - bugfix: check startcode length (3 or 4 byte) to find correct frame end position PATCH 06/10 libavformat/movenc.c - merge movenc.c with upstream PATCH 07/10 libavcodec/libvvdec.c - bugfix: set correct avframe pts for decoded picture - bugfix: print additional info if decoding fails Nuo Mi (3): avcodec: add enum types for H266/VVC avcodec: add cbs for H266/VVC avcodec: add bitstream parser for H266/VVC Thomas Siedel (7): avcodec: add MP4 to annexb support for H266/VVC avformat: add demuxer and probe support for H266/VVC avformat: add muxer support for H266/VVC avcodec: add external decoder libvvdec for H266/VVC avcodec: add external encoder libvvenc for H266/VVC avformat: add ts stream types for H266/VVC avcodec: increase minor version for H266/VVC configure | 16 +- libavcodec/Makefile | 6 + libavcodec/allcodecs.c | 2 + libavcodec/bitstream_filters.c | 2 + libavcodec/cbs.c | 6 + libavcodec/cbs_h2645.c | 373 ++- libavcodec/cbs_h266.h | 791 +++++++ libavcodec/cbs_h266_syntax_template.c | 3096 +++++++++++++++++++++++++ libavcodec/cbs_internal.h | 1 + libavcodec/cbs_sei.c | 29 + libavcodec/h2645_parse.c | 71 +- libavcodec/h266_metadata_bsf.c | 146 ++ libavcodec/libvvdec.c | 548 +++++ libavcodec/libvvenc.c | 469 ++++ libavcodec/parsers.c | 1 + libavcodec/version.h | 2 +- libavcodec/vvc.h | 142 ++ libavcodec/vvc_mp4toannexb_bsf.c | 329 +++ libavcodec/vvc_paramset.c | 1005 ++++++++ libavcodec/vvc_paramset.h | 429 ++++ libavcodec/vvc_parse_extradata.c | 249 ++ libavcodec/vvc_parse_extradata.h | 36 + libavcodec/vvc_parser.c | 603 +++++ libavformat/Makefile | 8 +- libavformat/allformats.c | 2 + libavformat/demux.c | 7 +- libavformat/isom.c | 1 + libavformat/isom_tags.c | 3 + libavformat/mov.c | 6 + libavformat/movenc.c | 41 +- libavformat/mpeg.c | 3 + libavformat/mpeg.h | 1 + libavformat/mpegts.c | 2 + libavformat/mpegts.h | 1 + libavformat/mpegtsenc.c | 65 + libavformat/rawenc.c | 23 + libavformat/vvc.c | 984 ++++++++ libavformat/vvc.h | 99 + libavformat/vvcdec.c | 61 + 39 files changed, 9648 insertions(+), 11 deletions(-) create mode 100644 libavcodec/cbs_h266.h create mode 100644 libavcodec/cbs_h266_syntax_template.c create mode 100644 libavcodec/h266_metadata_bsf.c create mode 100644 libavcodec/libvvdec.c create mode 100644 libavcodec/libvvenc.c create mode 100644 libavcodec/vvc.h create mode 100644 libavcodec/vvc_mp4toannexb_bsf.c create mode 100644 libavcodec/vvc_paramset.c create mode 100644 libavcodec/vvc_paramset.h create mode 100644 libavcodec/vvc_parse_extradata.c create mode 100644 libavcodec/vvc_parse_extradata.h create mode 100644 libavcodec/vvc_parser.c create mode 100644 libavformat/vvc.c create mode 100644 libavformat/vvc.h create mode 100644 libavformat/vvcdec.c