From patchwork Thu Jul 18 10:54:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 50624 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:2011:b0:482:c625:d099 with SMTP id fe17csp297450vqb; Thu, 18 Jul 2024 04:01:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVMniHVmc9Pq7Zlh761S+b657ZIjbvauryEdD3KOEHNmTneTXbeu7DqM5p1NJqM1Jt4jvqDV3pRPGLNOf5y2AD1F9v43HBv2cGKJQ== X-Google-Smtp-Source: AGHT+IEidjiwpYgN5rtPSH5+7WDTf9qxb1TrTGjyzqPfmUkz2o4FQyFssxnFVkpGb6a9g4dCGrU9 X-Received: by 2002:a17:906:a387:b0:a77:f2c5:84b7 with SMTP id a640c23a62f3a-a7a01131319mr338678566b.5.1721300509917; Thu, 18 Jul 2024 04:01:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721300509; cv=none; d=google.com; s=arc-20160816; b=wX2j10MAoVhuKYREviJrNJvdnvcLFWif8Gx8JnBvKgTLD/MfvE4URpsG5E4LWVWgGJ 2i6hD+qgNP8vOEWVBto3vx3SyLhgTBhaeW2fABN0cSxQIXr5Y++LkKDuO7Kej1ZuCfDJ 0/cKTGSjeYIIv5lG14EmezkHZWF9YJ7bHPjd2pdTBIMYMQqrz/a6hY4N82y/RperAe1o SxLNkrX572/hDN2QLQaj44Q+oeWTg0PVCQKbbnOPrGZO2wbaYB/N/R6kMPFjaxTznX4+ mcMztYGnbVphleEP0XH0upgf/un3w1uZ/UL3AN7ldW+8ewOsOSGj4WEZAj/OaQxiP1ru KTxw== 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=AJbRuKM/XywHTMrGJ+dAwrvm5QLiIDifp7vr6dVkQd4=; fh=xmAeKtysnShNOmkhiJmYkS30uw4Fu2hvBJ7qlIwukxQ=; b=LEsQSwfVar4cmKj/dL8PpSwqOWG9lxsqrbIa8osk8FUv7pZr02yHXjajOLtJLLUijH 6lUC8IfBhzqGnc8s8JPj9hEQTSZkhXz0I5ChR9UInaH4eKPR40ibyz0aB43x9o9gw9H+ HIZw3aqr0SUD8GZ3E5DbbmRd5yU9kNiWAqNCBFduKeBjnZqn8CQNHxv2jw12QUixoQYu LeCwu+9zS3P9u01OCPswlQh0S3ah+nBTL2Lp7lNgVnNQue9VJVOoPJq+PEWjyYE2JO/c eTfWhHzSSHdsQTbSEBDJopA60UdEGOheMaBoZi/gt9Qpo1vjUDpDWb93YsSF0FtmtPka 9SEA==; 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=fJVia6SB; 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-a79bc8283bdsi617359866b.993.2024.07.18.04.01.49; Thu, 18 Jul 2024 04:01:49 -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=fJVia6SB; 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 A7A3A68DAF8; Thu, 18 Jul 2024 13:55:11 +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 7797D68DA0B for ; Thu, 18 Jul 2024 13:55:05 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1721300105; bh=UZltaUdesu+f/xZ4clBZH6fOPftsPI2A12yEYAYV/nk=; h=From:To:Cc:Subject:Date:From; b=fJVia6SBlYNg6eFekErY5SqAAdilobbF26XN3iP+d/wIyDM24KWOBElU+LZIQsMG8 NfQHir1lXFKm51YsReMrvcvwbsLSrBa2yy2bWC/mMUdit4ov0RGTZBGsBgZioFJ6jQ xOWyaDXdJbwa6tv/JoqLweUyuamLlebBHXCFtpY8= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 4C67E4145F; Thu, 18 Jul 2024 12:55:05 +0200 (CEST) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Thu, 18 Jul 2024 12:54:58 +0200 Message-ID: <20240718105502.232604-1-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 1/5] avutil/dovi_meta: add dv_md_compression to cfg record 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: Niklas Haas Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: GdRzu52JhAOl From: Niklas Haas This field is used to signal the compression method in use. --- doc/APIchanges | 3 +++ libavutil/dovi_meta.h | 9 +++++++++ libavutil/version.h | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index 5751216b24..80ab3012c3 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07 API changes, most recent first: +2024-07-16 - xxxxxxxxxx - lavu 59.29.100 - dovi_meta.h + Add AVDOVIDecoderConfigurationRecord.dv_md_compression. + 2024-07-xx - xxxxxxxxxx - lavf 61 - avformat.h Deprecate avformat_transfer_internal_stream_timing_info() and av_stream_get_codec_timebase() without replacement. diff --git a/libavutil/dovi_meta.h b/libavutil/dovi_meta.h index e168075a24..c942d0e133 100644 --- a/libavutil/dovi_meta.h +++ b/libavutil/dovi_meta.h @@ -46,6 +46,7 @@ * uint8_t el_present_flag * uint8_t bl_present_flag * uint8_t dv_bl_signal_compatibility_id + * uint8_t dv_md_compression, the compression method in use * @endcode * * @note The struct must be allocated with av_dovi_alloc() and @@ -60,8 +61,16 @@ typedef struct AVDOVIDecoderConfigurationRecord { uint8_t el_present_flag; uint8_t bl_present_flag; uint8_t dv_bl_signal_compatibility_id; + uint8_t dv_md_compression; } AVDOVIDecoderConfigurationRecord; +enum AVDOVICompression { + AV_DOVI_COMPRESSION_NONE = 0, + AV_DOVI_COMPRESSION_LIMITED = 1, + AV_DOVI_COMPRESSION_RESERVED = 2, + AV_DOVI_COMPRESSION_EXTENDED = 3, +}; + /** * Allocate a AVDOVIDecoderConfigurationRecord structure and initialize its * fields to default values. diff --git a/libavutil/version.h b/libavutil/version.h index 814892a4d5..852eeef1d6 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -79,7 +79,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 59 -#define LIBAVUTIL_VERSION_MINOR 28 +#define LIBAVUTIL_VERSION_MINOR 29 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ From patchwork Thu Jul 18 10:54:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 50623 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:2011:b0:482:c625:d099 with SMTP id fe17csp294829vqb; Thu, 18 Jul 2024 03:55:23 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV6zK8faHwiOrU+mqQZWc8yzET8IN3vtCE35kTNbcs5Usq7mWxqNAKNu/nTaWoQ4CU9axt91F00OaBh9o5J/J1vBcIQ7RJfNmkJlg== X-Google-Smtp-Source: AGHT+IFb1g3Xu8wz7/6UGIdYu/9dWARUkp9QkvmcCkdQOwJsyWz/2dg13V8EO0j1cR6PYk4mLdD7 X-Received: by 2002:a17:906:2849:b0:a72:685b:7c98 with SMTP id a640c23a62f3a-a7a0119e3efmr333711166b.37.1721300122939; Thu, 18 Jul 2024 03:55:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721300122; cv=none; d=google.com; s=arc-20160816; b=vYL81fS+6wolKDstTxPoycGbPM9JPOax+iJ7WX1NobKsgH/rOS2L3GweIVKwfJpRd3 YqHRsOtUWq3DHRndaSTKSxKzPVhOCUdw01V/wximM2v19lncTy5Z3BtzfflMiH6vDu93 xq2lpbgrE/pH/R6iuSpYpYWQ90uJGdwPx5yIxwdua4xWjvC+TPahvQvXV7VhOlGADo7a jFfW9q2XGTJa9Iy/V8pAR6SiGr5Rkw2HUVNpeNefgTXC/WShHjIQoarZFTv2rAiVOWHd xWfl8iKo0d1KRYU9fiODX48zrzP3Q4P+huNzBKmjn7fGZ8kgIztxp3DnY+y1XmhFN51V HWZQ== 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:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=YMTzNY3023L1gRnCGnWdx9rJ1gV8Cjmq/1UHllFGKE4=; fh=xmAeKtysnShNOmkhiJmYkS30uw4Fu2hvBJ7qlIwukxQ=; b=WZDRIdqOCliQGAxBFkEETtaRNBip20xqyxdAUlG9QpjbMJvvngIYzR7TK+fk6mHipM +y5IcWEkcRywC0V/6DztXWj944z8FoebQnthbelpBEwIY5HeHvxRYLQeBMCJs9xBPGXl fJx4uYU+0LX5so0GJKj9s5bT168O1AhULs4v1IG2gprCVFt5csN264phl5bDv0oafBAw BZSEpaXKPjp7ocUkPe2bpUw0I39ROUDxRq1fnaOls7V6Q4ZcDOBtUriLnpHlv3/czsWH GDaIIOvhlBX1VzIae6aaPMdg0TcGi7Qwe5l7Yn0hZUwDTOJZ7CRC6xQosZtjJ0oEscIh 8/wQ==; 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=P9xoTDQF; 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-a79bc58b173si624429666b.181.2024.07.18.03.55.22; Thu, 18 Jul 2024 03:55:22 -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=P9xoTDQF; 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 AC3EC68DB05; Thu, 18 Jul 2024 13:55:12 +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 BB8A568DA0B for ; Thu, 18 Jul 2024 13:55:05 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1721300105; bh=4L+kS2PE4yNx67/nGhtpx6S/yoHUXDP6CWFesTiH9co=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P9xoTDQFJkQO1mImQRDHTEphaEfZMSf0lUevp4ZtYJ+s2WRzVCds4p/rIYdl43I0D lgtiVjH8u3tC7k9CGWk8pTSJdoV6KOurt0HQLZKK3o8W5h3ie5G8kN67Wb/C2T7Tj3 tgMJnq+o/fmCE7XmD638txUaPjtcWFQ1whZEkIM0= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 838AF41818; Thu, 18 Jul 2024 12:55:05 +0200 (CEST) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Thu, 18 Jul 2024 12:54:59 +0200 Message-ID: <20240718105502.232604-2-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240718105502.232604-1-ffmpeg@haasn.xyz> References: <20240718105502.232604-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 2/5] avformat/dovi_isom: implement dv_md_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 Cc: Niklas Haas Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 53G/b2gCFcrk From: Niklas Haas --- libavformat/dovi_isom.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/libavformat/dovi_isom.c b/libavformat/dovi_isom.c index d49aa5a75f..269374cff9 100644 --- a/libavformat/dovi_isom.c +++ b/libavformat/dovi_isom.c @@ -57,11 +57,14 @@ int ff_isom_parse_dvcc_dvvc(void *logctx, AVStream *st, // Has enough remaining data if (size >= 5) { - dovi->dv_bl_signal_compatibility_id = ((*buf_ptr++) >> 4) & 0x0f; // 4 bits + uint8_t buf = *buf_ptr++; + dovi->dv_bl_signal_compatibility_id = (buf >> 4) & 0x0f; // 4 bits + dovi->dv_md_compression = (buf >> 2) & 0x03; // 2 bits } else { // 0 stands for None // Dolby Vision V1.2.93 profiles and levels dovi->dv_bl_signal_compatibility_id = 0; + dovi->dv_md_compression = AV_DOVI_COMPRESSION_NONE; } if (!av_packet_side_data_add(&st->codecpar->coded_side_data, &st->codecpar->nb_coded_side_data, @@ -71,13 +74,14 @@ int ff_isom_parse_dvcc_dvvc(void *logctx, AVStream *st, } av_log(logctx, AV_LOG_TRACE, "DOVI in dvcC/dvvC/dvwC box, version: %d.%d, profile: %d, level: %d, " - "rpu flag: %d, el flag: %d, bl flag: %d, compatibility id: %d\n", + "rpu flag: %d, el flag: %d, bl flag: %d, compatibility id: %d, compression: %d\n", dovi->dv_version_major, dovi->dv_version_minor, dovi->dv_profile, dovi->dv_level, dovi->rpu_present_flag, dovi->el_present_flag, dovi->bl_present_flag, - dovi->dv_bl_signal_compatibility_id); + dovi->dv_bl_signal_compatibility_id, + dovi->dv_md_compression); return 0; } @@ -97,8 +101,9 @@ void ff_isom_put_dvcc_dvvc(void *logctx, uint8_t out[ISOM_DVCC_DVVC_SIZE], put_bits(&pb, 1, !!dovi->el_present_flag); put_bits(&pb, 1, !!dovi->bl_present_flag); put_bits(&pb, 4, dovi->dv_bl_signal_compatibility_id & 0x0f); + put_bits(&pb, 2, dovi->dv_md_compression & 0x03); - put_bits(&pb, 28, 0); /* reserved */ + put_bits(&pb, 26, 0); /* reserved */ put_bits32(&pb, 0); /* reserved */ put_bits32(&pb, 0); /* reserved */ put_bits32(&pb, 0); /* reserved */ @@ -108,12 +113,14 @@ void ff_isom_put_dvcc_dvvc(void *logctx, uint8_t out[ISOM_DVCC_DVVC_SIZE], av_log(logctx, AV_LOG_DEBUG, "DOVI in %s box, version: %d.%d, profile: %d, level: %d, " - "rpu flag: %d, el flag: %d, bl flag: %d, compatibility id: %d\n", + "rpu flag: %d, el flag: %d, bl flag: %d, compatibility id: %d, " + "compression: %d\n", dovi->dv_profile > 10 ? "dvwC" : (dovi->dv_profile > 7 ? "dvvC" : "dvcC"), dovi->dv_version_major, dovi->dv_version_minor, dovi->dv_profile, dovi->dv_level, dovi->rpu_present_flag, dovi->el_present_flag, dovi->bl_present_flag, - dovi->dv_bl_signal_compatibility_id); + dovi->dv_bl_signal_compatibility_id, + dovi->dv_md_compression); } From patchwork Thu Jul 18 10:55:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 50627 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:2011:b0:482:c625:d099 with SMTP id fe17csp303138vqb; Thu, 18 Jul 2024 04:11:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUUcdELx5fUydvSJBZg/x26PDSCiS0Vbmd6TDi06effwbEqOAVMEPVog2QcF/RA0+uGNLFY9FVQJy3y+p2PctS1QH2bvob+QAtIlA== X-Google-Smtp-Source: AGHT+IEEL/qBBICmA93ENbtGvWtUQjBgY+uk65Zx16EzLlmIs0gXXvoAK2Yi7KRTxmjcqDD1Upf/ X-Received: by 2002:a17:906:8308:b0:a77:d1ea:ab26 with SMTP id a640c23a62f3a-a7a013535e0mr311248566b.65.1721301107943; Thu, 18 Jul 2024 04:11:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721301107; cv=none; d=google.com; s=arc-20160816; b=oLUpaWURo1x9p0SWdHEQIHE2qw24QWK80Pk3pRXRQ1u/QkLOEMv21ObY1f54sruO7+ BtVnEHMQ6D9l4UVkhY1zLbsLHBt2cuE57kv9aGTLPMYvjUSCKD1TWH25dZWPXYDCxrWj 35w5f4Xw3Pc984mHWuMV37HqrbaXRRHeOwKxPaSDR1TWd5nlf25LLsDUgxp5tImU6Ugq I+v1AFvkEKTiRtwpeXfiGy4AxgMxaL98/YuzsEOA7onRY0Vp77N2Uoae5gkdIWTW7Z2O T0GBnd/5b+Lm7VUuclwTttkMOAVPgu5n5X8Rde4ZS/N2HtJD0jez5pO079ZA4bRoLP2L DmFA== 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:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=SZ4cAgqWMN1MDSeUGHg8mpLX7sFsxjWRQzd+oPZGrH0=; fh=xmAeKtysnShNOmkhiJmYkS30uw4Fu2hvBJ7qlIwukxQ=; b=ZYyLDLVOFtTM21Ljtg7h2d6b+GVfOtCaYULQGWHhIWCsJFCAmBUbadNaMFixqMtKXk peJ/5B9zpsY+u8xvwLykinB3r8kVyrooF9I924wKsz3ukK6qhIrlm72sAv8hP+Te9xfx Katmj7vk2on6jiY+gT4MmgN9lXIKEIbymgZWjgYGqfaT4kZT3fX6iaRDqoXIru554vTe HAEBTeDzngpMaT/EVfPDsSQqfEUCfygOOZu11Ub+4IV09adHRbVaD6OWIpfDPLZ4T3Sf Ava5mYC0xXIINIWmx2XECOoNr8TDOudxWNJ1Vkol1lyMokoiFKiOFJwR3yYzmau7QxAy m/AA==; 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=kwMGpXma; 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-a79bc806b45si589456566b.784.2024.07.18.04.11.47; Thu, 18 Jul 2024 04:11:47 -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=kwMGpXma; 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 B48E368DB0F; Thu, 18 Jul 2024 13:55:13 +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 EE53B68DA0B for ; Thu, 18 Jul 2024 13:55:05 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1721300105; bh=UZyx2HoIJbHtU2mcZTzEx31DoebnHNA2taMmoGLSmI8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kwMGpXmaECOanHNjda8hM8AHZuR97HbtIbpm5Yf4JCu1Bc+CV9mSJVXGEKg7zySmm akS4qCk2MZH/atvw0KaivkaPYl6updnKNLaR9Vo2zklEiD3EopiteJX3uT8HX6QvA9 bw+ioREmlCkE+ndRSb4Yh9iALUiZL0LQSVkA3uDU= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id B842041EF4; Thu, 18 Jul 2024 12:55:05 +0200 (CEST) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Thu, 18 Jul 2024 12:55:00 +0200 Message-ID: <20240718105502.232604-3-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240718105502.232604-1-ffmpeg@haasn.xyz> References: <20240718105502.232604-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 3/5] avformat/mpegts: implement dv_md_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 Cc: Niklas Haas Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: WJn5UA1BHQg/ From: Niklas Haas --- libavformat/mpegts.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index c66a1ea6ed..6b02187eb1 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -2213,10 +2213,12 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type if (desc_end - *pp >= 1) { // 8 bits buf = get8(pp, desc_end); dovi->dv_bl_signal_compatibility_id = (buf >> 4) & 0x0f; // 4 bits + dovi->dv_md_compression = (buf >> 2) & 0x03; // 2 bits } else { // 0 stands for None // Dolby Vision V1.2.93 profiles and levels dovi->dv_bl_signal_compatibility_id = 0; + dovi->dv_md_compression = AV_DOVI_COMPRESSION_NONE; } if (!av_packet_side_data_add(&st->codecpar->coded_side_data, @@ -2228,14 +2230,16 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type } av_log(fc, AV_LOG_TRACE, "DOVI, version: %d.%d, profile: %d, level: %d, " - "rpu flag: %d, el flag: %d, bl flag: %d, dependency_pid: %d, compatibility id: %d\n", + "rpu flag: %d, el flag: %d, bl flag: %d, dependency_pid: %d, " + "compatibility id: %d, compression: %d\n", dovi->dv_version_major, dovi->dv_version_minor, dovi->dv_profile, dovi->dv_level, dovi->rpu_present_flag, dovi->el_present_flag, dovi->bl_present_flag, dependency_pid, - dovi->dv_bl_signal_compatibility_id); + dovi->dv_bl_signal_compatibility_id, + dovi->dv_md_compression); } break; default: From patchwork Thu Jul 18 10:55:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 50625 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:2011:b0:482:c625:d099 with SMTP id fe17csp297458vqb; Thu, 18 Jul 2024 04:01:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXUIK02pzU3ylu+732de1F9NELIEUaprBExYi/bmCprHK3IpfuSOX1jHxFbbPSPb250XqK9iT8pM4vWI85cwLIq0nX9RT6IFtEILQ== X-Google-Smtp-Source: AGHT+IHuSREupIEuj/s9rfD6wI0XXxzboS9JQUHKaPucR2gtRCHZD7MKRz0YYprqNdt0vNEgJU6i X-Received: by 2002:a50:ab16:0:b0:57d:5442:a709 with SMTP id 4fb4d7f45d1cf-5a1529904f7mr2652755a12.0.1721300510705; Thu, 18 Jul 2024 04:01:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721300510; cv=none; d=google.com; s=arc-20160816; b=xTii7f1C8QERF5l48SIRyuot9ifvmaqdFYGTNfeTyJtNaLaAeZ2pt9Y40S8C1QkRN+ YsQbYdI9APE17QBK1z9fdDC88D8dqdCmvs7wB1I59AlajP3KhVAk8TWzruUVLxT3ABql Od6TN5pT8uQI8aAI2X6wfQc9s0gthwiTekih78joT/NQEqzBsJRf6vOhvmie+sCuNsmo zL9J4OcjlQFLE6QucEdXnFfAzMuuYTZTheMv72VBLVEcwNusHnrQx4LDbSa1JOgrGdYp kLW9WIbzfddYE3tfqf/IXRyk+dJ2NedZh1pFoMLVwB3pKlcPukoIzAWrWbZ0NSbsTGVr sN5w== 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:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=uirVCrvVFiI8wAmNMX5qGvxw6CR+poRpcMqc35J1xUw=; fh=xmAeKtysnShNOmkhiJmYkS30uw4Fu2hvBJ7qlIwukxQ=; b=bvmvzyoIhuYvccRoR4j7LNeZmWZRcvHnZ9Fqkqos/kma4U2SgTVv3NYAaa8e38oxIb 5fTh1+cbaRLKJg8rd8NRwWP1WFgDhubMhZVKllVNZx2U1SahfJxaeEQ4RbiPMkk2YmQQ 6qefyQTrpL/u7WvyNn8Xu8IYIa0CHL5ni7RTMNutCce+5CCVC4dgUh/8TffqAt7q3yxl d07hXR/lqK6xcZOyPo0srFN1KOh2i80QqCK6DB2J0ahi+IDej7e4llgxMRGoHcOHez9z YGITXpNn11HvqOXjskoBk/poTfxMzw1sRW7Yms4XRM8TucS60meRLzwEcAoPqnOX0jzm fgsA==; 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=F9wNb6wg; 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 4fb4d7f45d1cf-59b26a8dd9esi6285905a12.287.2024.07.18.04.01.50; Thu, 18 Jul 2024 04:01:50 -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=F9wNb6wg; 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 C497F68DB0D; Thu, 18 Jul 2024 13:55:14 +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 31FE968DADD for ; Thu, 18 Jul 2024 13:55:06 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1721300106; bh=r2Lzc3D54e+rgETASyz5XOfcp2FnAeyDK6YKKYL7qNU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F9wNb6wgBN3YLNprdHhX0PobCv0lVmZs28LQp/BUtBOe6Ie0IMeJVkabj2tfm8z0f NuHuDUvPipQ3QqJ3mOScgKHg8VGoD8oZa/NCGtCa2MlSpgYpjNJUBvwNFveYwEYRqd vdCet4caB/sW6St/aOSR7tRdbzxR9tJMGOc6hgGc= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id ECB3041EF9; Thu, 18 Jul 2024 12:55:05 +0200 (CEST) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Thu, 18 Jul 2024 12:55:01 +0200 Message-ID: <20240718105502.232604-4-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240718105502.232604-1-ffmpeg@haasn.xyz> References: <20240718105502.232604-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 4/5] avformat/dump: implement dv_md_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 Cc: Niklas Haas Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: eG9+nGT7dcNm From: Niklas Haas --- libavformat/dump.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/dump.c b/libavformat/dump.c index 78b2481d90..5e1f367742 100644 --- a/libavformat/dump.c +++ b/libavformat/dump.c @@ -416,13 +416,15 @@ static void dump_dovi_conf(void *ctx, const AVPacketSideData *sd, (const AVDOVIDecoderConfigurationRecord *)sd->data; av_log(ctx, log_level, "version: %d.%d, profile: %d, level: %d, " - "rpu flag: %d, el flag: %d, bl flag: %d, compatibility id: %d", + "rpu flag: %d, el flag: %d, bl flag: %d, compatibility id: %d, " + "compression: %d", dovi->dv_version_major, dovi->dv_version_minor, dovi->dv_profile, dovi->dv_level, dovi->rpu_present_flag, dovi->el_present_flag, dovi->bl_present_flag, - dovi->dv_bl_signal_compatibility_id); + dovi->dv_bl_signal_compatibility_id, + dovi->dv_md_compression); } static void dump_s12m_timecode(void *ctx, const AVStream *st, const AVPacketSideData *sd, From patchwork Thu Jul 18 10:55:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 50628 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:2011:b0:482:c625:d099 with SMTP id fe17csp313201vqb; Thu, 18 Jul 2024 04:31:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXEAR0IIZNXpoEc3i0sF831aRqA/LcrJGrkytIdFGa7BubFkTwOcJ0+r475xs3zhINJ+ZxNlBd4IdEcOZ2JMYAj0uUgkU/U2Ufa1Q== X-Google-Smtp-Source: AGHT+IHt/nBG94sxd9U8CmEyX3tyWl9a6ppf7uToZJU6C24BGf1l9unyRr5YpbUYqku3VCcHPkvI X-Received: by 2002:a2e:8750:0:b0:2ee:dae6:6cda with SMTP id 38308e7fff4ca-2ef05d42e74mr15168041fa.43.1721302310082; Thu, 18 Jul 2024 04:31:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721302310; cv=none; d=google.com; s=arc-20160816; b=T/THKgm8GjfPnlgbJqBM+4tw706jAzm01pNRNneyFCYE3n+0eYc0zxyJU627WCAf5C aj4EArCWY1dPcWmMAtnNX3dF16bX890L3re3ogoGwg5I4RTXoX90ZyFlr0bXC41fdXdO NoD+ks1XGL3QwAoCGb3dP9BUnw+Y9cg6cOQBQz1EucqAnYbXdfcg31cMWs4VMKgGFyGC l2xbYOM4YAWRjcUK36k+NK+PKaq9aMAHNnf8YCNkX53imrODuaEt5LWKrLajIrIz3ESf 4SPjnFoTKKUSoVMlQetUBaI/ygWCcxSnnTHW5PJ9N71BnJQeBGQETvGHZfLWwqDQyLNL bFIw== 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:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=aI87Oiz+eUAA9Aq4nIwlmyP0NpBcI7czH1Vde5FAGr4=; fh=xmAeKtysnShNOmkhiJmYkS30uw4Fu2hvBJ7qlIwukxQ=; b=YpIuYkJbkb03aF6WnfhBqhmTzVWMTAI3W8kTHdCTd5An+w9TTC+tDCxZ0E8AjieeAD lkoaHE6WrpkG80tJ1V97fTmhxX6AxAJcDJk4o9NN2VrPpyLhLiYRbRk80P/RFRM1cuJz ZbUsFjJ1Vy8QuKrpv0qcU6Z3mlueWcWiF+Tmqbsd1HArNcb+Vv57TidgGvetZ1OomegW o20AyUyMC26kSsBAZDKCCZH+4qPSYFaNdoDxmVdXQUazk3t6pKZ7+0umu8MTIHaB/3du wEcdoXAXtgkSGCibqUaMmsyEEhgsC8gGww6cdM0QLEYg1jANLhHpJWgqgnle0m245SGi wSHg==; 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=fosT8kF6; 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 38308e7fff4ca-2ef072f600bsi3767501fa.403.2024.07.18.04.31.49; Thu, 18 Jul 2024 04:31:50 -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=fosT8kF6; 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 0964468DAE3; Thu, 18 Jul 2024 13:55:16 +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 6B95F68DAF8 for ; Thu, 18 Jul 2024 13:55:06 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1721300106; bh=+ngB0sKO02Qijo+8OX61hnOm4oBARuas0BJZPQNbNnA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fosT8kF6DcynJns+arBN4AIVAMtqKh0VG7KmLbJjm5IV1xy4BlLZ//+lx+5xkuZX6 v6Y1QuOOwGQOg/EMlgnEiBD/n5771zLdhqcGwur5mVm34BkvRarMlRjF12JBGHjju+ kOnGHOvamvgLNVqWK95g5dATlEFQQIzZWXCXmqps= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 2DC9742383; Thu, 18 Jul 2024 12:55:06 +0200 (CEST) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Thu, 18 Jul 2024 12:55:02 +0200 Message-ID: <20240718105502.232604-5-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240718105502.232604-1-ffmpeg@haasn.xyz> References: <20240718105502.232604-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 5/5] fftools/ffprobe: implement dv_md_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 Cc: Niklas Haas Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: IPB+jTm387LJ From: Niklas Haas --- fftools/ffprobe.c | 9 +++++++++ tests/ref/fate/matroska-dovi-write-config7 | 1 + tests/ref/fate/matroska-dovi-write-config8 | 1 + 3 files changed, 11 insertions(+) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 0b7d4ce0d7..f9bc830f33 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -2603,6 +2603,7 @@ static void print_pkt_side_data(WriterContext *w, print_dynamic_hdr10_plus(w, metadata); } else if (sd->type == AV_PKT_DATA_DOVI_CONF) { AVDOVIDecoderConfigurationRecord *dovi = (AVDOVIDecoderConfigurationRecord *)sd->data; + const char *comp = "unknown"; print_int("dv_version_major", dovi->dv_version_major); print_int("dv_version_minor", dovi->dv_version_minor); print_int("dv_profile", dovi->dv_profile); @@ -2611,6 +2612,14 @@ static void print_pkt_side_data(WriterContext *w, print_int("el_present_flag", dovi->el_present_flag); print_int("bl_present_flag", dovi->bl_present_flag); print_int("dv_bl_signal_compatibility_id", dovi->dv_bl_signal_compatibility_id); + switch (dovi->dv_md_compression) + { + case AV_DOVI_COMPRESSION_NONE: comp = "none"; break; + case AV_DOVI_COMPRESSION_LIMITED: comp = "limited"; break; + case AV_DOVI_COMPRESSION_RESERVED: comp = "reserved"; break; + case AV_DOVI_COMPRESSION_EXTENDED: comp = "extended"; break; + } + print_str("dv_md_compression", comp); } else if (sd->type == AV_PKT_DATA_AUDIO_SERVICE_TYPE) { enum AVAudioServiceType *t = (enum AVAudioServiceType *)sd->data; print_int("service_type", *t); diff --git a/tests/ref/fate/matroska-dovi-write-config7 b/tests/ref/fate/matroska-dovi-write-config7 index dc5b73a44e..5f3e000279 100644 --- a/tests/ref/fate/matroska-dovi-write-config7 +++ b/tests/ref/fate/matroska-dovi-write-config7 @@ -45,5 +45,6 @@ rpu_present_flag=1 el_present_flag=1 bl_present_flag=0 dv_bl_signal_compatibility_id=6 +dv_md_compression=none [/SIDE_DATA] [/STREAM] diff --git a/tests/ref/fate/matroska-dovi-write-config8 b/tests/ref/fate/matroska-dovi-write-config8 index 44ca015e0e..85899d5f6d 100644 --- a/tests/ref/fate/matroska-dovi-write-config8 +++ b/tests/ref/fate/matroska-dovi-write-config8 @@ -64,5 +64,6 @@ rpu_present_flag=1 el_present_flag=0 bl_present_flag=1 dv_bl_signal_compatibility_id=4 +dv_md_compression=none [/SIDE_DATA] [/STREAM]