From patchwork Tue Jul 16 11:23:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 50560 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:40f5:b0:482:c625:d099 with SMTP id lb53csp214654vqb; Tue, 16 Jul 2024 04:41:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX/GEIu78utbeeOj9yDmhUmEDcO0u9KrOH/7PTaSxGjXSGr5y4GOEd3iPDFSj+NWOUICP9XtfrP+SobriQoF5QFS2yJ7s4iDgjmKg== X-Google-Smtp-Source: AGHT+IG6d82N34ADMWTGqckpen3z05ejGjRqa0kgItppkT6WzFQtRI5OIF8S4GbYn33uUbig2iYh X-Received: by 2002:a17:906:6a92:b0:a77:e2e3:3554 with SMTP id a640c23a62f3a-a79ea435a26mr124652166b.28.1721130109305; Tue, 16 Jul 2024 04:41:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721130109; cv=none; d=google.com; s=arc-20160816; b=znhNNOcD4KQAmyQwFBFbCBQDnbwVNUZTF+slBqUMrLGzMSU9WcWANtDPwRtttorVmR 2Cd9B1pj0Yojmro02eC/OsgzlbIo6OZ9f6YJ1qWXCAVFLq5oV7w7zX70UMH83ou+hKTh 0ndEadn7WsZodLtHblC+jUIphvEsDxURLrg+p4QZ8H5cc4JpqMISYeLoCcate6XyCRPK S1bAXfl7R1tfgWBKo2cg/jLdhnxccIjRDqVraZe+4Z+PiyfMt1k+/t2oibg7C6z8mFsU LSNFcudJz+rBe0Jin0RkW/ul0kwirFmTTbHnzH4Q9R/TnT4X4Jrdvuhgp3fq9COAn7sT mAwg== 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=RDtV5wo4NEkSJYpfKFXsLlF3+X/8oCt1YAdLHJUxn2fhMFTRX3PZ5J8vdRinrQtJDA csuS3NM/rEkV8ccY4MSnTmVY7hSaV4BJPPBMW17t6X5SkKJqYBNrIN40Ejxe2R4YzxRX xERn5RxYxQOIoHZuDC6PFGqY0Td3e7gzeKkJA1H2tPrSvvMDp3U1YNasoD6wXo4YzwOx jpDrCjWuQlLaeo3SgDZI4HDT/Bt2AofqlX7o41CWqLAdigLHvAxfk1jX28KooaWMDJMo jYZ0/pb/P18E3XtfyVdjFTYx/0g5HfEU1nzTQp8OznoVYdzkeJRxpSg7HyHDsI4RsDh2 lheA==; 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="avu/EKOY"; 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-a79bc827a1bsi349704866b.974.2024.07.16.04.41.48; Tue, 16 Jul 2024 04:41: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="avu/EKOY"; 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 017D968D82B; Tue, 16 Jul 2024 14:23:57 +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 A869168D937 for ; Tue, 16 Jul 2024 14:23:47 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1721129026; bh=UZyx2HoIJbHtU2mcZTzEx31DoebnHNA2taMmoGLSmI8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=avu/EKOYZKH0bbQkY+IG09ObC04kmZrHw8yKWI8idF3T2VpTnFIlZK+V8B61lgIqI lDNd0QZ4GY0+zHkzCByDTZAaC6QOhxoYMS2LVAF0IdJ16TqEikmHL0UUvu7WpCCdqA C+j5BIpwQEkiXtgbMSSFWu1ELjsqHpV1/tjOnRNM= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id BBD94408E3; Tue, 16 Jul 2024 13:23:46 +0200 (CEST) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Tue, 16 Jul 2024 13:23:15 +0200 Message-ID: <20240716112317.35745-3-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240716112317.35745-1-ffmpeg@haasn.xyz> References: <20240716112317.35745-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 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: 5lBZhxCrFpYw 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: