From patchwork Thu Oct 14 13:09:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 31111 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2084:0:0:0:0 with SMTP id a4csp7145830ioa; Thu, 14 Oct 2021 06:10:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKH9yB7WZN78pN9idoop5UTWgmekZAMu1AAlX/ZrYE57X6cKcn3Sk21rjkARAcBMpRkjtP X-Received: by 2002:a50:bf4a:: with SMTP id g10mr8723168edk.11.1634217020917; Thu, 14 Oct 2021 06:10:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634217020; cv=none; d=google.com; s=arc-20160816; b=DNeQKUNW6skrwSuHiTvJMI5a+TA8kN9yD//7ZzrZn0bEhegO9aCYkrdZ1iQKmRdoTQ ztfxL0o3Pw4nHhrF2I/LVWY66XAThIfHHMSNzY4lXjccNa56jW8ITQBv/lJ/hZExuCUs yJI96eLAfa6SRuk51pPoDJbnXqdXmpjDeMW1TGrQu34H9EURpKDKRJzjwOOFg/p6Vo+F Jb5foTxiK5tvPki4pguCleu0q3Epj/o8vDMTj9iiajaPNE2YKeKrCvz87QGiWUv+DoLY C8p4hDVqOcV4imrNyikaoWaa4npGORi0E+0fBLVR1xETk7bFhyPpASEmdF6+t19L1e9/ HuYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=HoDOwaR/R3P+L3Fk7wUWJkRy3dpBs/8a2LBOIvXLznA=; b=x2+IEz/LMS8V7pSFfr4x/c/JlJijGHUTCO33k13S9joJuCb4SEtu/nEvBh7+caHJKU hi1Wg0f6A0P6xGCsEjrwawolngIKXg1BnK5Msk/GG9YYyMG/mPXc3KobfNqPwDzHd9bz yy0zPm8uJYi2+wE0+t+8Z3YqqhPDnDrPiYjJ2f+FeHLaaPLcoytTqzrnXys1fX+USdP5 QPYccw+C57g7NJu+ijHGgGDfyyD58u78aBuTVyJk5eBTXDnXfpHFZSsKtS9xzgDYlA35 0zxMwv/0B8oUv5xUEecAfwGzCtS+1dZNnraSEHq7Y3NC8pR0QuXpRYQBqSfsyBiR2zUb zUVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=l0pE3Hub; 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 y17si3244244edv.613.2021.10.14.06.10.20; Thu, 14 Oct 2021 06:10:20 -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=@gmail.com header.s=20210112 header.b=l0pE3Hub; 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 65C3E68AA6E; Thu, 14 Oct 2021 16:09:23 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7A27568AA25 for ; Thu, 14 Oct 2021 16:09:16 +0300 (EEST) Received: by mail-pg1-f180.google.com with SMTP id m21so5468653pgu.13 for ; Thu, 14 Oct 2021 06:09:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PhRQf5TLYg/YMHlPxkhe/avrHlSM9qcofqgL4Ivp7n8=; b=l0pE3HubRXKdQ1mtdzkkHuSt0vLcjQgAUFfz6qKYigPlG8npaQDRw/k1mjPyB1UYMS b1UttS9fTbFBYN3MMBlyBH3mWBiNALDU7WP2hSiuAoxGnY3Ihdz/aHtfoaXahz/7/Se3 YlztCfenkKJkBop5koJwd/XasKYy9DedxNf+DZsfA4wt4f8I17j5hQOCna4UHPlRPYRA AnTTWHMMtHfby+fg++Et6Mtz34DIempvYloFa8CULYbtVVEwDy7XPc4uTL13qKi1NSWy cqjf05HEGeHfubMnin+3WsINIpVnqr/T3tVcGrdGxXnfQn0J7mv24ytbbZZuhdfI1eqx bhMw== 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:in-reply-to :references; bh=PhRQf5TLYg/YMHlPxkhe/avrHlSM9qcofqgL4Ivp7n8=; b=5eTeurxjXWcetQ+6rP+KZnlna22f+AJIWVXnvTbt9oP3g6gh6O25rqL3unbhVLdcZz fHilfrzJO6FzRAvmOxSJHIBf5jplHd0PvLdNE0FAUdx6VRYcUY4K/4hsHm3Jxf1FXTzW 5+S/ktVshdSanGKtdbjhbFIP5IaIxUTomuLXB+NIFlJy1Vz/wnq+UKa/+axvse9ekbAz moDIk+gyBw515YY2Gdte5IHwFiRoQnuxVEBRo5EU7+RAICfF96gHY6ljU6bGagTcjL44 cQsafjUmUGm0mDWn9ThcArY1rKS/R1SWKF/8ofC97o9G/5EC0YwU8rYOwhskYfmWyaSn HJ+g== X-Gm-Message-State: AOAM532FNP23vyBSaEw0mLkESxKdj1rBICcWqXpz5ccd6TeuUGXzmTCe s3oLhpTancjbxkWmf5g9hM7at6zHOlE= X-Received: by 2002:a63:d14:: with SMTP id c20mr4248461pgl.118.1634216954758; Thu, 14 Oct 2021 06:09:14 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id 66sm2504789pfu.185.2021.10.14.06.09.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Oct 2021 06:09:14 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Thu, 14 Oct 2021 21:09:00 +0800 Message-Id: <1634216942-20329-6-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1634216942-20329-1-git-send-email-lance.lmwang@gmail.com> References: <1634216942-20329-1-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH 6/8] avformat/movenc: support dvwC box for Dolby Vision 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: Limin Wang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: ZXFj4R4asRcF From: Limin Wang By <> Signed-off-by: Limin Wang --- libavformat/movenc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index d43a086..37d4403 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1912,7 +1912,9 @@ static int mov_write_sv3d_tag(AVFormatContext *s, AVIOContext *pb, AVSphericalMa static int mov_write_dvcc_dvvc_tag(AVFormatContext *s, AVIOContext *pb, AVDOVIDecoderConfigurationRecord *dovi) { avio_wb32(pb, 32); /* size = 8 + 24 */ - if (dovi->dv_profile > 7) + if (dovi->dv_profile > 10) + ffio_wfourcc(pb, "dvwC"); + else if (dovi->dv_profile > 7) ffio_wfourcc(pb, "dvvC"); else ffio_wfourcc(pb, "dvcC"); @@ -1926,7 +1928,7 @@ static int mov_write_dvcc_dvvc_tag(AVFormatContext *s, AVIOContext *pb, AVDOVIDe ffio_fill(pb, 0, 4 * 4); /* reserved */ av_log(s, 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", - dovi->dv_profile > 7 ? "dvvC" : "dvcC", + 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,