From patchwork Mon Dec 3 01:19:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jan_Ekstr=C3=B6m?= X-Patchwork-Id: 11258 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id D52BB44E139 for ; Mon, 3 Dec 2018 03:26:31 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7AB0E680A1F; Mon, 3 Dec 2018 03:26:32 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3A4C6680249 for ; Mon, 3 Dec 2018 03:26:26 +0200 (EET) Received: by mail-lj1-f194.google.com with SMTP id 83-v6so9767756ljf.10 for ; Sun, 02 Dec 2018 17:26:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=IxavJQqdsuVXXgn0JNmdjJUnnivhdCWhbyA3u9LT4SY=; b=i0+1sWe1HtlTQAgzKJXaNDMAKksUd2lB5pJTopeFKYsMDfZ8fmmwuvnoPEr2i2Js31 1elCehMBrDfbFlVHhQ6hW8QqQGsggLnV9LI+Uaatl80ni52HERdYzvc5xgn99C+XKiqC 5EkxESE4s0GHtzUgJVRim42kdQFNx12u7ePLTzP/s9gLv5cqC3KRYPAAk6nLxNYYOnte 9QJFSPOJ/d+u3fO5vf++86HN87kHX8mPKWHJ+nHp+sV4cHf353zM+9ETaWV2DCDxGMhS GIYxM53HZjIl3BvujetSbRGmvh2B1Rm9kSqNoi9aBJPM50hXxxp0MZ38iZkE4n/pGkua GKbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=IxavJQqdsuVXXgn0JNmdjJUnnivhdCWhbyA3u9LT4SY=; b=AO+oe9ZQpSZY/5hD3i9N32sp3NjEzwAQlId4mybYi3s4we1j0qYrb0aa6ZEFHIBSyI Lqk01hl9TwGguhWUhkYIN24SsCSm+DdSOFLPtQ00CjFICkAK4sXsaGFF8VslMCPzoi4O jcN3MWVFZ7y33qBWJ04reDZyoPXXQlJ8AYAKYMvpWxm+/u0mkBS3cap2TlLEDFRko4zo mTCIJbr1K5FsWU4ykujnNttLRp6o6/s9rDn8a8KkHAYyNOvoNve/eJUnkmBfIsMGW5AQ NdNJJiodf4Td1sQilDtPMXo6ESDE2esqy7bZaQZruruW6tGryo/nkjBpUWA0p1iGgWJ7 li9w== X-Gm-Message-State: AA+aEWY+nN4r4hbWGogqW9D2z1C7ib58TDBg38X9zUwGoie4kav/8M8q eQaKQmemKwkSf6j5y0BGbZrEq79q X-Google-Smtp-Source: AFSGD/WWRifK9BzkZdlc/u4ukSCmSZit0IQoLGSh5t4L1XEcwDjPfHt1+CFLhetb05Xkehid8usmsg== X-Received: by 2002:a2e:b00a:: with SMTP id y10-v6mr8335540ljk.109.1543799961116; Sun, 02 Dec 2018 17:19:21 -0800 (PST) Received: from localhost.localdomain (91-159-194-103.elisa-laajakaista.fi. [91.159.194.103]) by smtp.gmail.com with ESMTPSA id d23sm2074773lfc.11.2018.12.02.17.19.20 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 02 Dec 2018 17:19:20 -0800 (PST) From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 3 Dec 2018 03:19:18 +0200 Message-Id: <20181203011919.8354-1-jeebjp@gmail.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2 v3] lavf/isom: add Dolby Vision sample entry codes for HEVC and H.264 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Rodger Combs These are registered identifiers at the MPEG-4 RA, which are defined as to be utilized for Dolby Vision AVC/HEVC streams that are not correctly presentable by standards-compliant AVC/HEVC players. According to the Dolby Vision specification for ISOBMFF, these sample entry codes are specified to have the standard AVC or HEVC decoder configuration box in addition to the Dolby custom DOVIConfigurationBox. This is what enables us to decode the streams without custom parsing. For correct presentation information from the DOVIConfigurationBox is required (YCbCr or modified ICtCP, SDR or HDR, base or enhancement layer). --- libavformat/isom.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/isom.c b/libavformat/isom.c index ca9d22e4f7..f7e1654484 100644 --- a/libavformat/isom.c +++ b/libavformat/isom.c @@ -163,6 +163,8 @@ const AVCodecTag ff_codec_movvideo_tags[] = { { AV_CODEC_ID_HEVC, MKTAG('h', 'e', 'v', '1') }, /* HEVC/H.265 which indicates parameter sets may be in ES */ { AV_CODEC_ID_HEVC, MKTAG('h', 'v', 'c', '1') }, /* HEVC/H.265 which indicates parameter sets shall not be in ES */ + { AV_CODEC_ID_HEVC, MKTAG('d', 'v', 'h', 'e') }, /* HEVC-based Dolby Vision derived from hev1 */ + /* dvh1 is handled within mov.c */ { AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, /* AVC-1/H.264 */ { AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '2') }, @@ -185,6 +187,8 @@ const AVCodecTag ff_codec_movvideo_tags[] = { { AV_CODEC_ID_H264, MKTAG('r', 'v', '6', '4') }, /* X-Com Radvision */ { AV_CODEC_ID_H264, MKTAG('x', 'a', 'l', 'g') }, /* XAVC-L HD422 produced by FCP */ { AV_CODEC_ID_H264, MKTAG('a', 'v', 'l', 'g') }, /* Panasonic P2 AVC-LongG */ + { AV_CODEC_ID_H264, MKTAG('d', 'v', 'a', 'v') }, /* AVC-based Dolby Vision derived from avc1 */ + { AV_CODEC_ID_H264, MKTAG('d', 'v', 'a', '1') }, /* AVC-based Dolby Vision derived from avc3 */ { AV_CODEC_ID_VP8, MKTAG('v', 'p', '0', '8') }, /* VP8 */ { AV_CODEC_ID_VP9, MKTAG('v', 'p', '0', '9') }, /* VP9 */