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: