From patchwork Tue Jun 18 19:35:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 35144 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:9196:0:b0:460:55fa:d5ed with SMTP id s22csp2779983vqg; Tue, 18 Jun 2024 12:42:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX+TVKQxzcU7SYOAvgDEspfzDVDD8jgY4Fpt1LJks5TINtf/JtywrW5T4XYHWUCkIGt1isOeoBGH8lTkMdFMA78GAgN5WtcRBG+yw== X-Google-Smtp-Source: AGHT+IGUdB6V2qlaYjNlx8Qt2lQWI/gtkmshDykwb7Xao2WgwpKTcbm38l8PEr0+0WbkrtRnG+l0 X-Received: by 2002:a17:906:f29a:b0:a6e:f3d7:3de6 with SMTP id a640c23a62f3a-a6fab62bd72mr30492766b.20.1718739755602; Tue, 18 Jun 2024 12:42:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718739755; cv=none; d=google.com; s=arc-20160816; b=AfUVckhUrzNPHuWlJ4P/1xIcsNIPvFIY/Pw0nosiU1YQdtzAR1kgvgHz2n4HMg8v0F Q8dBOv5kbrZIHQY6qHShGpqQdXoDFyzs6bN1k8HgTH6ZB1xuinIdNblRd5aSPVkeUEMI 7Y3DlgNgKNxqGK2ayETr5kMsxuqnlJLiiI1ek/Xyzb7WpYv/zvioB4bZDNXg5UBpF/OL gi5mXySTkiQmKCKpAOtVr4iDuzji1RsMGkWYaCNtR8a7aAKscI00F5+mbWR2vaSQ827Y 53MxWXKpl8P1YPBgbCThIWRSPbt3rgWgvOY3g2nGD7+AzE8FeVnIy0EZ9GiX7Z2C4d3o S0PA== 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=lX8DF7r8E4Ff8PpEv0j3jjwg+1LtPpetHohwlI6TFQY=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=dPYJ5KbM9jahasXuhkV//WIY5kIvUekclOVYUaPAfrMBwuHI3Vw67erRmp0RPptoAE YT8c9vkirvwM7nvqL9hRIvHJgLCa6fBpZCg/KIoCGOGumYbS/nMLR0pBbWPJjKOvROJb nKsl3db/FBlGaqxpX+o2njsf93CrmGOcn1SQpqQHLHldAgf6v3rJOsVAVPJskZW05DD5 3MFc9WfmYKnGNt7rPNyCXSwnxUeiNXSanDD0PdfLlENdxyWduoXzvU7+bXIxmatmD5Zu SSHuD0UxGNi6MyOBheeCb8xbUs9V0nuKBUeXkjxsCLEeqn2YktcBdsouBDOmuUCAEImC 9kIg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b="XEgNCn4/"; 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 a640c23a62f3a-a6f56df5086si543291266b.498.2024.06.18.12.42.34; Tue, 18 Jun 2024 12:42:35 -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; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b="XEgNCn4/"; 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 C549B68D61A; Tue, 18 Jun 2024 22:42:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9535068D42E for ; Tue, 18 Jun 2024 22:42:23 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1718739743; bh=79R1CfNEytHSlBzuT1gI/hTUN9UgMg19V3zT88AcAZI=; h=From:To:Subject:Date:From; b=XEgNCn4/Dy1oM44EI+2um0w1TlpBGB3x6TiuUbDH+6vJexRvkUEDq2K1VQS8vJ/Th EQUWF9vYmv6Osv+KWniZQbxrnAjsS61url/yD41K4yw4Q1m9lP7bG6AkqQN+6QT/08 TAmnO5lpH7/GFEIO2P6TFzx1ad+icr+UtP4Y0Ml4= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 4819C403F0 for ; Tue, 18 Jun 2024 21:42:23 +0200 (CEST) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Tue, 18 Jun 2024 21:35:30 +0200 Message-ID: <20240618194221.26073-1-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.45.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 0/8] DoVi metadata compression 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: kj7QdIUYH/v5 Moves metadata compression out of the codecs and into a bitstream filter. This is required by design, because keyframes must have compression disabled (for obvious reasons). Therefore, we _must_ generate the dolby vision RPUs after encoding. The downside of this approach is that it requires "redundantly" encoding + decoding RPUs in between the codec and the bsf. However, the tradeoff is that it allows us to also strip/modify DV metadata when not transcoding (-c:v copy). Such a feature has a legitimate use case, as it allows enabling/disabling Dolby Vision compression on existing streams (to e.g. minimize size, or to maximize compatibility). If we wanted to avoid this overhead, we could hypothetically introduce a new packet side data type for dolby vision metadata, and have the codec merely copy the frame side data to the packet. But I am somewhat unwilling to add yet more packet side data types that are aliases of frame side data types, and I don't think the overhead is significant.