From patchwork Sat Dec 4 01:09:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: quietvoid X-Patchwork-Id: 31954 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp1426549iog; Fri, 3 Dec 2021 17:09:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJwarMjBia6qPpBfo/zqDCa9hUAiJ96raT8vl0FxlxVh8CymS1IlzktEXEysm4nZvNGKOdO4 X-Received: by 2002:a17:907:216e:: with SMTP id rl14mr26533695ejb.368.1638580168507; Fri, 03 Dec 2021 17:09:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638580168; cv=none; d=google.com; s=arc-20160816; b=DcJaLqtAUX/mdohJSjI6KcVWbRrDQXDBJtVp84SE9gC/uL8cZ75S+MEwZnd2xNcE+1 YBcUZiHHPLsRiG0oybpedEimWBkpaas7K+fV5wa4ZYj37BcQ1geBO4kEf8jj1mgUjR1C cHNfO1Xn4/NCwDS3e1TK8F1We0cf8n1sjlLRyicf9L5XN2c5OIhEwNh9yrZGLvlqBoHZ KFwJr+E1kDQT1oJJNFHUbjdUaZZMoGnFLDDipr6mQf/9ipWYUZ9g1ETrmdQuZlfY9yDe u2hYyTtYS4oQyKt2l5PX6VlVTG487uD0nwvsnbBxTwvwIpmzt0Y9eUqgE9M7RtTlo67e IS9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc: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=Xv/XirjJthyxOdvbTyYl2VK7MKJxJ8rGiaehK/K2tX8=; b=Hqu17TgPEDc/u0zHXpPcdg//zg8+uHt8nGDyUAUtSHwv24FLubH1FYN8/qa1K3/Ar0 H6Hj9J4bRDjPKtVoCs61en0DuWxQSgIoWZKSVBl4msGCGQ0TkiRLX/y/EPuvGgSXejzh mbC+1AC8JdnhjMUSqUnJqDA++/2M04e5XyrQ6HgULEFqjWSMgNPsIb0Ia/83me+5UKYO wCFezT2h3COC8C3c1JW41myFeWwQCiFkWMcEhgpTmsBI8k7pUdCpEIj5UI8zERoDaz3t lPxJ/7Tq4cEjNEg5fzIaSzYngFv2x/iH6qgWniFYpJ5u6y4I9vF38G+sCRcLZJHEcV/L 0jtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=mL2XLLlo; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id eb6si9380393edb.584.2021.12.03.17.09.27; Fri, 03 Dec 2021 17:09:28 -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=@gmail.com header.s=20210112 header.b=mL2XLLlo; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BB77468AAA0; Sat, 4 Dec 2021 03:09:23 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8191F68996A for ; Sat, 4 Dec 2021 03:09:17 +0200 (EET) Received: by mail-wm1-f50.google.com with SMTP id k37-20020a05600c1ca500b00330cb84834fso6212356wms.2 for ; Fri, 03 Dec 2021 17:09:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nP2+eibFHCuV8hNP40HqxdBisbf7Z0tVVDsu6Ewgk/M=; b=mL2XLLloEot9t/zXi/2C5u2EyiAQH4m9ym5Yi9MD9DQcexEZdgbRc/VH8qXgT3wmLX tvclRK9mGFhIcUb5llE6kLpleLYo+Uu6b7UJH/BKj0+G3yLdlRxGeakAwKneRGV09ZcN ynbjh8KSRT+icRJcz/zMqPq92142kD0clXXkNQ79eF0HuCko+qxwIbqPktKAgTvCmawZ rVtjAKOyzs0kDxzgHagr90Tofz5x6y9rj/z80o6lsR5It+m6yXvPNzWVjQWqwIiPh8LQ CKt6DsefsQs5S9VHWliMnImOhkey70Wz7nO9KqIy1jVpGjmVc4soCGLsUQgnZeaQ3fEA hs4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nP2+eibFHCuV8hNP40HqxdBisbf7Z0tVVDsu6Ewgk/M=; b=ZaAWv+taQTjLvTFDacq01FbT+L342SOJDuPD4oiW25qHR4B8u9SSapaskSuCo40bw6 Ib0O5NsG1Gtsd+aWvwCY6VpwsUn1oCEWkusDdsWRZe9JMP6QzeP+oIxKwM9IzrovgeMw tOtzkwY1L6aHJNR02xlXYrrSb/XBA2lyXyLmY3CR5GQj2mpMBZDl3xlHVNiNvE6huvSO AngDKmGDEs3uAJVlTfwW5yo/Woep7py6K0gYyg0Ax+mlKyliuEaqFtK209cdi7tatyNN oDzIV/sEUCFWl5u2IRTwoPCJr7y+arjFLx+82iWd99HlkS/7YBHgMfIlTEotGtPf1WpJ YLtQ== X-Gm-Message-State: AOAM532ziWbEdpqYQC2TjI2cKkOSd3ogJvqMHato/oPYYlUBU85WLfEQ STPgdObNiOf2EXWwE+DJZfv3Q9VbQho= X-Received: by 2002:a05:600c:4f14:: with SMTP id l20mr19073859wmq.164.1638580156763; Fri, 03 Dec 2021 17:09:16 -0800 (PST) Received: from localhost.localdomain ([2a01:4f8:162:73cc::2]) by smtp.gmail.com with ESMTPSA id d8sm3873739wrm.76.2021.12.03.17.09.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Dec 2021 17:09:16 -0800 (PST) From: quietvoid X-Google-Original-From: quietvoid To: ffmpeg-devel@ffmpeg.org Date: Sat, 4 Dec 2021 02:09:00 +0100 Message-Id: <20211204010905.2258652-1-tcChlisop0@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v8 0/5] Add support for Matroska BlockAdditionMapping elements 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: quietvoid Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: TmdGnDwOHuam This patch set adds support for reading/writing the Matroska BlockAdditionMapping elements, as well as for reading/writing dvcC/dvvC blocks in Matroska. Created utility functions to read/write Dolby Vision boxes for ISOM. This was done to avoid duplicating the code, as the Matroska blocks and MOV boxes follow the same specification, defined by Dolby. Refactored the reading/writing in mov/movenc to use the new dovi_isom functions. v7: https://ffmpeg.org/pipermail/ffmpeg-devel/2021-October/287388.html Changes since v7: - Added original author of the ff_isom_parse_dvcc_dvvc implementation in the file header. - Added tests for reading/writing block addition mapping elements. quietvoid (5): avformat/dovi_isom: Implement Dolby Vision configuration parsing/writing avformat/matroska{dec, enc}: Parse BlockAdditionMapping elements avformat/mov: Refactor mov_read_dvcc_dvvc to use ff_isom_parse_dvcc_dvvc avformat/movenc: Refactor mov_write_dvcc_dvvc_tag to use ff_isom_put_dvcc_dvvc fate/matroska: Add tests for reading/writing BlockAdditionMapping elements libavformat/Makefile | 4 +- libavformat/dovi_isom.c | 123 ++++++++++ libavformat/dovi_isom.h | 35 +++ libavformat/matroska.h | 9 + libavformat/matroskadec.c | 58 ++++- libavformat/matroskaenc.c | 45 ++++ libavformat/mov.c | 50 +---- libavformat/movenc.c | 26 +-- tests/fate/matroska.mak | 9 + tests/ref/fate/matroska-dovi-config-profile5 | 13 ++ tests/ref/fate/matroska-dovi-write-config | 223 +++++++++++++++++++ 11 files changed, 533 insertions(+), 62 deletions(-) create mode 100644 libavformat/dovi_isom.c create mode 100644 libavformat/dovi_isom.h create mode 100644 tests/ref/fate/matroska-dovi-config-profile5 create mode 100644 tests/ref/fate/matroska-dovi-write-config