From patchwork Wed Jul 3 21:26:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 50310 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:cc64:0:b0:482:c625:d099 with SMTP id k4csp3352670vqv; Wed, 3 Jul 2024 14:44:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWmsgh8yrouK3GzTUvsBFI0EGbAWnLUpRdTabOtoR/C5doPAb+CfKQbWMTfiPSxHDi0vHKjdoFDhKNsyjOuqlffTcNPUe4l1d055w== X-Google-Smtp-Source: AGHT+IFTej8EILlrBzRHnA01eD9Xs9pjWW4WGEX+Bw5nD9K2rGzV5RfcNb6fN5maWItBR2OlIf/g X-Received: by 2002:a05:6512:33d3:b0:52c:dd58:1a97 with SMTP id 2adb3069b0e04-52e827860fcmr7179904e87.5.1720043054803; Wed, 03 Jul 2024 14:44:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720043054; cv=none; d=google.com; s=arc-20160816; b=pvTa4ZZdWUI2ELlDOE9+4eAk+wAHKsABpo60GwZhFT5nmQObQbNmfOAGPHnLJLJGlI rzWcPZR1cJR5QKMHB2Puhh2B2f34khh4mwNYBHH/abYCfUphe2bb2vm7Pqy5ao+j6x/y ahsdvzYUja6+TpI68LwJM7pGJYB8ju0zF1jyH6tSZFW1BzMVN0bxAIRk0QWH80ZRZS0Z 4I6gzx6N6tPPGFQV2uIexZq1hF1IJyCXHRrqzywHeWnzhKyReOQ79i/C2g58D/MeoKNH gKjo81lbTpPiW1fzUh9AsarqbbYRn8pJ+iJ62ZT0ESTcF6SHRm2TuCDTXzr4jp1zIM+p y9BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=AEO+CMkfSQbMx5DK4Fv0OhYuFe3F3BUER9eG1zLzvxU=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=MpCAZSxSjpsdOJr+5qJ8UuRQZKyJ8BF0cBln0C0LWog3JrdeXUPhNJc1hFftTwt2qc U2vefbA+gXw20PFuMkqSTojnqn7ET78DFXqdkvqZ1bKEO9MNW8OnWyhH3pTKsK2i028q yhwdDwYXi/yVvpQYxiuLfc5f+FDeS6G5Dp/eYLec4lFpn0k36vXG8z/qMEek4tpwGPCB B+AeQzglOela5ukkjQCDqwMVClvlbgJWeqlcQHLoBgYF7ahJM55pG2LJ7/mbBYxkdbJM 91u/SoJPPlL6c7I/c2wSvnzpp4x6+W6MMlP/danuhuF54gGJ+Z/UAbMP+DWWO+jV4BXA HvVA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b="Xk0Woa/3"; 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 2adb3069b0e04-52e7ab25901si3905676e87.325.2024.07.03.14.44.14; Wed, 03 Jul 2024 14:44:14 -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=20230601 header.b="Xk0Woa/3"; 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 0D3E868D9CB; Thu, 4 Jul 2024 00:26:40 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4253C68D5E1 for ; Thu, 4 Jul 2024 00:26:33 +0300 (EEST) Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-71884eda768so3485617a12.1 for ; Wed, 03 Jul 2024 14:26:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720041990; x=1720646790; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=u8+JdXa1d+t5ddpK/uQrlsBfRlAG+D5sBnmZcqitj/E=; b=Xk0Woa/3fvGtxIdPEEDJ3NBCEpJv8T8lFnonc4FMsjOfCbGMbYnhg3ZZuqKTVLP1G7 hW9EfgCmKZUIVR+jRgmTr8SEkjEIKromzv2nDVdDVfq/LmuCW0K3hCbDqc4PqDCNFSdd Kl4XGJ+/ofxONqo9ssu8mboF6COZb8BSQ7ZH1/YD9byIGvFqAC7djI7JIgfX888AsENn EK8417py3CXJmMicH8uPeaigN97O87oMnI3H1JluC93rHBEpTAIMJm8M9Kucvxu3VL38 VnTStBKAvs85iotxekmnV3dQreYh6JOtVtx22rkDbi0RbNL+f3J/ginVTGM5/drVqzVo n2lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720041990; x=1720646790; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=u8+JdXa1d+t5ddpK/uQrlsBfRlAG+D5sBnmZcqitj/E=; b=NW5HTB92p2+TzPF46d2S1nYBQ6YaF+W8dnBeEzjNOPpRDavKvr2cpF36uR9okLUwif Ahh1xaJDZ8Q88+fB4gwhTIl/7ASoM/jXf/7kPLF+kYz/2u2v/YDuiC8QpT0ufxC+6jjY 7pyvFyj7a1w9CXnigKQtfABKQGzXcAaSbJrf+GTTAuo2BTK03htujuJdRvArseeWtSFz D3Qzjs8Hn3/n1V4pvzzPRZIDmoIeeFgFCVhYrZSSI0A+zp/o8lC8qfq645TgPV5TSrfm HNVV5lVDiDFpfmpcI6iNiJWZYdh3W5DfN8ba5uQjOf3w8IPnjb601b9JxA61treGquJt nrDA== X-Gm-Message-State: AOJu0Yx9ROfECzgtAa/novUgnSSLdk7W/c4+LwwKi41nMSJHO67gPO63 yQ0ghFltavqzBznFzNTmq1pT+tHTYDSEw6A8az16nj23MWodCk1pocw2bw== X-Received: by 2002:a17:90a:d78e:b0:2c9:81d3:65d5 with SMTP id 98e67ed59e1d1-2c981d369b8mr1676222a91.24.1720041989997; Wed, 03 Jul 2024 14:26:29 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c91ce58877sm11370560a91.24.2024.07.03.14.26.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:26:29 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 3 Jul 2024 18:26:36 -0300 Message-ID: <20240703212648.48483-1-jamrial@gmail.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 01/11] avformat/mov: add support for lhvC box parsing 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: uf5impeWu/ft Signed-off-by: James Almer --- libavformat/mov.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index a3951a6942..30e8086855 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -8157,6 +8157,53 @@ static int mov_read_dvcc_dvvc(MOVContext *c, AVIOContext *pb, MOVAtom atom) return ff_isom_parse_dvcc_dvvc(c->fc, st, buf, read_size); } +static int mov_read_lhvc(MOVContext *c, AVIOContext *pb, MOVAtom atom) +{ + AVStream *st; + uint8_t *buf; + int ret, old_size, num_arrays; + + if (c->fc->nb_streams < 1) + return 0; + st = c->fc->streams[c->fc->nb_streams-1]; + + if (!st->codecpar->extradata_size) + // TODO: handle lhvC when present before hvcC + return 0; + + if (atom.size < 6 || st->codecpar->extradata_size < 23) + return AVERROR_INVALIDDATA; + + buf = av_malloc(atom.size + AV_INPUT_BUFFER_PADDING_SIZE); + if (!buf) + return AVERROR(ENOMEM); + memset(buf + atom.size, 0, AV_INPUT_BUFFER_PADDING_SIZE); + + ret = ffio_read_size(pb, buf, atom.size); + if (ret < 0) { + av_free(buf); + av_log(c->fc, AV_LOG_WARNING, "lhvC atom truncated\n"); + return 0; + } + + num_arrays = buf[5]; + old_size = st->codecpar->extradata_size; + atom.size -= 8 /* account for mov_realloc_extradata offseting */ + + 6 /* lhvC bytes before the arrays*/; + + ret = mov_realloc_extradata(st->codecpar, atom); + if (ret < 0) { + av_free(buf); + return ret; + } + + st->codecpar->extradata[22] += num_arrays; + memcpy(st->codecpar->extradata + old_size, buf + 6, atom.size + 8); + + av_free(buf); + return 0; +} + static int mov_read_kind(MOVContext *c, AVIOContext *pb, MOVAtom atom) { AVFormatContext *ctx = c->fc; @@ -8943,6 +8990,7 @@ static const MOVParseTableEntry mov_default_parse_table[] = { { MKTAG('i','p','r','p'), mov_read_iprp }, { MKTAG('i','i','n','f'), mov_read_iinf }, { MKTAG('a','m','v','e'), mov_read_amve }, /* ambient viewing environment box */ +{ MKTAG('l','h','v','C'), mov_read_lhvc }, #if CONFIG_IAMFDEC { MKTAG('i','a','c','b'), mov_read_iacb }, #endif From patchwork Wed Jul 3 21:26:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 50312 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:cc64:0:b0:482:c625:d099 with SMTP id k4csp3359580vqv; Wed, 3 Jul 2024 15:04:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV6jaIBDkuFJiMeaPsfAPc71SVzl/9j78GypcLtqytx3RnyTK9jltX8uch3cTZ7NO5VJqQ7QJ/TwSjMfTkvApAgFiiG3vyK+t5f5Q== X-Google-Smtp-Source: AGHT+IGix51aZSrJh5axHq0FOj8lppXXbpRVmEcf6h8LjwKwiLotA9VJ6aAF/wByhH9ivT0aFfO2 X-Received: by 2002:a2e:a889:0:b0:2ec:558d:4e0a with SMTP id 38308e7fff4ca-2ee5e393e16mr116032051fa.19.1720044251925; Wed, 03 Jul 2024 15:04:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720044251; cv=none; d=google.com; s=arc-20160816; b=UrqLnC2N4IrmF5eeUoHN1EcaoWyVi0vIAodojPAwQNOU+BZJTZB8aR52YGmRx4VJDi PKYg8w4zCTXYKB6OFKb4drtWUHIfz+eb/KGIez2hbY+IQz2Om8wPUx7L1JViT1q+38ew xD/Qbw0fsb+RhjN0LzOx49GlRY0389mUIFaKNfHLofGPI403Fh1EG6hjH4X086d6bRkM WO2DmXS0FnWur4DPnPbkDRrDyJbgjSnLiYjBKkdnE5LziWgkkVEqyu2k/GXuxFnmo5/z LfK2uj0BgoxhNXdtC8zPjgx6mw9CGoYnGxm+Qcv+p2uytZjTRoMz5DCfY4WuKaIGRAfO PuCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=DgT/6ey2bWwwPyY/wJebNWgf2TAl9D/erWa6rqNEmnM=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=NS+lrbxJdW2X4+Q1xx5tX1cU2xvU3ITjaFLGTy/CcV9ydIEmxasDR17iYY1iVoId4p +lMLl2G/FlbQnS/WWW5B5AT2sx7ybts0MxBB0ZXh8cZPeWOQiEzj/8Fwf7WKSR+xj4hb dlePdVrZwdQmvlk5TzpsOJGXKnpKCrcjDU1pr5cES8OQwdKxHro5fMrSFqZyzJ+J4a+d ZH/xmSzjW1q1fpc127rklkGeVTpZwbmPFKLAIRdH7sPI6DW5cCFbllgq2NOzYz8Ly//Q 1CjIZJW6oVWQaQcF1Z1qU/yHoBLRnIIVLO6/mUs97ItTulZBLMAxnilC4xKYrZPyjb0V /I/w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=kbccLNR3; 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 38308e7fff4ca-2ee5155ec17si31852831fa.562.2024.07.03.15.04.11; Wed, 03 Jul 2024 15:04:11 -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=20230601 header.b=kbccLNR3; 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 6D1F668D9D1; Thu, 4 Jul 2024 00:26:43 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 852C568D9CE for ; Thu, 4 Jul 2024 00:26:36 +0300 (EEST) Received: by mail-pj1-f43.google.com with SMTP id 98e67ed59e1d1-2c1a4192d55so14321a91.2 for ; Wed, 03 Jul 2024 14:26:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720041994; x=1720646794; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=KvUBpxNvtHzlvpW08LpQ2UbeV/yLUWhCLRBzbApmoQY=; b=kbccLNR3izLbxsJWS4SVMyEkT/bFdDhy4tXjeBD7+ofwtAi9VJBCiyFO/8GispS0BR vQoNnS4fKLJ9clSM/Q7/fMmMgFkukyPDbRAUFPCLL88ypivF6X6zjSwrxlM+l6/v/rX4 xCp6dCyhHy7Dtvvz4fVZM4q5z7E7gACpB9Mkjlw4RDqk4+Noutk9I7aKpnpDCrEuQNCq YKZRVCxl8lKTyrfItcG0Y7UHqeDyO44y7fYRE/NowYGMxGxKU9lqYXMEX2HFHuEqgAJx x0NyDpIu19/ku216slxholR0qRQvZRXKcGLiP0FnNBlaa4L1unRRkAe63979AqI7kW8P 57Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720041994; x=1720646794; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KvUBpxNvtHzlvpW08LpQ2UbeV/yLUWhCLRBzbApmoQY=; b=BDMb59gkQ5NwEMTfkzj0sO0ankDkWVSX4mnHYx6GgRV3wkyqZUf7f6/hAaL5AR98It jdfa/MusCImzcpC1AD0wdqOq2usiqbcp7yXS61xCFmShdlcUAPdtlnLkmVMJBNi8bCnH HgvJvq15cKSGQXgOHZ7MMAw1BuZy5q2Y0Ld5AcXp5otHMJPuLpph8mpfWJokktZgBfpT YeDL57GQHkeGm8Bw+t2QSlhSsVci8h2D5VBW5sDhuIwToyL1j1xc0Lt2igtGEU24Uitd Z7KS8vxaAq+se68Ab8X4pRNf6CMeoVNOyKf7j9F1/htmNxda7FAfzzJ+bGwTypMTT726 ygXA== X-Gm-Message-State: AOJu0YyjusXLGeO9mN0h6Bt5ktPox9wbaLE/2eDFhGVpgy//vsNgCWwm NCgV5gb6ze9e7QP9mtUiVBhNTzM/5Q/aMGClDfzWCT4ifqvd4nl8mUe0oQ== X-Received: by 2002:a17:90a:f09:b0:2c9:916a:4b43 with SMTP id 98e67ed59e1d1-2c9916a4d7bmr652369a91.47.1720041992562; Wed, 03 Jul 2024 14:26:32 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c91ce58877sm11370560a91.24.2024.07.03.14.26.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:26:31 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 3 Jul 2024 18:26:37 -0300 Message-ID: <20240703212648.48483-2-jamrial@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240703212648.48483-1-jamrial@gmail.com> References: <20240703212648.48483-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 02/11] avformat: Add a new stream disposition for multilayer video 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Sm0HS9xilYgE From: Derek Buitenhuis This lets us detect when a container has flagged a stream as multilayer. Signed-off-by: Derek Buitenhuis Signed-off-by: Anton Khirnov Signed-off-by: James Almer --- doc/ffprobe.xsd | 1 + libavformat/avformat.h | 5 +++++ libavformat/dump.c | 2 ++ libavformat/options.c | 3 ++- libavformat/version.h | 2 +- tests/ref/fate/cavs-demux | 2 +- tests/ref/fate/concat-demuxer-extended-lavf-mxf | 2 +- .../fate/concat-demuxer-extended-lavf-mxf_d10 | 2 +- tests/ref/fate/concat-demuxer-simple1-lavf-mxf | 4 ++-- .../ref/fate/concat-demuxer-simple1-lavf-mxf_d10 | 4 ++-- tests/ref/fate/concat-demuxer-simple2-lavf-ts | 4 ++-- tests/ref/fate/ffprobe_compact | 6 +++--- tests/ref/fate/ffprobe_csv | 6 +++--- tests/ref/fate/ffprobe_default | 3 +++ tests/ref/fate/ffprobe_flat | 3 +++ tests/ref/fate/ffprobe_ini | 3 +++ tests/ref/fate/ffprobe_json | 9 ++++++--- tests/ref/fate/ffprobe_xml | 6 +++--- tests/ref/fate/ffprobe_xsd | 6 +++--- tests/ref/fate/flv-demux | 4 ++-- tests/ref/fate/gapless-mp3-side-data | 2 +- .../hapqa-extract-nosnappy-to-hapalphaonly-mov | 1 + .../ref/fate/hapqa-extract-nosnappy-to-hapq-mov | 1 + tests/ref/fate/iamf-5_1-copy | 8 ++++++++ tests/ref/fate/iamf-5_1-demux | 8 ++++++++ tests/ref/fate/iamf-5_1_4 | 12 ++++++++++++ tests/ref/fate/iamf-7_1_4 | 14 ++++++++++++++ tests/ref/fate/iamf-ambisonic_1 | 8 ++++++++ tests/ref/fate/iamf-stereo | 2 ++ tests/ref/fate/matroska-alac-remux | 1 + tests/ref/fate/matroska-mpegts-remux | 2 ++ tests/ref/fate/matroska-side-data-pref-codec | 1 + tests/ref/fate/matroska-side-data-pref-packet | 1 + tests/ref/fate/matroska-vp8-alpha-remux | 1 + tests/ref/fate/mov-heic-demux-still-image-grid | 5 +++++ tests/ref/fate/mov-heic-demux-still-image-iovl | 3 +++ tests/ref/fate/mov-heic-demux-still-image-iovl-2 | 2 ++ tests/ref/fate/mov-mp4-disposition-mpegts-remux | 6 ++++-- tests/ref/fate/mov-mp4-iamf-5_1_4 | 14 ++++++++++++++ tests/ref/fate/mov-mp4-iamf-7_1_4 | 16 ++++++++++++++++ tests/ref/fate/mov-mp4-iamf-ambisonic_1 | 10 ++++++++++ tests/ref/fate/mov-mp4-iamf-stereo | 4 ++++ tests/ref/fate/mov-zombie | 2 +- tests/ref/fate/mxf-probe-applehdr10 | 3 +++ tests/ref/fate/mxf-probe-d10 | 2 ++ tests/ref/fate/mxf-probe-dnxhd | 4 ++++ tests/ref/fate/mxf-probe-dv25 | 3 +++ tests/ref/fate/mxf-probe-j2k | 1 + tests/ref/fate/oggopus-demux | 2 +- tests/ref/fate/ts-demux | 6 +++--- tests/ref/fate/ts-opus-demux | 2 +- tests/ref/fate/ts-small-demux | 2 +- tests/ref/fate/ts-timed-id3-demux | 2 +- tests/ref/fate/webm-webvtt-remux | 4 ++++ 54 files changed, 193 insertions(+), 39 deletions(-) diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd index 6d5d094d97..64e2d88574 100644 --- a/doc/ffprobe.xsd +++ b/doc/ffprobe.xsd @@ -255,6 +255,7 @@ + diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 8afdcd9fd0..ef912731ac 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -713,6 +713,11 @@ typedef struct AVIndexEntry { * The video stream contains still images. */ #define AV_DISPOSITION_STILL_IMAGE (1 << 20) +/** + * The video stream contains multiple layers, e.g. stereoscopic views (cf. H.264 + * Annex G/H, or HEVC Annex F). + */ +#define AV_DISPOSITION_MULTILAYER (1 << 21) /** * @return The AV_DISPOSITION_* flag corresponding to disp or a negative error diff --git a/libavformat/dump.c b/libavformat/dump.c index 7507434f92..0d08c7eb54 100644 --- a/libavformat/dump.c +++ b/libavformat/dump.c @@ -562,6 +562,8 @@ static void dump_disposition(int disposition, int log_level) av_log(NULL, log_level, " (still image)"); if (disposition & AV_DISPOSITION_NON_DIEGETIC) av_log(NULL, log_level, " (non-diegetic)"); + if (disposition & AV_DISPOSITION_MULTILAYER) + av_log(NULL, log_level, " (multilayer)"); } /* "user interface" functions */ diff --git a/libavformat/options.c b/libavformat/options.c index 60a73d79b9..ae879b9072 100644 --- a/libavformat/options.c +++ b/libavformat/options.c @@ -219,7 +219,8 @@ const AVClass *avformat_get_class(void) { "descriptions", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DESCRIPTIONS }, .unit = "disposition" }, \ { "metadata", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_METADATA }, .unit = "disposition" }, \ { "dependent", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DEPENDENT }, .unit = "disposition" }, \ - { "still_image", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_STILL_IMAGE }, .unit = "disposition" } + { "still_image", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_STILL_IMAGE }, .unit = "disposition" }, \ + { "multilayer", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_MULTILAYER }, .unit = "disposition" } static const AVOption stream_options[] = { DISPOSITION_OPT(AVStream), diff --git a/libavformat/version.h b/libavformat/version.h index af7d0a1024..e2634b85ae 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -31,7 +31,7 @@ #include "version_major.h" -#define LIBAVFORMAT_VERSION_MINOR 4 +#define LIBAVFORMAT_VERSION_MINOR 5 #define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ diff --git a/tests/ref/fate/cavs-demux b/tests/ref/fate/cavs-demux index 016e40e782..059c8bd042 100644 --- a/tests/ref/fate/cavs-demux +++ b/tests/ref/fate/cavs-demux @@ -58,5 +58,5 @@ packet|codec_type=video|stream_index=0|pts=2280000|pts_time=1.900000|dts=2280000 packet|codec_type=video|stream_index=0|pts=2320000|pts_time=1.933333|dts=2320000|dts_time=1.933333|duration=40000|duration_time=0.033333|size=67|pos=172185|flags=K__|data_hash=CRC32:42484449 packet|codec_type=video|stream_index=0|pts=2360000|pts_time=1.966667|dts=2360000|dts_time=1.966667|duration=40000|duration_time=0.033333|size=83|pos=172252|flags=K__|data_hash=CRC32:a941bdf0 packet|codec_type=video|stream_index=0|pts=2400000|pts_time=2.000000|dts=2400000|dts_time=2.000000|duration=40000|duration_time=0.033333|size=5417|pos=172335|flags=K__|data_hash=CRC32:9d0d503b -stream|index=0|codec_name=cavs|profile=unknown|codec_type=video|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|width=1280|height=720|coded_width=1280|coded_height=720|closed_captions=0|film_grain=0|has_b_frames=0|sample_aspect_ratio=N/A|display_aspect_ratio=N/A|pix_fmt=yuv420p|level=-99|color_range=unknown|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=unspecified|field_order=unknown|refs=1|id=N/A|r_frame_rate=30/1|avg_frame_rate=25/1|time_base=1/1200000|start_pts=N/A|start_time=N/A|duration_ts=N/A|duration=N/A|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=60|extradata_size=18|extradata_hash=CRC32:1255d52e|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0 +stream|index=0|codec_name=cavs|profile=unknown|codec_type=video|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|width=1280|height=720|coded_width=1280|coded_height=720|closed_captions=0|film_grain=0|has_b_frames=0|sample_aspect_ratio=N/A|display_aspect_ratio=N/A|pix_fmt=yuv420p|level=-99|color_range=unknown|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=unspecified|field_order=unknown|refs=1|id=N/A|r_frame_rate=30/1|avg_frame_rate=25/1|time_base=1/1200000|start_pts=N/A|start_time=N/A|duration_ts=N/A|duration=N/A|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=60|extradata_size=18|extradata_hash=CRC32:1255d52e|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0 format|filename=bunny.mp4|nb_streams=1|nb_programs=0|nb_stream_groups=0|format_name=cavsvideo|start_time=N/A|duration=N/A|size=177752|bit_rate=N/A|probe_score=51 diff --git a/tests/ref/fate/concat-demuxer-extended-lavf-mxf b/tests/ref/fate/concat-demuxer-extended-lavf-mxf index 1f1b454443..1644c7ebd8 100644 --- a/tests/ref/fate/concat-demuxer-extended-lavf-mxf +++ b/tests/ref/fate/concat-demuxer-extended-lavf-mxf @@ -1 +1 @@ -6a6f9fb967044be939c345268cadd7bb *tests/data/fate/concat-demuxer-extended-lavf-mxf.ffprobe +0e6abc213a400c770c68a32e2144e89a *tests/data/fate/concat-demuxer-extended-lavf-mxf.ffprobe diff --git a/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 b/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 index 93e4846123..ad7db04d49 100644 --- a/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 +++ b/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 @@ -1 +1 @@ -05f815e1f45f85456d87030a5c36ebad *tests/data/fate/concat-demuxer-extended-lavf-mxf_d10.ffprobe +c2477f9b9682ff679e0aba4135da321e *tests/data/fate/concat-demuxer-extended-lavf-mxf_d10.ffprobe diff --git a/tests/ref/fate/concat-demuxer-simple1-lavf-mxf b/tests/ref/fate/concat-demuxer-simple1-lavf-mxf index c1afcf71e2..4c9fad3bc9 100644 --- a/tests/ref/fate/concat-demuxer-simple1-lavf-mxf +++ b/tests/ref/fate/concat-demuxer-simple1-lavf-mxf @@ -99,5 +99,5 @@ audio|1|63360|1.320000|63360|1.320000|1920|0.040000|3840|190464|K__|1|Strings Me video|0|33|1.320000|33|1.320000|1|0.040000|12362|195072|___|1|Strings Metadata audio|1|65280|1.360000|65280|1.360000|1920|0.040000|3840|207872|K__|1|Strings Metadata video|0|37|1.480000|34|1.360000|1|0.040000|24786|212480|K__|1|Strings Metadata -0|mpeg2video|4|video|[0][0][0][0]|0x0000|352|288|0|0|0|0|1|1:1|11:9|yuv420p|8|tv|unknown|unknown|unknown|left|progressive|1|N/A|25/1|25/1|1/25|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|51|22|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001300000000000000000000000000000000000001|CPB properties|0|0|0|49152|-1 -1|pcm_s16le|unknown|audio|[0][0][0][0]|0x0000|s16|48000|1|unknown|16|0|N/A|0/0|0/0|1/48000|0|0.000000|N/A|N/A|768000|N/A|N/A|N/A|N/A|50|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001300000000000000000000000000000000000001 +0|mpeg2video|4|video|[0][0][0][0]|0x0000|352|288|0|0|0|0|1|1:1|11:9|yuv420p|8|tv|unknown|unknown|unknown|left|progressive|1|N/A|25/1|25/1|1/25|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|51|22|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001300000000000000000000000000000000000001|CPB properties|0|0|0|49152|-1 +1|pcm_s16le|unknown|audio|[0][0][0][0]|0x0000|s16|48000|1|unknown|16|0|N/A|0/0|0/0|1/48000|0|0.000000|N/A|N/A|768000|N/A|N/A|N/A|N/A|50|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001300000000000000000000000000000000000001 diff --git a/tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10 b/tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10 index a8f2dfe3f0..74c32e9dc5 100644 --- a/tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10 +++ b/tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10 @@ -68,5 +68,5 @@ video|0|33|1.320000|33|1.320000|1|0.040000|150000|1711104|K__|1|Strings Metadata audio|1|63360|1.320000|63360|1.320000|1920|0.040000|7680|1861632|K__|1|Strings Metadata video|0|34|1.360000|34|1.360000|1|0.040000|150000|1924096|K__|1|Strings Metadata audio|1|65280|1.360000|65280|1.360000|1920|0.040000|7680|2074624|K__|1|Strings Metadata -0|mpeg2video|0|video|[0][0][0][0]|0x0000|720|608|0|0|0|0|0|1:1|45:38|yuv422p|5|tv|unknown|unknown|unknown|topleft|tt|1|N/A|25/1|25/1|1/25|0|0.000000|N/A|N/A|30000000|N/A|N/A|N/A|N/A|35|22|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001300000000000000000000000000000000000001|CPB properties|30000000|0|0|1212416|-1 -1|pcm_s16le|unknown|audio|[0][0][0][0]|0x0000|s16|48000|2|unknown|16|0|N/A|0/0|0/0|1/48000|0|0.000000|N/A|N/A|1536000|N/A|N/A|N/A|N/A|35|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001300000000000000000000000000000000000001 +0|mpeg2video|0|video|[0][0][0][0]|0x0000|720|608|0|0|0|0|0|1:1|45:38|yuv422p|5|tv|unknown|unknown|unknown|topleft|tt|1|N/A|25/1|25/1|1/25|0|0.000000|N/A|N/A|30000000|N/A|N/A|N/A|N/A|35|22|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001300000000000000000000000000000000000001|CPB properties|30000000|0|0|1212416|-1 +1|pcm_s16le|unknown|audio|[0][0][0][0]|0x0000|s16|48000|2|unknown|16|0|N/A|0/0|0/0|1/48000|0|0.000000|N/A|N/A|1536000|N/A|N/A|N/A|N/A|35|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001300000000000000000000000000000000000001 diff --git a/tests/ref/fate/concat-demuxer-simple2-lavf-ts b/tests/ref/fate/concat-demuxer-simple2-lavf-ts index 548cab01c6..30447f7fc8 100644 --- a/tests/ref/fate/concat-demuxer-simple2-lavf-ts +++ b/tests/ref/fate/concat-demuxer-simple2-lavf-ts @@ -147,5 +147,5 @@ video|1|164782|1.830911|161182|1.790911|3600|0.040000|12282|168448|___|MPEGTS St video|1|168382|1.870911|164782|1.830911|3600|0.040000|24786|181420|K__|MPEGTS Stream ID|224 video|1|171982|1.910911|168382|1.870911|3600|0.040000|17440|206988|___|MPEGTS Stream ID|224 video|1|175582|1.950911|171982|1.910911|3600|0.040000|15019|224848|___|MPEGTS Stream ID|224 -0|mp2|unknown|audio|[3][0][0][0]|0x0003|s16p|44100|1|mono|0|0|N/A|0/0|0/0|1/90000|0|0.000000|N/A|N/A|64000|N/A|N/A|N/A|N/A|89|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|this is stream 0 -1|mpeg2video|4|video|[2][0][0][0]|0x0002|352|288|0|0|0|0|1|1:1|11:9|yuv420p|8|tv|unknown|unknown|unknown|left|progressive|1|N/A|25/1|25/1|1/90000|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|60|22|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|this is stream 1|CPB properties|0|0|0|49152|-1 +0|mp2|unknown|audio|[3][0][0][0]|0x0003|s16p|44100|1|mono|0|0|N/A|0/0|0/0|1/90000|0|0.000000|N/A|N/A|64000|N/A|N/A|N/A|N/A|89|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|this is stream 0 +1|mpeg2video|4|video|[2][0][0][0]|0x0002|352|288|0|0|0|0|1|1:1|11:9|yuv420p|8|tv|unknown|unknown|unknown|left|progressive|1|N/A|25/1|25/1|1/90000|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|60|22|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|this is stream 1|CPB properties|0|0|0|49152|-1 diff --git a/tests/ref/fate/ffprobe_compact b/tests/ref/fate/ffprobe_compact index 3cda8550db..25632fd179 100644 --- a/tests/ref/fate/ffprobe_compact +++ b/tests/ref/fate/ffprobe_compact @@ -26,7 +26,7 @@ packet|codec_type=video|stream_index=1|pts=6144|pts_time=0.120000|dts=6144|dts_t frame|media_type=video|stream_index=1|key_frame=1|pts=6144|pts_time=0.120000|pkt_dts=6144|pkt_dts_time=0.120000|best_effort_timestamp=6144|best_effort_timestamp_time=0.120000|duration=2048|duration_time=0.040000|pkt_pos=793142|pkt_size=230400|width=320|height=240|crop_top=0|crop_bottom=0|crop_left=0|crop_right=0|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified packet|codec_type=video|stream_index=2|pts=6144|pts_time=0.120000|dts=6144|dts_time=0.120000|duration=2048|duration_time=0.040000|size=30000|pos=1023566|flags=K__ frame|media_type=video|stream_index=2|key_frame=1|pts=6144|pts_time=0.120000|pkt_dts=6144|pkt_dts_time=0.120000|best_effort_timestamp=6144|best_effort_timestamp_time=0.120000|duration=2048|duration_time=0.040000|pkt_pos=1023566|pkt_size=30000|width=100|height=100|crop_top=0|crop_bottom=0|crop_left=0|crop_right=0|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified -stream|index=0|codec_name=pcm_s16le|profile=unknown|codec_type=audio|codec_tag_string=PSD[16]|codec_tag=0x10445350|sample_fmt=s16|sample_rate=44100|channels=1|channel_layout=unknown|bits_per_sample=16|initial_padding=0|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/44100|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=705600|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=6|nb_read_packets=6|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:E=mc²|tag:encoder=Lavc pcm_s16le -stream|index=1|codec_name=rawvideo|profile=unknown|codec_type=video|codec_tag_string=RGB[24]|codec_tag=0x18424752|width=320|height=240|coded_width=320|coded_height=240|closed_captions=0|film_grain=0|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=4:3|pix_fmt=rgb24|level=-99|color_range=unknown|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=unspecified|field_order=unknown|refs=1|id=N/A|r_frame_rate=25/1|avg_frame_rate=25/1|time_base=1/51200|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=4|nb_read_packets=4|disposition:default=1|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:title=foobar|tag:duration_ts=field-and-tags-conflict-attempt|tag:encoder=Lavc rawvideo -stream|index=2|codec_name=rawvideo|profile=unknown|codec_type=video|codec_tag_string=RGB[24]|codec_tag=0x18424752|width=100|height=100|coded_width=100|coded_height=100|closed_captions=0|film_grain=0|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=1:1|pix_fmt=rgb24|level=-99|color_range=unknown|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=unspecified|field_order=unknown|refs=1|id=N/A|r_frame_rate=25/1|avg_frame_rate=25/1|time_base=1/51200|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=4|nb_read_packets=4|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:encoder=Lavc rawvideo +stream|index=0|codec_name=pcm_s16le|profile=unknown|codec_type=audio|codec_tag_string=PSD[16]|codec_tag=0x10445350|sample_fmt=s16|sample_rate=44100|channels=1|channel_layout=unknown|bits_per_sample=16|initial_padding=0|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/44100|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=705600|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=6|nb_read_packets=6|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:E=mc²|tag:encoder=Lavc pcm_s16le +stream|index=1|codec_name=rawvideo|profile=unknown|codec_type=video|codec_tag_string=RGB[24]|codec_tag=0x18424752|width=320|height=240|coded_width=320|coded_height=240|closed_captions=0|film_grain=0|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=4:3|pix_fmt=rgb24|level=-99|color_range=unknown|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=unspecified|field_order=unknown|refs=1|id=N/A|r_frame_rate=25/1|avg_frame_rate=25/1|time_base=1/51200|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=4|nb_read_packets=4|disposition:default=1|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:title=foobar|tag:duration_ts=field-and-tags-conflict-attempt|tag:encoder=Lavc rawvideo +stream|index=2|codec_name=rawvideo|profile=unknown|codec_type=video|codec_tag_string=RGB[24]|codec_tag=0x18424752|width=100|height=100|coded_width=100|coded_height=100|closed_captions=0|film_grain=0|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=1:1|pix_fmt=rgb24|level=-99|color_range=unknown|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=unspecified|field_order=unknown|refs=1|id=N/A|r_frame_rate=25/1|avg_frame_rate=25/1|time_base=1/51200|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=4|nb_read_packets=4|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:encoder=Lavc rawvideo format|filename=tests/data/ffprobe-test.nut|nb_streams=3|nb_programs=0|nb_stream_groups=0|format_name=nut|start_time=0.000000|duration=0.120000|size=1053646|bit_rate=70243066|probe_score=100|tag:title=ffprobe test file|tag:comment='A comment with CSV, XML & JSON special chars': |tag:comment2=I ♥ Üñîçød€ diff --git a/tests/ref/fate/ffprobe_csv b/tests/ref/fate/ffprobe_csv index 5dcb403156..defe72d4c4 100644 --- a/tests/ref/fate/ffprobe_csv +++ b/tests/ref/fate/ffprobe_csv @@ -26,7 +26,7 @@ packet,video,1,6144,0.120000,6144,0.120000,2048,0.040000,230400,793142,K__ frame,video,1,1,6144,0.120000,6144,0.120000,6144,0.120000,2048,0.040000,793142,230400,320,240,0,0,0,0,rgb24,1:1,I,0,0,0,unknown,unknown,unknown,unknown,unspecified packet,video,2,6144,0.120000,6144,0.120000,2048,0.040000,30000,1023566,K__ frame,video,2,1,6144,0.120000,6144,0.120000,6144,0.120000,2048,0.040000,1023566,30000,100,100,0,0,0,0,rgb24,1:1,I,0,0,0,unknown,unknown,unknown,unknown,unspecified -stream,0,pcm_s16le,unknown,audio,PSD[16],0x10445350,s16,44100,1,unknown,16,0,N/A,0/0,0/0,1/44100,0,0.000000,N/A,N/A,705600,N/A,N/A,N/A,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,mc²,Lavc pcm_s16le -stream,1,rawvideo,unknown,video,RGB[24],0x18424752,320,240,320,240,0,0,0,1:1,4:3,rgb24,-99,unknown,unknown,unknown,unknown,unspecified,unknown,1,N/A,25/1,25/1,1/51200,0,0.000000,N/A,N/A,N/A,N/A,N/A,N/A,4,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,foobar,field-and-tags-conflict-attempt,Lavc rawvideo -stream,2,rawvideo,unknown,video,RGB[24],0x18424752,100,100,100,100,0,0,0,1:1,1:1,rgb24,-99,unknown,unknown,unknown,unknown,unspecified,unknown,1,N/A,25/1,25/1,1/51200,0,0.000000,N/A,N/A,N/A,N/A,N/A,N/A,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,Lavc rawvideo +stream,0,pcm_s16le,unknown,audio,PSD[16],0x10445350,s16,44100,1,unknown,16,0,N/A,0/0,0/0,1/44100,0,0.000000,N/A,N/A,705600,N/A,N/A,N/A,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,mc²,Lavc pcm_s16le +stream,1,rawvideo,unknown,video,RGB[24],0x18424752,320,240,320,240,0,0,0,1:1,4:3,rgb24,-99,unknown,unknown,unknown,unknown,unspecified,unknown,1,N/A,25/1,25/1,1/51200,0,0.000000,N/A,N/A,N/A,N/A,N/A,N/A,4,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,foobar,field-and-tags-conflict-attempt,Lavc rawvideo +stream,2,rawvideo,unknown,video,RGB[24],0x18424752,100,100,100,100,0,0,0,1:1,1:1,rgb24,-99,unknown,unknown,unknown,unknown,unspecified,unknown,1,N/A,25/1,25/1,1/51200,0,0.000000,N/A,N/A,N/A,N/A,N/A,N/A,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,Lavc rawvideo format,tests/data/ffprobe-test.nut,3,0,0,nut,0.000000,0.120000,1053646,70243066,100,ffprobe test file,"'A comment with CSV, XML & JSON special chars': ",I ♥ Üñîçød€ diff --git a/tests/ref/fate/ffprobe_default b/tests/ref/fate/ffprobe_default index 74c70e55d4..ac55749295 100644 --- a/tests/ref/fate/ffprobe_default +++ b/tests/ref/fate/ffprobe_default @@ -595,6 +595,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:E=mc² TAG:encoder=Lavc pcm_s16le [/STREAM] @@ -655,6 +656,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:title=foobar TAG:duration_ts=field-and-tags-conflict-attempt TAG:encoder=Lavc rawvideo @@ -716,6 +718,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:encoder=Lavc rawvideo [/STREAM] [FORMAT] diff --git a/tests/ref/fate/ffprobe_flat b/tests/ref/fate/ffprobe_flat index 5a858aab81..e1aefe6afb 100644 --- a/tests/ref/fate/ffprobe_flat +++ b/tests/ref/fate/ffprobe_flat @@ -538,6 +538,7 @@ streams.stream.0.disposition.descriptions=0 streams.stream.0.disposition.metadata=0 streams.stream.0.disposition.dependent=0 streams.stream.0.disposition.still_image=0 +streams.stream.0.disposition.multilayer=0 streams.stream.0.tags.E="mc²" streams.stream.0.tags.encoder="Lavc pcm_s16le" streams.stream.1.index=1 @@ -596,6 +597,7 @@ streams.stream.1.disposition.descriptions=0 streams.stream.1.disposition.metadata=0 streams.stream.1.disposition.dependent=0 streams.stream.1.disposition.still_image=0 +streams.stream.1.disposition.multilayer=0 streams.stream.1.tags.title="foobar" streams.stream.1.tags.duration_ts="field-and-tags-conflict-attempt" streams.stream.1.tags.encoder="Lavc rawvideo" @@ -655,6 +657,7 @@ streams.stream.2.disposition.descriptions=0 streams.stream.2.disposition.metadata=0 streams.stream.2.disposition.dependent=0 streams.stream.2.disposition.still_image=0 +streams.stream.2.disposition.multilayer=0 streams.stream.2.tags.encoder="Lavc rawvideo" format.filename="tests/data/ffprobe-test.nut" format.nb_streams=3 diff --git a/tests/ref/fate/ffprobe_ini b/tests/ref/fate/ffprobe_ini index 6740775959..4d046539d6 100644 --- a/tests/ref/fate/ffprobe_ini +++ b/tests/ref/fate/ffprobe_ini @@ -599,6 +599,7 @@ descriptions=0 metadata=0 dependent=0 still_image=0 +multilayer=0 [streams.stream.0.tags] E=mc² @@ -663,6 +664,7 @@ descriptions=0 metadata=0 dependent=0 still_image=0 +multilayer=0 [streams.stream.1.tags] title=foobar @@ -728,6 +730,7 @@ descriptions=0 metadata=0 dependent=0 still_image=0 +multilayer=0 [streams.stream.2.tags] encoder=Lavc rawvideo diff --git a/tests/ref/fate/ffprobe_json b/tests/ref/fate/ffprobe_json index 9de2f646ea..5583063eb4 100644 --- a/tests/ref/fate/ffprobe_json +++ b/tests/ref/fate/ffprobe_json @@ -573,7 +573,8 @@ "descriptions": 0, "metadata": 0, "dependent": 0, - "still_image": 0 + "still_image": 0, + "multilayer": 0 }, "tags": { "E": "mc²", @@ -623,7 +624,8 @@ "descriptions": 0, "metadata": 0, "dependent": 0, - "still_image": 0 + "still_image": 0, + "multilayer": 0 }, "tags": { "title": "foobar", @@ -674,7 +676,8 @@ "descriptions": 0, "metadata": 0, "dependent": 0, - "still_image": 0 + "still_image": 0, + "multilayer": 0 }, "tags": { "encoder": "Lavc rawvideo" diff --git a/tests/ref/fate/ffprobe_xml b/tests/ref/fate/ffprobe_xml index 988cfe5f39..3b41121902 100644 --- a/tests/ref/fate/ffprobe_xml +++ b/tests/ref/fate/ffprobe_xml @@ -33,14 +33,14 @@ - + - + @@ -48,7 +48,7 @@ - + diff --git a/tests/ref/fate/ffprobe_xsd b/tests/ref/fate/ffprobe_xsd index c37bb8a22d..d5eb0a3a46 100644 --- a/tests/ref/fate/ffprobe_xsd +++ b/tests/ref/fate/ffprobe_xsd @@ -33,14 +33,14 @@ - + - + @@ -48,7 +48,7 @@ - + diff --git a/tests/ref/fate/flv-demux b/tests/ref/fate/flv-demux index a9cbcc46e0..4e959e091e 100644 --- a/tests/ref/fate/flv-demux +++ b/tests/ref/fate/flv-demux @@ -601,6 +601,6 @@ packet|codec_type=video|stream_index=0|pts=11612|pts_time=11.612000|dts=11612|dt packet|codec_type=video|stream_index=0|pts=11645|pts_time=11.645000|dts=11645|dts_time=11.645000|duration=33|duration_time=0.033000|size=2600|pos=507811|flags=___|data_hash=CRC32:d35f9e6f packet|codec_type=audio|stream_index=1|pts=11656|pts_time=11.656000|dts=11656|dts_time=11.656000|duration=46|duration_time=0.046000|size=346|pos=510431|flags=K__|data_hash=CRC32:4e6b44cb packet|codec_type=video|stream_index=0|pts=11678|pts_time=11.678000|dts=11678|dts_time=11.678000|duration=33|duration_time=0.033000|size=1190|pos=510794|flags=__C|data_hash=CRC32:a0206c90 -stream|index=0|codec_name=h264|profile=77|codec_type=video|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|width=426|height=240|coded_width=426|coded_height=240|closed_captions=0|film_grain=0|has_b_frames=1|sample_aspect_ratio=1:1|display_aspect_ratio=71:40|pix_fmt=yuv420p|level=21|color_range=unknown|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=left|field_order=progressive|refs=1|is_avc=true|nal_length_size=4|missing_streams=0|id=N/A|r_frame_rate=30000/1001|avg_frame_rate=30/1|time_base=1/1000|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=393929|max_bit_rate=N/A|bits_per_raw_sample=8|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=351|extradata_size=39|extradata_hash=CRC32:07b85ca9|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0 -stream|index=1|codec_name=aac|profile=1|codec_type=audio|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|sample_fmt=fltp|sample_rate=22050|channels=2|channel_layout=stereo|bits_per_sample=0|initial_padding=0|missing_streams=0|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/1000|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=67874|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=252|extradata_size=2|extradata_hash=CRC32:d039c029|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0 +stream|index=0|codec_name=h264|profile=77|codec_type=video|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|width=426|height=240|coded_width=426|coded_height=240|closed_captions=0|film_grain=0|has_b_frames=1|sample_aspect_ratio=1:1|display_aspect_ratio=71:40|pix_fmt=yuv420p|level=21|color_range=unknown|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=left|field_order=progressive|refs=1|is_avc=true|nal_length_size=4|missing_streams=0|id=N/A|r_frame_rate=30000/1001|avg_frame_rate=30/1|time_base=1/1000|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=393929|max_bit_rate=N/A|bits_per_raw_sample=8|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=351|extradata_size=39|extradata_hash=CRC32:07b85ca9|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0 +stream|index=1|codec_name=aac|profile=1|codec_type=audio|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|sample_fmt=fltp|sample_rate=22050|channels=2|channel_layout=stereo|bits_per_sample=0|initial_padding=0|missing_streams=0|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/1000|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=67874|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=252|extradata_size=2|extradata_hash=CRC32:d039c029|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0 format|filename=Enigma_Principles_of_Lust-part.flv|nb_streams=2|nb_programs=0|nb_stream_groups=0|format_name=flv|start_time=0.000000|duration=210.209999|size=512000|bit_rate=19485|probe_score=100|tag:hasKeyframes=true|tag:hasMetadata=true|tag:datasize=11970544|tag:hasVideo=true|tag:canSeekToEnd=false|tag:lasttimestamp=210|tag:lastkeyframetimestamp=210|tag:audiosize=1791332|tag:hasAudio=true|tag:audiodelay=0|tag:videosize=10176110|tag:metadatadate=2011-02-27T11:00:33.125000Z|tag:metadatacreator=inlet media FLVTool2 v1.0.6 - http://www.inlet-media.de/flvtool2|tag:hasCuePoints=false diff --git a/tests/ref/fate/gapless-mp3-side-data b/tests/ref/fate/gapless-mp3-side-data index 87a99661f9..49ebc32dc8 100644 --- a/tests/ref/fate/gapless-mp3-side-data +++ b/tests/ref/fate/gapless-mp3-side-data @@ -593,5 +593,5 @@ packet|codec_type=audio|stream_index=0|pts=217866240|pts_time=15.438367|dts=2178 packet|codec_type=audio|stream_index=0|pts=218234880|pts_time=15.464490|dts=218234880|dts_time=15.464490|duration=368640|duration_time=0.026122|size=418|pos=248882|flags=K__|data_hash=CRC32:fbc83c3c packet|codec_type=audio|stream_index=0|pts=218603520|pts_time=15.490612|dts=218603520|dts_time=15.490612|duration=368640|duration_time=0.026122|size=418|pos=249300|flags=K__|data_hash=CRC32:d5fb5f9c|side_datum/skip_samples:side_data_type=Skip Samples|side_datum/skip_samples:skip_samples=0|side_datum/skip_samples:discard_padding=303|side_datum/skip_samples:skip_reason=0|side_datum/skip_samples:discard_reason=0 packet|codec_type=audio|stream_index=0|pts=218972160|pts_time=15.516735|dts=218972160|dts_time=15.516735|duration=368640|duration_time=0.026122|size=418|pos=249718|flags=K__|data_hash=CRC32:3789f3cf|side_datum/skip_samples:side_data_type=Skip Samples|side_datum/skip_samples:skip_samples=0|side_datum/skip_samples:discard_padding=1152|side_datum/skip_samples:skip_reason=0|side_datum/skip_samples:discard_reason=0 -stream|index=0|codec_name=mp3|profile=unknown|codec_type=audio|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|sample_fmt=fltp|sample_rate=44100|channels=2|channel_layout=stereo|bits_per_sample=0|initial_padding=0|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/14112000|start_pts=353600|start_time=0.025057|duration_ts=219340800|duration=15.542857|bit_rate=128000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=595|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:encoder=LAME3.93 +stream|index=0|codec_name=mp3|profile=unknown|codec_type=audio|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|sample_fmt=fltp|sample_rate=44100|channels=2|channel_layout=stereo|bits_per_sample=0|initial_padding=0|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/14112000|start_pts=353600|start_time=0.025057|duration_ts=219340800|duration=15.542857|bit_rate=128000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=595|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:encoder=LAME3.93 format|filename=gapless.mp3|nb_streams=1|nb_programs=0|nb_stream_groups=0|format_name=mp3|start_time=0.025057|duration=15.542857|size=250264|bit_rate=128812|probe_score=51|tag:title=test diff --git a/tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov b/tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov index 50dfed6e4d..7ecba80e0e 100644 --- a/tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov +++ b/tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov @@ -69,6 +69,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:language=eng TAG:handler_name=Module de gestion video TAG:vendor_id=FFMP diff --git a/tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov b/tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov index 79e3731a37..24369cce27 100644 --- a/tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov +++ b/tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov @@ -69,6 +69,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:language=eng TAG:handler_name=Module de gestion video TAG:vendor_id=FFMP diff --git a/tests/ref/fate/iamf-5_1-copy b/tests/ref/fate/iamf-5_1-copy index d3530702ee..bc4df7c57f 100644 --- a/tests/ref/fate/iamf-5_1-copy +++ b/tests/ref/fate/iamf-5_1-copy @@ -88,6 +88,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=1 @@ -110,6 +111,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=2 @@ -132,6 +134,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=3 @@ -154,6 +157,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] [STREAM_GROUP] @@ -235,6 +239,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=1 @@ -257,6 +262,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=2 @@ -279,6 +285,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=3 @@ -301,5 +308,6 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] diff --git a/tests/ref/fate/iamf-5_1-demux b/tests/ref/fate/iamf-5_1-demux index d3530702ee..bc4df7c57f 100644 --- a/tests/ref/fate/iamf-5_1-demux +++ b/tests/ref/fate/iamf-5_1-demux @@ -88,6 +88,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=1 @@ -110,6 +111,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=2 @@ -132,6 +134,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=3 @@ -154,6 +157,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] [STREAM_GROUP] @@ -235,6 +239,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=1 @@ -257,6 +262,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=2 @@ -279,6 +285,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=3 @@ -301,5 +308,6 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] diff --git a/tests/ref/fate/iamf-5_1_4 b/tests/ref/fate/iamf-5_1_4 index d516429d5d..fdee50b8e0 100644 --- a/tests/ref/fate/iamf-5_1_4 +++ b/tests/ref/fate/iamf-5_1_4 @@ -160,6 +160,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=1 @@ -182,6 +183,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=2 @@ -204,6 +206,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=3 @@ -226,6 +229,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=4 @@ -248,6 +252,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=5 @@ -270,6 +275,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] [STREAM_GROUP] @@ -367,6 +373,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=1 @@ -389,6 +396,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=2 @@ -411,6 +419,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=3 @@ -433,6 +442,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=4 @@ -455,6 +465,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=5 @@ -477,5 +488,6 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] diff --git a/tests/ref/fate/iamf-7_1_4 b/tests/ref/fate/iamf-7_1_4 index 4e6e62bbea..ccce96ea84 100644 --- a/tests/ref/fate/iamf-7_1_4 +++ b/tests/ref/fate/iamf-7_1_4 @@ -176,6 +176,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=1 @@ -198,6 +199,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=2 @@ -220,6 +222,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=3 @@ -242,6 +245,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=4 @@ -264,6 +268,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=5 @@ -286,6 +291,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=6 @@ -308,6 +314,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] [STREAM_GROUP] @@ -405,6 +412,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=1 @@ -427,6 +435,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=2 @@ -449,6 +458,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=3 @@ -471,6 +481,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=4 @@ -493,6 +504,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=5 @@ -515,6 +527,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=6 @@ -537,5 +550,6 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] diff --git a/tests/ref/fate/iamf-ambisonic_1 b/tests/ref/fate/iamf-ambisonic_1 index 84683b6ce5..e43f891597 100644 --- a/tests/ref/fate/iamf-ambisonic_1 +++ b/tests/ref/fate/iamf-ambisonic_1 @@ -99,6 +99,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=1 @@ -121,6 +122,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=2 @@ -143,6 +145,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=3 @@ -165,6 +168,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] [STREAM_GROUP] @@ -238,6 +242,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=1 @@ -260,6 +265,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=2 @@ -282,6 +288,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=3 @@ -304,5 +311,6 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] diff --git a/tests/ref/fate/iamf-stereo b/tests/ref/fate/iamf-stereo index 32fe47bf98..9b3f7e0a79 100644 --- a/tests/ref/fate/iamf-stereo +++ b/tests/ref/fate/iamf-stereo @@ -52,6 +52,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] [STREAM_GROUP] @@ -164,5 +165,6 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] diff --git a/tests/ref/fate/matroska-alac-remux b/tests/ref/fate/matroska-alac-remux index 1c27c625a4..9b73263acd 100644 --- a/tests/ref/fate/matroska-alac-remux +++ b/tests/ref/fate/matroska-alac-remux @@ -153,6 +153,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [FORMAT] TAG:title=Inside diff --git a/tests/ref/fate/matroska-mpegts-remux b/tests/ref/fate/matroska-mpegts-remux index 24fdf8f3f8..491e255d75 100644 --- a/tests/ref/fate/matroska-mpegts-remux +++ b/tests/ref/fate/matroska-mpegts-remux @@ -38,6 +38,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=1 @@ -59,4 +60,5 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] diff --git a/tests/ref/fate/matroska-side-data-pref-codec b/tests/ref/fate/matroska-side-data-pref-codec index 128ecdd423..2b67c0191f 100644 --- a/tests/ref/fate/matroska-side-data-pref-codec +++ b/tests/ref/fate/matroska-side-data-pref-codec @@ -310,6 +310,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:language=spa TAG:BPS-eng=216040 TAG:DURATION-eng=00:00:00.400000000 diff --git a/tests/ref/fate/matroska-side-data-pref-packet b/tests/ref/fate/matroska-side-data-pref-packet index a433ece6f4..b3b9427864 100644 --- a/tests/ref/fate/matroska-side-data-pref-packet +++ b/tests/ref/fate/matroska-side-data-pref-packet @@ -310,6 +310,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:language=spa TAG:BPS-eng=216040 TAG:DURATION-eng=00:00:00.400000000 diff --git a/tests/ref/fate/matroska-vp8-alpha-remux b/tests/ref/fate/matroska-vp8-alpha-remux index 6d2c18363d..03bb01fdb7 100644 --- a/tests/ref/fate/matroska-vp8-alpha-remux +++ b/tests/ref/fate/matroska-vp8-alpha-remux @@ -31,6 +31,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [SIDE_DATA] side_data_type=Stereo 3D type=2D diff --git a/tests/ref/fate/mov-heic-demux-still-image-grid b/tests/ref/fate/mov-heic-demux-still-image-grid index d8dfccea8f..f7d0b178e1 100644 --- a/tests/ref/fate/mov-heic-demux-still-image-grid +++ b/tests/ref/fate/mov-heic-demux-still-image-grid @@ -78,6 +78,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:title=Derived image [STREAM] index=0 @@ -100,6 +101,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=1 @@ -122,6 +124,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=2 @@ -144,6 +147,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=3 @@ -166,5 +170,6 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] diff --git a/tests/ref/fate/mov-heic-demux-still-image-iovl b/tests/ref/fate/mov-heic-demux-still-image-iovl index 2b211267a4..4a90220c34 100644 --- a/tests/ref/fate/mov-heic-demux-still-image-iovl +++ b/tests/ref/fate/mov-heic-demux-still-image-iovl @@ -54,6 +54,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:title=Derived image [STREAM] index=0 @@ -76,6 +77,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=1 @@ -98,5 +100,6 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] diff --git a/tests/ref/fate/mov-heic-demux-still-image-iovl-2 b/tests/ref/fate/mov-heic-demux-still-image-iovl-2 index 492f404a3c..3ee119ff6f 100644 --- a/tests/ref/fate/mov-heic-demux-still-image-iovl-2 +++ b/tests/ref/fate/mov-heic-demux-still-image-iovl-2 @@ -47,6 +47,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:title=Derived image [STREAM] index=0 @@ -69,5 +70,6 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] diff --git a/tests/ref/fate/mov-mp4-disposition-mpegts-remux b/tests/ref/fate/mov-mp4-disposition-mpegts-remux index 3d103c98cf..a06ef7cef8 100644 --- a/tests/ref/fate/mov-mp4-disposition-mpegts-remux +++ b/tests/ref/fate/mov-mp4-disposition-mpegts-remux @@ -44,7 +44,8 @@ adb3b95c07a5f3e0c86641dd62f01dae *tests/data/fate/mov-mp4-disposition-mpegts-rem "descriptions": 0, "metadata": 0, "dependent": 0, - "still_image": 0 + "still_image": 0, + "multilayer": 0 }, "side_data_list": [ { @@ -72,7 +73,8 @@ adb3b95c07a5f3e0c86641dd62f01dae *tests/data/fate/mov-mp4-disposition-mpegts-rem "descriptions": 1, "metadata": 0, "dependent": 0, - "still_image": 0 + "still_image": 0, + "multilayer": 0 }, "side_data_list": [ { diff --git a/tests/ref/fate/mov-mp4-iamf-5_1_4 b/tests/ref/fate/mov-mp4-iamf-5_1_4 index 36a94143b5..afaa620621 100644 --- a/tests/ref/fate/mov-mp4-iamf-5_1_4 +++ b/tests/ref/fate/mov-mp4-iamf-5_1_4 @@ -157,6 +157,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:language=und TAG:handler_name=SoundHandler TAG:vendor_id=[0][0][0][0] @@ -181,6 +182,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=1 @@ -203,6 +205,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=2 @@ -225,6 +228,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=3 @@ -247,6 +251,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=4 @@ -269,6 +274,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=5 @@ -291,6 +297,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] [STREAM_GROUP] @@ -385,6 +392,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:language=und TAG:handler_name=SoundHandler TAG:vendor_id=[0][0][0][0] @@ -409,6 +417,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=1 @@ -431,6 +440,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=2 @@ -453,6 +463,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=3 @@ -475,6 +486,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=4 @@ -497,6 +509,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=5 @@ -519,5 +532,6 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] diff --git a/tests/ref/fate/mov-mp4-iamf-7_1_4 b/tests/ref/fate/mov-mp4-iamf-7_1_4 index d5014387b6..e8b859121d 100644 --- a/tests/ref/fate/mov-mp4-iamf-7_1_4 +++ b/tests/ref/fate/mov-mp4-iamf-7_1_4 @@ -173,6 +173,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:language=und TAG:handler_name=SoundHandler TAG:vendor_id=[0][0][0][0] @@ -197,6 +198,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=1 @@ -219,6 +221,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=2 @@ -241,6 +244,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=3 @@ -263,6 +267,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=4 @@ -285,6 +290,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=5 @@ -307,6 +313,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=6 @@ -329,6 +336,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] [STREAM_GROUP] @@ -423,6 +431,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:language=und TAG:handler_name=SoundHandler TAG:vendor_id=[0][0][0][0] @@ -447,6 +456,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=1 @@ -469,6 +479,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=2 @@ -491,6 +502,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=3 @@ -513,6 +525,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=4 @@ -535,6 +548,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=5 @@ -557,6 +571,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=6 @@ -579,5 +594,6 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] diff --git a/tests/ref/fate/mov-mp4-iamf-ambisonic_1 b/tests/ref/fate/mov-mp4-iamf-ambisonic_1 index 088fc9a028..8de90c868f 100644 --- a/tests/ref/fate/mov-mp4-iamf-ambisonic_1 +++ b/tests/ref/fate/mov-mp4-iamf-ambisonic_1 @@ -96,6 +96,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:language=und TAG:handler_name=SoundHandler TAG:vendor_id=[0][0][0][0] @@ -120,6 +121,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=1 @@ -142,6 +144,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=2 @@ -164,6 +167,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=3 @@ -186,6 +190,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] [STREAM_GROUP] @@ -256,6 +261,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:language=und TAG:handler_name=SoundHandler TAG:vendor_id=[0][0][0][0] @@ -280,6 +286,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=1 @@ -302,6 +309,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=2 @@ -324,6 +332,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=3 @@ -346,5 +355,6 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=1 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] diff --git a/tests/ref/fate/mov-mp4-iamf-stereo b/tests/ref/fate/mov-mp4-iamf-stereo index bf141c6755..32027e6daf 100644 --- a/tests/ref/fate/mov-mp4-iamf-stereo +++ b/tests/ref/fate/mov-mp4-iamf-stereo @@ -49,6 +49,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:language=und TAG:handler_name=SoundHandler TAG:vendor_id=[0][0][0][0] @@ -73,6 +74,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] [STREAM_GROUP] @@ -182,6 +184,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:language=und TAG:handler_name=SoundHandler TAG:vendor_id=[0][0][0][0] @@ -206,5 +209,6 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [/STREAM_GROUP] diff --git a/tests/ref/fate/mov-zombie b/tests/ref/fate/mov-zombie index 0ff447ef40..10476bc49f 100644 --- a/tests/ref/fate/mov-zombie +++ b/tests/ref/fate/mov-zombie @@ -129,4 +129,4 @@ packet|codec_type=video|stream_index=0|pts=188623|pts_time=2.095811|dts=188622|d frame|media_type=video|stream_index=0|key_frame=0|pts=188623|pts_time=2.095811|pkt_dts=188622|pkt_dts_time=2.095800|best_effort_timestamp=188623|best_effort_timestamp_time=2.095811|duration=3003|duration_time=0.033367|pkt_pos=100846|pkt_size=974|width=160|height=240|crop_top=0|crop_bottom=0|crop_left=0|crop_right=0|pix_fmt=yuv420p|sample_aspect_ratio=2:1|pict_type=B|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=tv|color_space=smpte170m|color_primaries=smpte170m|color_transfer=bt709|chroma_location=topleft|side_datum/3x3_displaymatrix:side_data_type=3x3 displaymatrix|side_datum/3x3_displaymatrix:displaymatrix=\n00000000: 131072 0 0\n00000001: 0 65536 0\n00000002: 0 0 1073741824\n|side_datum/3x3_displaymatrix:rotation=0|side_datum/h_26_45__user_data_unregistered_sei_message:side_data_type=H.26[45] User Data Unregistered SEI message packet|codec_type=video|stream_index=0|pts=197632|pts_time=2.195911|dts=191625|dts_time=2.129167|duration=3003|duration_time=0.033367|size=580|pos=101820|flags=__C frame|media_type=video|stream_index=0|key_frame=0|pts=191626|pts_time=2.129178|pkt_dts=N/A|pkt_dts_time=N/A|best_effort_timestamp=191626|best_effort_timestamp_time=2.129178|duration=3003|duration_time=0.033367|pkt_pos=99180|pkt_size=1666|width=160|height=240|crop_top=0|crop_bottom=0|crop_left=0|crop_right=0|pix_fmt=yuv420p|sample_aspect_ratio=2:1|pict_type=P|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=tv|color_space=smpte170m|color_primaries=smpte170m|color_transfer=bt709|chroma_location=topleft|side_datum/3x3_displaymatrix:side_data_type=3x3 displaymatrix|side_datum/3x3_displaymatrix:displaymatrix=\n00000000: 131072 0 0\n00000001: 0 65536 0\n00000002: 0 0 1073741824\n|side_datum/3x3_displaymatrix:rotation=0|side_datum/h_26_45__user_data_unregistered_sei_message:side_data_type=H.26[45] User Data Unregistered SEI message -stream|index=0|codec_name=h264|profile=77|codec_type=video|codec_tag_string=avc1|codec_tag=0x31637661|width=160|height=240|coded_width=160|coded_height=240|closed_captions=0|film_grain=0|has_b_frames=1|sample_aspect_ratio=2:1|display_aspect_ratio=4:3|pix_fmt=yuv420p|level=12|color_range=tv|color_space=smpte170m|color_transfer=bt709|color_primaries=smpte170m|chroma_location=topleft|field_order=progressive|refs=2|is_avc=true|nal_length_size=4|id=0x1|r_frame_rate=30000/1001|avg_frame_rate=6372000/212521|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=2125200|duration=23.613333|bit_rate=333874|max_bit_rate=N/A|bits_per_raw_sample=8|nb_frames=708|nb_read_frames=65|nb_read_packets=66|extradata_size=34|disposition:default=1|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:creation_time=2008-05-12T20:59:27.000000Z|tag:language=eng|tag:handler_name=Apple Video Media Handler|tag:vendor_id=appl|tag:encoder=H.264|side_datum/display_matrix:side_data_type=Display Matrix|side_datum/display_matrix:displaymatrix=\n00000000: 131072 0 0\n00000001: 0 65536 0\n00000002: 0 0 1073741824\n|side_datum/display_matrix:rotation=0 +stream|index=0|codec_name=h264|profile=77|codec_type=video|codec_tag_string=avc1|codec_tag=0x31637661|width=160|height=240|coded_width=160|coded_height=240|closed_captions=0|film_grain=0|has_b_frames=1|sample_aspect_ratio=2:1|display_aspect_ratio=4:3|pix_fmt=yuv420p|level=12|color_range=tv|color_space=smpte170m|color_transfer=bt709|color_primaries=smpte170m|chroma_location=topleft|field_order=progressive|refs=2|is_avc=true|nal_length_size=4|id=0x1|r_frame_rate=30000/1001|avg_frame_rate=6372000/212521|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=2125200|duration=23.613333|bit_rate=333874|max_bit_rate=N/A|bits_per_raw_sample=8|nb_frames=708|nb_read_frames=65|nb_read_packets=66|extradata_size=34|disposition:default=1|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:creation_time=2008-05-12T20:59:27.000000Z|tag:language=eng|tag:handler_name=Apple Video Media Handler|tag:vendor_id=appl|tag:encoder=H.264|side_datum/display_matrix:side_data_type=Display Matrix|side_datum/display_matrix:displaymatrix=\n00000000: 131072 0 0\n00000001: 0 65536 0\n00000002: 0 0 1073741824\n|side_datum/display_matrix:rotation=0 diff --git a/tests/ref/fate/mxf-probe-applehdr10 b/tests/ref/fate/mxf-probe-applehdr10 index e322b592f6..e138dad3c7 100644 --- a/tests/ref/fate/mxf-probe-applehdr10 +++ b/tests/ref/fate/mxf-probe-applehdr10 @@ -55,6 +55,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:file_package_umid=0x060A2B340101010501010D201300000040ECCE167353449C92D6F2693A9F1D75 [SIDE_DATA] side_data_type=Mastering display metadata @@ -120,6 +121,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:file_package_umid=0x060A2B340101010501010D201300000040ECCE167353449C92D6F2693A9F1D75 [/STREAM] [STREAM] @@ -167,6 +169,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:file_package_umid=0x060A2B340101010501010D201300000040ECCE167353449C92D6F2693A9F1D75 [/STREAM] [FORMAT] diff --git a/tests/ref/fate/mxf-probe-d10 b/tests/ref/fate/mxf-probe-d10 index 130de39a5c..1e73c15222 100644 --- a/tests/ref/fate/mxf-probe-d10 +++ b/tests/ref/fate/mxf-probe-d10 @@ -56,6 +56,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:file_package_umid=0x060A2B340101010501010D1313000000AE86B200913105800000080046A54011 [SIDE_DATA] side_data_type=CPB properties @@ -111,6 +112,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:file_package_umid=0x060A2B340101010501010D1313000000AE86B200913105800000080046A54011 [/STREAM] [FORMAT] diff --git a/tests/ref/fate/mxf-probe-dnxhd b/tests/ref/fate/mxf-probe-dnxhd index c6e719a50f..bd09397013 100644 --- a/tests/ref/fate/mxf-probe-dnxhd +++ b/tests/ref/fate/mxf-probe-dnxhd @@ -37,6 +37,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:file_package_umid=0x060A2B340101010101010F001300000057DEEA25B7D80C94060E2B347F7F2A80 TAG:data_type=audio [/STREAM] @@ -79,6 +80,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:file_package_umid=0x060A2B340101010101010F001300000057DEEA25B7F40C94060E2B347F7F2A80 TAG:data_type=audio [/STREAM] @@ -121,6 +123,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:file_package_umid=0x060A2B340101010101010F001300000057DEEA25B8050C94060E2B347F7F2A80 TAG:data_type=video [/STREAM] @@ -181,6 +184,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:file_package_umid=0x060A2B340101010101010F001300000057DEEA25B84D0C94060E2B347F7F2A80 TAG:file_package_name=dnxhr_export.aaf TAG:reel_umid=0x060A2B340101010101010F001300000057DEEA1570895313060E2B347F7F2A80 diff --git a/tests/ref/fate/mxf-probe-dv25 b/tests/ref/fate/mxf-probe-dv25 index dcf13e79f0..ae23dbbe88 100644 --- a/tests/ref/fate/mxf-probe-dv25 +++ b/tests/ref/fate/mxf-probe-dv25 @@ -55,6 +55,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:file_package_umid=0x060A2B340101010501010D4313000000F2E2FCE98722F14F947F08DE1EF7A8DA [/STREAM] [STREAM] @@ -102,6 +103,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:file_package_umid=0x060A2B340101010501010D4313000000F2E2FCE98722F14F947F08DE1EF7A8DA [/STREAM] [STREAM] @@ -149,6 +151,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:file_package_umid=0x060A2B340101010501010D4313000000F2E2FCE98722F14F947F08DE1EF7A8DA [/STREAM] [FORMAT] diff --git a/tests/ref/fate/mxf-probe-j2k b/tests/ref/fate/mxf-probe-j2k index 517fbb99a3..f1dadf4209 100644 --- a/tests/ref/fate/mxf-probe-j2k +++ b/tests/ref/fate/mxf-probe-j2k @@ -55,6 +55,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 TAG:file_package_umid=0x060A2B340101010501010F201300000035E05073878E4B2FB69D2369F25ADFC9 TAG:file_package_name=File Package: SMPTE ST 422 / ST 2067-5 frame wrapping of JPEG 2000 codestreams TAG:track_name=Image Track diff --git a/tests/ref/fate/oggopus-demux b/tests/ref/fate/oggopus-demux index 05cdd94f43..03b7b76cf2 100644 --- a/tests/ref/fate/oggopus-demux +++ b/tests/ref/fate/oggopus-demux @@ -39,5 +39,5 @@ packet|codec_type=audio|stream_index=0|pts=35164|pts_time=0.732583|dts=35164|dts packet|codec_type=audio|stream_index=0|pts=36124|pts_time=0.752583|dts=36124|dts_time=0.752583|duration=960|duration_time=0.020000|size=217|pos=841|flags=K__|data_hash=CRC32:b04fe85a packet|codec_type=audio|stream_index=0|pts=37084|pts_time=0.772583|dts=37084|dts_time=0.772583|duration=960|duration_time=0.020000|size=217|pos=841|flags=K__|data_hash=CRC32:06797ece packet|codec_type=audio|stream_index=0|pts=38044|pts_time=0.792583|dts=38044|dts_time=0.792583|duration=356|duration_time=0.007417|size=359|pos=841|flags=K__|data_hash=CRC32:01ca3f8f|side_datum/skip_samples:side_data_type=Skip Samples|side_datum/skip_samples:skip_samples=0|side_datum/skip_samples:discard_padding=604|side_datum/skip_samples:skip_reason=0|side_datum/skip_samples:discard_reason=0 -stream|index=0|codec_name=opus|profile=unknown|codec_type=audio|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|sample_fmt=fltp|sample_rate=48000|channels=2|channel_layout=stereo|bits_per_sample=0|initial_padding=356|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/48000|start_pts=0|start_time=0.000000|duration_ts=38756|duration=0.807417|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=41|extradata_size=19|extradata_hash=CRC32:58ba5ff3|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:ENCODER=opusenc from opus-tools 0.1.9|tag:ENCODER_OPTIONS=--discard-comments +stream|index=0|codec_name=opus|profile=unknown|codec_type=audio|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|sample_fmt=fltp|sample_rate=48000|channels=2|channel_layout=stereo|bits_per_sample=0|initial_padding=356|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/48000|start_pts=0|start_time=0.000000|duration_ts=38756|duration=0.807417|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=41|extradata_size=19|extradata_hash=CRC32:58ba5ff3|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:ENCODER=opusenc from opus-tools 0.1.9|tag:ENCODER_OPTIONS=--discard-comments format|filename=intro-partial.opus|nb_streams=1|nb_programs=0|nb_stream_groups=0|format_name=ogg|start_time=0.000000|duration=0.807417|size=10250|bit_rate=101558|probe_score=100 diff --git a/tests/ref/fate/ts-demux b/tests/ref/fate/ts-demux index ec4aeb2034..45522c2bfb 100644 --- a/tests/ref/fate/ts-demux +++ b/tests/ref/fate/ts-demux @@ -23,7 +23,7 @@ packet|codec_type=audio|stream_index=2|pts=3912642700|pts_time=43473.807778|dts= packet|codec_type=video|stream_index=0|pts=3912686363|pts_time=43474.292922|dts=3912686363|dts_time=43474.292922|duration=1501|duration_time=0.016678|size=4944|pos=506660|flags=___|data_hash=CRC32:54a86cbb packet|codec_type=audio|stream_index=1|pts=3912644825|pts_time=43473.831389|dts=3912644825|dts_time=43473.831389|duration=2880|duration_time=0.032000|size=906|pos=474888|flags=K__|data_hash=CRC32:0893d398 packet|codec_type=audio|stream_index=2|pts=3912645580|pts_time=43473.839778|dts=3912645580|dts_time=43473.839778|duration=2880|duration_time=0.032000|size=354|pos=491808|flags=K__|data_hash=CRC32:f5963fa6 -stream|index=0|codec_name=mpeg2video|profile=4|codec_type=video|codec_tag_string=[2][0][0][0]|codec_tag=0x0002|width=1280|height=720|coded_width=0|coded_height=0|closed_captions=0|film_grain=0|has_b_frames=1|sample_aspect_ratio=1:1|display_aspect_ratio=16:9|pix_fmt=yuv420p|level=4|color_range=tv|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=left|field_order=progressive|refs=1|ts_id=32776|ts_packetsize=188|id=0x31|r_frame_rate=60000/1001|avg_frame_rate=60000/1001|time_base=1/90000|start_pts=3912669846|start_time=43474.109400|duration_ts=19519|duration=0.216878|bit_rate=15000000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=15|extradata_size=150|extradata_hash=CRC32:53134fa8|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|side_datum/cpb_properties:side_data_type=CPB properties|side_datum/cpb_properties:max_bitrate=15000000|side_datum/cpb_properties:min_bitrate=0|side_datum/cpb_properties:avg_bitrate=0|side_datum/cpb_properties:buffer_size=9781248|side_datum/cpb_properties:vbv_delay=-1 -stream|index=1|codec_name=ac3|profile=unknown|codec_type=audio|codec_tag_string=[4][0][0][0]|codec_tag=0x0004|sample_fmt=fltp|sample_rate=48000|channels=6|channel_layout=5.1(side)|bits_per_sample=0|initial_padding=0|ts_id=32776|ts_packetsize=188|id=0x34|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=3912633305|start_time=43473.703389|duration_ts=14400|duration=0.160000|bit_rate=384000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=5|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:language=eng -stream|index=2|codec_name=ac3|profile=unknown|codec_type=audio|codec_tag_string=[4][0][0][0]|codec_tag=0x0004|sample_fmt=fltp|sample_rate=48000|channels=2|channel_layout=stereo|bits_per_sample=0|initial_padding=0|ts_id=32776|ts_packetsize=188|id=0x35|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=3912634060|start_time=43473.711778|duration_ts=14400|duration=0.160000|bit_rate=192000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=5|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:language=es +stream|index=0|codec_name=mpeg2video|profile=4|codec_type=video|codec_tag_string=[2][0][0][0]|codec_tag=0x0002|width=1280|height=720|coded_width=0|coded_height=0|closed_captions=0|film_grain=0|has_b_frames=1|sample_aspect_ratio=1:1|display_aspect_ratio=16:9|pix_fmt=yuv420p|level=4|color_range=tv|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=left|field_order=progressive|refs=1|ts_id=32776|ts_packetsize=188|id=0x31|r_frame_rate=60000/1001|avg_frame_rate=60000/1001|time_base=1/90000|start_pts=3912669846|start_time=43474.109400|duration_ts=19519|duration=0.216878|bit_rate=15000000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=15|extradata_size=150|extradata_hash=CRC32:53134fa8|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|side_datum/cpb_properties:side_data_type=CPB properties|side_datum/cpb_properties:max_bitrate=15000000|side_datum/cpb_properties:min_bitrate=0|side_datum/cpb_properties:avg_bitrate=0|side_datum/cpb_properties:buffer_size=9781248|side_datum/cpb_properties:vbv_delay=-1 +stream|index=1|codec_name=ac3|profile=unknown|codec_type=audio|codec_tag_string=[4][0][0][0]|codec_tag=0x0004|sample_fmt=fltp|sample_rate=48000|channels=6|channel_layout=5.1(side)|bits_per_sample=0|initial_padding=0|ts_id=32776|ts_packetsize=188|id=0x34|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=3912633305|start_time=43473.703389|duration_ts=14400|duration=0.160000|bit_rate=384000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=5|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:language=eng +stream|index=2|codec_name=ac3|profile=unknown|codec_type=audio|codec_tag_string=[4][0][0][0]|codec_tag=0x0004|sample_fmt=fltp|sample_rate=48000|channels=2|channel_layout=stereo|bits_per_sample=0|initial_padding=0|ts_id=32776|ts_packetsize=188|id=0x35|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=3912634060|start_time=43473.711778|duration_ts=14400|duration=0.160000|bit_rate=192000|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=5|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0|tag:language=es format|filename=mp3ac325-4864-small.ts|nb_streams=3|nb_programs=1|nb_stream_groups=0|format_name=mpegts|start_time=43473.703389|duration=0.622889|size=512000|bit_rate=6575810|probe_score=50 diff --git a/tests/ref/fate/ts-opus-demux b/tests/ref/fate/ts-opus-demux index 961b7f2a92..d13b97aa6f 100644 --- a/tests/ref/fate/ts-opus-demux +++ b/tests/ref/fate/ts-opus-demux @@ -510,5 +510,5 @@ packet|codec_type=audio|stream_index=0|pts=914400|pts_time=10.160000|dts=914400| packet|codec_type=audio|stream_index=0|pts=916200|pts_time=10.180000|dts=916200|dts_time=10.180000|duration=1800|duration_time=0.020000|size=760|pos=508728|flags=K__|data_hash=CRC32:fdf0ce4a|side_datum/mpegts_stream_id:side_data_type=MPEGTS Stream ID|side_datum/mpegts_stream_id:id=189 packet|codec_type=audio|stream_index=0|pts=918000|pts_time=10.200000|dts=918000|dts_time=10.200000|duration=1800|duration_time=0.020000|size=761|pos=510044|flags=K__|data_hash=CRC32:75113c11|side_datum/mpegts_stream_id:side_data_type=MPEGTS Stream ID|side_datum/mpegts_stream_id:id=189 packet|codec_type=audio|stream_index=0|pts=919800|pts_time=10.220000|dts=919800|dts_time=10.220000|duration=1800|duration_time=0.020000|size=759|pos=510984|flags=K__|data_hash=CRC32:59fc266f|side_datum/mpegts_stream_id:side_data_type=MPEGTS Stream ID|side_datum/mpegts_stream_id:id=189 -stream|index=0|codec_name=opus|profile=unknown|codec_type=audio|codec_tag_string=Opus|codec_tag=0x7375704f|sample_fmt=fltp|sample_rate=48000|channels=8|channel_layout=7.1|bits_per_sample=0|initial_padding=0|ts_id=51338|ts_packetsize=188|id=0x44|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=919800|duration=10.220000|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=512|extradata_size=29|extradata_hash=CRC32:6d6089a7|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0 +stream|index=0|codec_name=opus|profile=unknown|codec_type=audio|codec_tag_string=Opus|codec_tag=0x7375704f|sample_fmt=fltp|sample_rate=48000|channels=8|channel_layout=7.1|bits_per_sample=0|initial_padding=0|ts_id=51338|ts_packetsize=188|id=0x44|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=0|start_time=0.000000|duration_ts=919800|duration=10.220000|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=512|extradata_size=29|extradata_hash=CRC32:6d6089a7|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0 format|filename=test-8-7.1.opus-small.ts|nb_streams=1|nb_programs=1|nb_stream_groups=0|format_name=mpegts|start_time=0.000000|duration=10.220000|size=512000|bit_rate=400782|probe_score=50 diff --git a/tests/ref/fate/ts-small-demux b/tests/ref/fate/ts-small-demux index 233f73393e..fad4a07541 100644 --- a/tests/ref/fate/ts-small-demux +++ b/tests/ref/fate/ts-small-demux @@ -72,5 +72,5 @@ packet|codec_type=video|stream_index=0|pts=546000|pts_time=6.066667|dts=546000|d packet|codec_type=video|stream_index=0|pts=552000|pts_time=6.133333|dts=552000|dts_time=6.133333|duration=6000|duration_time=0.066667|size=16|pos=15604|flags=___|data_hash=CRC32:cca62b67|side_datum/mpegts_stream_id:side_data_type=MPEGTS Stream ID|side_datum/mpegts_stream_id:id=224 packet|codec_type=video|stream_index=0|pts=558000|pts_time=6.200000|dts=558000|dts_time=6.200000|duration=6000|duration_time=0.066667|size=16|pos=15792|flags=___|data_hash=CRC32:27b943ef|side_datum/mpegts_stream_id:side_data_type=MPEGTS Stream ID|side_datum/mpegts_stream_id:id=224 packet|codec_type=video|stream_index=0|pts=564000|pts_time=6.266667|dts=564000|dts_time=6.266667|duration=6000|duration_time=0.066667|size=16|pos=16356|flags=___|data_hash=CRC32:f7116111 -stream|index=0|codec_name=h264|profile=578|codec_type=video|codec_tag_string=[27][0][0][0]|codec_tag=0x001b|width=82|height=144|coded_width=82|coded_height=144|closed_captions=0|film_grain=0|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=41:72|pix_fmt=yuv420p|level=10|color_range=unknown|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=left|field_order=progressive|refs=1|is_avc=false|nal_length_size=0|ts_id=1|ts_packetsize=188|id=0x100|r_frame_rate=15/1|avg_frame_rate=15/1|time_base=1/90000|start_pts=126000|start_time=1.400000|duration_ts=444000|duration=4.933333|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=8|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=74|extradata_size=35|extradata_hash=CRC32:e62cae27|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0 +stream|index=0|codec_name=h264|profile=578|codec_type=video|codec_tag_string=[27][0][0][0]|codec_tag=0x001b|width=82|height=144|coded_width=82|coded_height=144|closed_captions=0|film_grain=0|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=41:72|pix_fmt=yuv420p|level=10|color_range=unknown|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=left|field_order=progressive|refs=1|is_avc=false|nal_length_size=0|ts_id=1|ts_packetsize=188|id=0x100|r_frame_rate=15/1|avg_frame_rate=15/1|time_base=1/90000|start_pts=126000|start_time=1.400000|duration_ts=444000|duration=4.933333|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=8|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=74|extradata_size=35|extradata_hash=CRC32:e62cae27|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0 format|filename=h264small.ts|nb_streams=1|nb_programs=1|nb_stream_groups=0|format_name=mpegts|start_time=1.400000|duration=4.933333|size=16544|bit_rate=26828|probe_score=50 diff --git a/tests/ref/fate/ts-timed-id3-demux b/tests/ref/fate/ts-timed-id3-demux index 938b5326e4..3de1ca2990 100644 --- a/tests/ref/fate/ts-timed-id3-demux +++ b/tests/ref/fate/ts-timed-id3-demux @@ -1,4 +1,4 @@ packet|codec_type=data|stream_index=0|pts=126000|pts_time=1.400000|dts=126000|dts_time=1.400000|duration=N/A|duration_time=N/A|size=26|pos=564|flags=K__|data_hash=CRC32:469f474b|side_datum/mpegts_stream_id:side_data_type=MPEGTS Stream ID|side_datum/mpegts_stream_id:id=189 packet|codec_type=data|stream_index=0|pts=577350|pts_time=6.415000|dts=577350|dts_time=6.415000|duration=N/A|duration_time=N/A|size=26|pos=1316|flags=K__|data_hash=CRC32:469f474b|side_datum/mpegts_stream_id:side_data_type=MPEGTS Stream ID|side_datum/mpegts_stream_id:id=189 -stream|index=0|codec_name=timed_id3|profile=unknown|codec_type=data|codec_tag_string=ID3 |codec_tag=0x20334449|ts_id=1|ts_packetsize=188|id=0x100|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=126000|start_time=1.400000|duration_ts=451350|duration=5.015000|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=2|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0 +stream|index=0|codec_name=timed_id3|profile=unknown|codec_type=data|codec_tag_string=ID3 |codec_tag=0x20334449|ts_id=1|ts_packetsize=188|id=0x100|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=126000|start_time=1.400000|duration_ts=451350|duration=5.015000|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=2|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0 format|filename=id3.ts|nb_streams=1|nb_programs=1|nb_stream_groups=0|format_name=mpegts|start_time=1.400000|duration=5.015000|size=1504|bit_rate=2399|probe_score=2 diff --git a/tests/ref/fate/webm-webvtt-remux b/tests/ref/fate/webm-webvtt-remux index 3775926909..baf4c296a0 100644 --- a/tests/ref/fate/webm-webvtt-remux +++ b/tests/ref/fate/webm-webvtt-remux @@ -393,6 +393,7 @@ DISPOSITION:descriptions=1 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=1 @@ -415,6 +416,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=1 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=2 @@ -437,6 +439,7 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] [STREAM] index=3 @@ -459,4 +462,5 @@ DISPOSITION:descriptions=0 DISPOSITION:metadata=0 DISPOSITION:dependent=0 DISPOSITION:still_image=0 +DISPOSITION:multilayer=0 [/STREAM] From patchwork Wed Jul 3 21:26:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 50322 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:cc64:0:b0:482:c625:d099 with SMTP id k4csp3499923vqv; Wed, 3 Jul 2024 22:44:06 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVysKfYc5YLh1sa1rOdPHR6odBxpp51UD1IOAaGBDBRB1XMAcbVsd/Q1rtjbwgPLeT/GidSY8F2c65xACCnsZc69OJqdqc6pYArhA== X-Google-Smtp-Source: AGHT+IH0TuDEZStIB9OF4EELe+QhIWb+oKLIjDnZkPXGxhUgRzDVlBEOQjdPOlcnwkgYqb/y1PqM X-Received: by 2002:ac2:5def:0:b0:52c:a724:5ae3 with SMTP id 2adb3069b0e04-52ea06b748cmr245290e87.51.1720071846317; Wed, 03 Jul 2024 22:44:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720071846; cv=none; d=google.com; s=arc-20160816; b=uRLI4OaRCnsBZTB1P/FJf/kdH+K8gbPqQkDM4Vf5hYANj2xhBlvr6lBjSRv1WGKkyR g5dgwwsPAEwVHDipmovaftJtp/4GUua0A9amBP3mtj95ZFMb5a/sDfFdGzpV+At7Vhe6 QUKQMzNOLgYBGPNwp4R4IOwhidTT9QTkG5s74pdPfDkO4FME0qRBuYMq4NPOVlZKMqyy 1Urxb53njqoMl9VZGUkIurqxgEJCMH4+Rxcyyyj3qmu8PeNAm9876YlmgIaHqr9eTBDg BIRfpn9C1bGuxMiH76eHNzfrabHbUFOFTBF0RtXCm7hMF2kG4hUGi6p6Ytw4Ipew+p2R g1yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=NCf3xOMCVkwo5dAz76xixUdT0BVymfciig2FTp6O80c=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=S/JSBdAqOF6iBzjv79+qcnDMRdan4EcTXbaheBw9TshrZ3scAVwmwXgIx+YKJKkVg3 41W7HUm7NgE/3MK5hjA+ZSKIzS0uYgDQiXrM14Mnzr/jMc1iQewoXaJ9hmDroI92qzWC PfqsjLekSeREbcjwn4pBWoG3/0chitIXanbzJ58I8pkKFA9OPwBsePJnCnZYzqhaiuqo MOt0BVG93ImzCiSea33+IfDn8fMnb4iM00X9w9FLJvCb5a4g0q6ochX0vFk5gOJiRn8/ E6xcX71Bx8oNU6Qeth0QemxoOCQJCSwYS2k755YSmQYvs9/Gwvn6QSxsVuL9UhUAj0uv QD5Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=hnaMTCl7; 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 2adb3069b0e04-52e9ec8a55asi249779e87.254.2024.07.03.22.44.05; Wed, 03 Jul 2024 22:44:06 -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=20230601 header.b=hnaMTCl7; 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 A318868D9DD; Thu, 4 Jul 2024 00:26:47 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7D15F68D9D0 for ; Thu, 4 Jul 2024 00:26:37 +0300 (EEST) Received: by mail-pj1-f45.google.com with SMTP id 98e67ed59e1d1-2c8e7553c9eso7676a91.3 for ; Wed, 03 Jul 2024 14:26:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720041994; x=1720646794; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=+0IGK9/iigIY8wLr7tgaELOECAqTIj2mTE39NstjwaQ=; b=hnaMTCl7wGIwh0A/t7Dg5TTETNXfgNUBbhtp0zUvRGQFnxUwZ/EiSzbtR+Npd8soS3 MFCIxXSFcvstxLxMck3hIO64WW1+H8Ib55+0eIbU9ymxd95ZtTZ4q8XDD/LSU7af8GiJ +tLXepgNpzUHK9skktuNcBxwOBedVOTXYzrfMF8rie3JwB+bcvhT+gSd5eMJ6891JxJe NEDKJtHbVkZw/9llUkdzMoZV9R7uU2ZqxGdNkh9m4rfLaHWrB3RYa+XijJq9M0ImK6Ke Ypg6TpAVMuQ/x/eKrSivxDWElhg2F3CuLoWiooS7PkiAig9CnD78A674BBHWEGLOA6SZ 3EYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720041994; x=1720646794; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+0IGK9/iigIY8wLr7tgaELOECAqTIj2mTE39NstjwaQ=; b=kE8aU1TK4WzZeDDEUZJdMnFbulEBdRSe+AmdN3hyqQBzclEaEw633Fkc91X5ZzSNEi 91suwIKP1efWesUN6PIXuxBbhjyz5CfrOCs5I420TotbcltyKif2IDwPYrgRt+B3zmKP NVQisv4YMAmJyZzzLxzHX/zzs/amr739gOwksOgfrtf/yupXA948tqlh+7+I93x6TCCv uHARgX5pyw1qANc4PU45UBWPHFcBLWfRtvCib6lMIosy89hzqIGwj2Cmcq122qtKRmdy a0RpN7/aTQl7JKT6liW5uJ+wIXzWGyTR7ZKpPJF0+KBnd1pX+7gVQuFZXhaVMQL43I6C 9/Eg== X-Gm-Message-State: AOJu0YyYh0H8pyKhOdO5xyPHgoIrmcMKWJndw+L85KmdVPueB7BgeRU2 5MF03cxhyjRAOvo4gaYFKzIGWWFX973ARonlqdF45lW6tdbgTj7DoUzPqA== X-Received: by 2002:a17:90a:128a:b0:2c9:993b:e2fb with SMTP id 98e67ed59e1d1-2c9993be52emr177463a91.40.1720041994416; Wed, 03 Jul 2024 14:26:34 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c91ce58877sm11370560a91.24.2024.07.03.14.26.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:26:33 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 3 Jul 2024 18:26:38 -0300 Message-ID: <20240703212648.48483-3-jamrial@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240703212648.48483-1-jamrial@gmail.com> References: <20240703212648.48483-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 03/11] avformat/mov: Mark streams with a layered HEVC box as multilayer 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: DeK+UaVghM0c From: Derek Buitenhuis Signed-off-by: Derek Buitenhuis Signed-off-by: Anton Khirnov Signed-off-by: James Almer --- libavformat/mov.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index 30e8086855..b27666f50f 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -8200,6 +8200,8 @@ static int mov_read_lhvc(MOVContext *c, AVIOContext *pb, MOVAtom atom) st->codecpar->extradata[22] += num_arrays; memcpy(st->codecpar->extradata + old_size, buf + 6, atom.size + 8); + st->disposition |= AV_DISPOSITION_MULTILAYER; + av_free(buf); return 0; } From patchwork Wed Jul 3 21:26:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 50315 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:cc64:0:b0:482:c625:d099 with SMTP id k4csp3373449vqv; Wed, 3 Jul 2024 15:44:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX4RB0Qwv93DqP2u70tVwujF4HLxwOfGOMPQQs6cxmTPpv3WsUXgwGUtLvYfiX5dua52umE/B7tXj0wXjl8fN29h21NNOiAFusN2g== X-Google-Smtp-Source: AGHT+IHT75taaCntQnatBl9yk1LsIx4MIboHci07bUFjF4M7NlciAibJOxPSHjHfl0NJCfY9YvWz X-Received: by 2002:a05:6402:174d:b0:58c:8c63:22ee with SMTP id 4fb4d7f45d1cf-58c8c632339mr1986747a12.42.1720046653757; Wed, 03 Jul 2024 15:44:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720046653; cv=none; d=google.com; s=arc-20160816; b=rVyLIQo8jEXot5Gbn7oOzFV+pbL5SbMMqX+FXJ0unrw0xzbXqadEU/jHn1vzz2xugR MR6lDGJUdzWXNe5qZYBCxDzHx/j3yf1jFN3mvJtT9TnWmH45Om8QSHxi4NRkU8Srm3/z LgTJQVWmrdmUdv+Q5oNBGgOh5ZFYXAUPU8ndgenawr2i+s+xMv1kvvyFIDohWySYb3tk KaQuOCviSZ/+Y4nkku60nKqm+Oioi7TTQkFsNfwcTDcKELkdc0vRmKTQWgrHrfekWPx1 hAt6Ad++plaRMLmJGtyLWGZS4FmE2AaQ5UBgF0zDBoOZ8MxC1nQ7UUDrjMmFMlr7drnW tpLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=9UCKBUOr2bEVy86m3GvLYtCZ5Czi8tS+Qkcrqt31Nag=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=upXJlCPryBP8Rx6ntnkJi7yi0kdeQmjzjAVv8OJW/mVD6i+2w7bMA/Or5YL6zgfDb+ 8rBilRi0WP31MHWbSMrbrEcYMz1mMjWgktruRjvYOAwQnvSXJIhLEkPxqHs5SfhmY3E8 F+tJcKJzlwFJ3aIbqZpp9bBDA2l82+dbIv7/pewi0DZGi3WbVuBuIWh7Im3nrLPC3gm+ ncFie0s2XQUtRfHw2Gb4lbPoBXBx8ELSDNOki42J69rDImuZQApJYfE0e8x7dTf9wXRY g9Sb/J0hEeOu65rUxy2+C+Q9PQCbpqgZ5621C5aF0dXSP2wUTPfjpnFvmigxKqsqViAR KZQw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=YgQkaja5; 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 4fb4d7f45d1cf-58b87708e05si2049686a12.509.2024.07.03.15.44.13; Wed, 03 Jul 2024 15:44:13 -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=20230601 header.b=YgQkaja5; 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 CA0D168D9E9; Thu, 4 Jul 2024 00:26:50 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D438868D9C9 for ; Thu, 4 Jul 2024 00:26:38 +0300 (EEST) Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-2c5362c7c0bso15660a91.1 for ; Wed, 03 Jul 2024 14:26:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720041997; x=1720646797; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=sk6Z2qCfqwzrfZz9Jz9nus+KotBOXNbFKGACxmi4gQs=; b=YgQkaja5q+J0Uor4wVCXWrROzBZlmaryXnpjP65YlQFJyF5jR3XPJN/F35GAqj7c16 0KZTv7CQ0ljYV0OWWq4Y7IrV6PikfoVyV4y/qNSxOnaexsGOeCwBIdhHA9fIivaT9xq3 vrEiG1SkiJPGIyAyS+9u8nRMwpsZUDU3+17Nw+XSL7AXiJYwg3erirRBrQE6jhZXf/Cu 0Fniobd06MBEb957C30FhVATUAt5NNe2DQXPulqoFkpjgTfS7r3fFWjDIXwcNQV6thDF 9g/VYw2HV74tiJ1HZTEZPlUXQkAMCQCUMiYHr3Zayp1CZzGysh7gFyVkJQrKXWmdDFjb Eeug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720041997; x=1720646797; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sk6Z2qCfqwzrfZz9Jz9nus+KotBOXNbFKGACxmi4gQs=; b=dbRxZTN8bzQ9zXdJ/zB0AGXQypywJgOpkO4Rysde/xLm/Trk1mT04ZS2fzIuqAlRLR 8oZnUx0i3/ovJPopm/+6/6tslJYrQCqoY7ksP7Qay7+TdV5tYylKHnf1VEF99QFFLWKq w4drGZqJDq5Ebp3Ii56UMP8j5eCXscx7++AWML9tAkvoeLsS6CpU/KvIuCEmh6UgVlIL gauZuHPReYOOmuVLsGM4qaGl719NwwIG5kB7R+SUvWZvJ8ZSalfGOGr7vRXaIlUtwyzM +WrN8mVS1ei8YFX7k/FJNCFoV+Gk7wrCGdkOm8RRlisy/gHTncM3mznxFVmER70TOXfW xUeA== X-Gm-Message-State: AOJu0YwSjBduCaCd7SXWFEhLb9aALolGh7dlqg68O8fyBm3fQIVnqUv4 zmz/iEmUXJyGlGAtND8+ucVYDL4wskxPrpUIncUHgLZ8PUBi4co6Cium8A== X-Received: by 2002:a17:90b:214:b0:2c9:7803:1cf6 with SMTP id 98e67ed59e1d1-2c978031ee1mr2425404a91.20.1720041996509; Wed, 03 Jul 2024 14:26:36 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c91ce58877sm11370560a91.24.2024.07.03.14.26.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:26:35 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 3 Jul 2024 18:26:39 -0300 Message-ID: <20240703212648.48483-4-jamrial@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240703212648.48483-1-jamrial@gmail.com> References: <20240703212648.48483-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 04/11] avformat/hevc: don't write NALUs with nuh_layer_id > 0 in hvcC boxes 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 9Vh8S+9IfrUs hvcC should only contain nuh_layer_id == 0 NALUs. Support for a box meant to contain higher layer NALUs will be added in a following patch. To achieve this, all sources are parsed and filtered, including hvcC source that until now were propagated untouched. This is reflected in how the affected reference files now have ps_array_completeness set to 0 instead of 1 for some non-PS NALUs. Signed-off-by: James Almer --- libavformat/hevc.c | 140 ++++++++++++++++----- libavformat/hevc.h | 3 +- tests/ref/fate/enhanced-flv-hevc | 4 +- tests/ref/fate/matroska-dovi-write-config8 | 4 +- tests/ref/lavf-fate/hevc.flv | 2 +- 5 files changed, 118 insertions(+), 35 deletions(-) diff --git a/libavformat/hevc.c b/libavformat/hevc.c index d6b9d233d9..651c3b4b1d 100644 --- a/libavformat/hevc.c +++ b/libavformat/hevc.c @@ -40,12 +40,15 @@ enum { NB_ARRAYS }; +#define FLAG_ARRAY_COMPLETENESS (1 << 0) +#define FLAG_IS_NALFF (1 << 1) + typedef struct HVCCNALUnitArray { uint8_t array_completeness; uint8_t NAL_unit_type; uint16_t numNalus; uint16_t *nalUnitLength; - uint8_t **nalUnit; + const uint8_t **nalUnit; } HVCCNALUnitArray; typedef struct HEVCDecoderConfigurationRecord { @@ -654,24 +657,26 @@ static int hvcc_parse_pps(GetBitContext *gb, return 0; } -static void nal_unit_parse_header(GetBitContext *gb, uint8_t *nal_type) +static void nal_unit_parse_header(GetBitContext *gb, uint8_t *nal_type, + uint8_t *nuh_layer_id) { skip_bits1(gb); // forbidden_zero_bit *nal_type = get_bits(gb, 6); + *nuh_layer_id = get_bits(gb, 6); /* - * nuh_layer_id u(6) * nuh_temporal_id_plus1 u(3) */ - skip_bits(gb, 9); + skip_bits(gb, 3); } -static int hvcc_array_add_nal_unit(uint8_t *nal_buf, uint32_t nal_size, - uint8_t nal_type, int ps_array_completeness, +static int hvcc_array_add_nal_unit(const uint8_t *nal_buf, uint32_t nal_size, + uint8_t nal_type, int flags, HVCCNALUnitArray *array) { int ret; + int ps_array_completeness = !!(flags & FLAG_ARRAY_COMPLETENESS); uint16_t numNalus = array->numNalus; ret = av_reallocp_array(&array->nalUnit, numNalus + 1, sizeof(uint8_t*)); @@ -699,14 +704,14 @@ static int hvcc_array_add_nal_unit(uint8_t *nal_buf, uint32_t nal_size, return 0; } -static int hvcc_add_nal_unit(uint8_t *nal_buf, uint32_t nal_size, - int ps_array_completeness, +static int hvcc_add_nal_unit(const uint8_t *nal_buf, uint32_t nal_size, HEVCDecoderConfigurationRecord *hvcc, - unsigned array_idx) + int flags, unsigned array_idx) { int ret = 0; + int is_nalff = !!(flags & FLAG_IS_NALFF); GetBitContext gbc; - uint8_t nal_type; + uint8_t nal_type, nuh_layer_id; uint8_t *rbsp_buf; uint32_t rbsp_size; @@ -720,7 +725,9 @@ static int hvcc_add_nal_unit(uint8_t *nal_buf, uint32_t nal_size, if (ret < 0) goto end; - nal_unit_parse_header(&gbc, &nal_type); + nal_unit_parse_header(&gbc, &nal_type, &nuh_layer_id); + if (nuh_layer_id > 0) + goto end; /* * Note: only 'declarative' SEI messages are allowed in @@ -728,12 +735,17 @@ static int hvcc_add_nal_unit(uint8_t *nal_buf, uint32_t nal_size, * and non-declarative SEI messages discarded? */ ret = hvcc_array_add_nal_unit(nal_buf, nal_size, nal_type, - ps_array_completeness, + flags, &hvcc->arrays[array_idx]); if (ret < 0) goto end; if (hvcc->arrays[array_idx].numNalus == 1) hvcc->numOfArrays++; + + /* Don't parse parameter sets. We already have the needed information*/ + if (is_nalff) + goto end; + if (nal_type == HEVC_NAL_VPS) ret = hvcc_parse_vps(&gbc, hvcc); else if (nal_type == HEVC_NAL_SPS) @@ -1041,20 +1053,100 @@ int ff_hevc_annexb2mp4_buf(const uint8_t *buf_in, uint8_t **buf_out, return 0; } +static int hvcc_parse_nal_unit(const uint8_t *buf, uint32_t len, int type, + HEVCDecoderConfigurationRecord *hvcc, + int flags) +{ + for (unsigned i = 0; i < FF_ARRAY_ELEMS(hvcc->arrays); i++) { + static const uint8_t array_idx_to_type[] = + { HEVC_NAL_VPS, HEVC_NAL_SPS, HEVC_NAL_PPS, + HEVC_NAL_SEI_PREFIX, HEVC_NAL_SEI_SUFFIX }; + + if (type == array_idx_to_type[i]) { + int ret = hvcc_add_nal_unit(buf, len, hvcc, flags, i); + if (ret < 0) + return ret; + break; + } + } + + return 0; +} + int ff_isom_write_hvcc(AVIOContext *pb, const uint8_t *data, int size, int ps_array_completeness) { HEVCDecoderConfigurationRecord hvcc; - uint8_t *buf, *end, *start; + uint8_t *buf, *end, *start = NULL; + int flags = !!ps_array_completeness * FLAG_ARRAY_COMPLETENESS; int ret; if (size < 6) { /* We can't write a valid hvcC from the provided data */ return AVERROR_INVALIDDATA; } else if (*data == 1) { - /* Data is already hvcC-formatted */ - avio_write(pb, data, size); - return 0; + /* Data is already hvcC-formatted. Parse the arrays to skip any NALU + with nuh_layer_id > 0 */ + GetBitContext gbc; + int num_arrays; + + if (size < 23) + return AVERROR_INVALIDDATA; + + ret = init_get_bits8(&gbc, data, size); + if (ret < 0) + return ret; + + hvcc_init(&hvcc); + skip_bits(&gbc, 8); // hvcc.configurationVersion + hvcc.general_profile_space = get_bits(&gbc, 2); + hvcc.general_tier_flag = get_bits1(&gbc); + hvcc.general_profile_idc = get_bits(&gbc, 5); + hvcc.general_profile_compatibility_flags = get_bits_long(&gbc, 32); + hvcc.general_constraint_indicator_flags = get_bits64(&gbc, 48); + hvcc.general_level_idc = get_bits(&gbc, 8); + skip_bits(&gbc, 4); // reserved + hvcc.min_spatial_segmentation_idc = get_bits(&gbc, 12); + skip_bits(&gbc, 6); // reserved + hvcc.parallelismType = get_bits(&gbc, 2); + skip_bits(&gbc, 6); // reserved + hvcc.chromaFormat = get_bits(&gbc, 2); + skip_bits(&gbc, 5); // reserved + hvcc.bitDepthLumaMinus8 = get_bits(&gbc, 3); + skip_bits(&gbc, 5); // reserved + hvcc.bitDepthChromaMinus8 = get_bits(&gbc, 3); + hvcc.avgFrameRate = get_bits(&gbc, 16); + hvcc.constantFrameRate = get_bits(&gbc, 2); + hvcc.numTemporalLayers = get_bits(&gbc, 3); + hvcc.temporalIdNested = get_bits1(&gbc); + hvcc.lengthSizeMinusOne = get_bits(&gbc, 2); + + flags |= FLAG_IS_NALFF; + + num_arrays = get_bits(&gbc, 8); + for (int i = 0; i < num_arrays; i++) { + int type, num_nalus; + + skip_bits(&gbc, 2); + type = get_bits(&gbc, 6); + num_nalus = get_bits(&gbc, 16); + for (int j = 0; j < num_nalus; j++) { + int len = get_bits(&gbc, 16); + + if (len > (get_bits_left(&gbc) / 8)) + goto end; + + ret = hvcc_parse_nal_unit(data + get_bits_count(&gbc) / 8, + len, type, &hvcc, flags); + if (ret < 0) + goto end; + + skip_bits_long(&gbc, len * 8); + } + } + + ret = hvcc_write(pb, &hvcc); + goto end; } else if (!(AV_RB24(data) == 1 || AV_RB32(data) == 1)) { /* Not a valid Annex B start code prefix */ return AVERROR_INVALIDDATA; @@ -1075,19 +1167,9 @@ int ff_isom_write_hvcc(AVIOContext *pb, const uint8_t *data, buf += 4; - for (unsigned i = 0; i < FF_ARRAY_ELEMS(hvcc.arrays); i++) { - static const uint8_t array_idx_to_type[] = - { HEVC_NAL_VPS, HEVC_NAL_SPS, HEVC_NAL_PPS, - HEVC_NAL_SEI_PREFIX, HEVC_NAL_SEI_SUFFIX }; - - if (type == array_idx_to_type[i]) { - ret = hvcc_add_nal_unit(buf, len, ps_array_completeness, - &hvcc, i); - if (ret < 0) - goto end; - break; - } - } + ret = hvcc_parse_nal_unit(buf, len, type, &hvcc, flags); + if (ret < 0) + goto end; buf += len; } diff --git a/libavformat/hevc.h b/libavformat/hevc.h index 0f56325c1c..cb66ac66ac 100644 --- a/libavformat/hevc.h +++ b/libavformat/hevc.h @@ -79,7 +79,8 @@ int ff_hevc_annexb2mp4_buf(const uint8_t *buf_in, uint8_t **buf_out, int *size, int filter_ps, int *ps_count); /** - * Writes HEVC extradata (parameter sets, declarative SEI NAL units) to the + * Writes HEVC extradata (parameter sets and declarative SEI NAL units with + * nuh_layer_id == 0, as a HEVCDecoderConfigurationRecord) to the * provided AVIOContext. * * If the extradata is Annex B format, it gets converted to hvcC format before diff --git a/tests/ref/fate/enhanced-flv-hevc b/tests/ref/fate/enhanced-flv-hevc index f011d38a30..f04905d06b 100644 --- a/tests/ref/fate/enhanced-flv-hevc +++ b/tests/ref/fate/enhanced-flv-hevc @@ -1,6 +1,6 @@ -0da54607064548fa1aae5695751f189c *tests/data/fate/enhanced-flv-hevc.flv +565cf155790db391137f81f619448477 *tests/data/fate/enhanced-flv-hevc.flv 3603038 tests/data/fate/enhanced-flv-hevc.flv -#extradata 0: 551, 0xa18acf66 +#extradata 0: 551, 0xb1ddcd66 #extradata 1: 2, 0x00340022 #tb 0: 1/1000 #media_type 0: video diff --git a/tests/ref/fate/matroska-dovi-write-config8 b/tests/ref/fate/matroska-dovi-write-config8 index 472cbed708..44ca015e0e 100644 --- a/tests/ref/fate/matroska-dovi-write-config8 +++ b/tests/ref/fate/matroska-dovi-write-config8 @@ -1,6 +1,6 @@ -0730145aa317d800cb4bde0e3a38bb8d *tests/data/fate/matroska-dovi-write-config8.matroska +3bd4b07d5af6153516e4c0e66a71c8c9 *tests/data/fate/matroska-dovi-write-config8.matroska 3600607 tests/data/fate/matroska-dovi-write-config8.matroska -#extradata 0: 551, 0xa18acf66 +#extradata 0: 551, 0xb1ddcd66 #extradata 1: 2, 0x00340022 #tb 0: 1/1000 #media_type 0: video diff --git a/tests/ref/lavf-fate/hevc.flv b/tests/ref/lavf-fate/hevc.flv index 1105d8eddb..e3962e0938 100644 --- a/tests/ref/lavf-fate/hevc.flv +++ b/tests/ref/lavf-fate/hevc.flv @@ -1,3 +1,3 @@ -39cf3df5fc3a9c50ab71a294f45663fe *tests/data/lavf-fate/lavf.hevc.flv +c9e8b5df15135d21bd2781558f32f269 *tests/data/lavf-fate/lavf.hevc.flv 11819 tests/data/lavf-fate/lavf.hevc.flv tests/data/lavf-fate/lavf.hevc.flv CRC=0xd29da885 From patchwork Wed Jul 3 21:26:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 50308 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:cc64:0:b0:482:c625:d099 with SMTP id k4csp3347289vqv; Wed, 3 Jul 2024 14:27:24 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU3o4lkVVVhwIObCV9Afe15pKKWn4SyEPvVLdPGO3pCZECdqDSlvdwWQsqJlhym/OK6JPxJL/dXqBpC0eUwEVi4E9tCxrtb1oNIrg== X-Google-Smtp-Source: AGHT+IEsfUVG03E5h9HaoCfIAT/R8NCy8sFpC023wGOZDYRmeQGD8/E3KmxYLaIoWFMMvSKRZPeg X-Received: by 2002:a17:906:7310:b0:a72:750d:ab08 with SMTP id a640c23a62f3a-a75142d84eemr937928166b.14.1720042044191; Wed, 03 Jul 2024 14:27:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720042044; cv=none; d=google.com; s=arc-20160816; b=tDr1xhDQHHB+X+9G7k4es9SgGHiOFQw7ZI9G3WZu8ghKxBVQADkYR149b6f3lj2tYT yO7F7MD4OqgPway2/hzvH/iJANH8kHgG317ENMw5+truAGRSlkK5Mq4HBwxnDH2OMmQ0 UBQ31alIEdxXSkYeIQKJiNAEji+b9vxNovFrSXj3IW84m0nnCLJQusqQ+YW4PEDbDGvN U4fPLsIYr3HnzHLoof9pvV3zGukITJ4ISx7RNs+6v3AIody7hHAKt/w6XJK6nFg1sQi+ SB1nsaRF1phml616PBeNS9gdNACB/kUyL9JnnNETHOwmqw4EPpdy+EN4bRIEIwG//L5H 5qAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=wUBGaQvVXdNIxfFsJtA8YFAm+W1y+FsBzkkeaiP9tTY=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=kHxOftd4fv7ZpniIM2MHDrzYvWJZzGksOFIFLf3oxUIRy3n32uP6i43R1JFnh0aRZP SQMgkwx7QByrhSQmlxNrjpgdxxRHfHQhzFuK4NAOleouFod0KRT7dBXLmv3YYmczPt2r ze9xUgLUlRSUgSvkAacy/veYWmGhPONNkbn1T1CLEcLuPn7B4IvWI//ydZPM8ZUeXpID oQh1FXJkU4ooEPYPRlClgi4Edq8ofZI0BbuaG31OdZZup3EOE5QBE9jy08gGselvAduG oTUaGgIRFYEaUcSwMYZqYCabz6bLj6XnRhQgB5ttqJpDaAN5QjdjJhI91e5MzOIA6IKQ cW2g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=jtQVFHi7; 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 a640c23a62f3a-a72aaef7909si639379366b.195.2024.07.03.14.27.23; Wed, 03 Jul 2024 14:27:24 -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=20230601 header.b=jtQVFHi7; 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 1B4F468D9EB; Thu, 4 Jul 2024 00:26:52 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F048768D9C9 for ; Thu, 4 Jul 2024 00:26:40 +0300 (EEST) Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-2c8dccd0fa9so10002a91.2 for ; Wed, 03 Jul 2024 14:26:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720041998; x=1720646798; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=tPODYqDjo/Lbv38ORF1bA4thpTkTS58XNEVwZWncpUA=; b=jtQVFHi7x0fEbymcptwn096qA7/Vv3GMK9iHUBqAVBaDXPXvzQ2yOMiNvmtf4z7Im6 jTWeOhPSYCnGi1cgrsU5MtHAfO2ZftecRdVr+h9fk/D4bRjxlWnR+cG2q9rTGSy/pXvA Z9UFKvQ2OO5agLJ9GzbmJ6bJYpToP1o06apsB/oe+89qSEAfLkCnQ3O4fqWcWd7pNxr/ tOvZY9ZbNU8yn+0tOK/lzHybnoMU5g9b4uAY/F42V0J5NSu+cPaQ6VaZHOd/en/4fI24 JALjcCRiOHN7w28iwYsgC0VB+42EkYbfG7V7og97ujjyxei6By6L2Az1FFHEuDWW3+uC YY7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720041998; x=1720646798; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tPODYqDjo/Lbv38ORF1bA4thpTkTS58XNEVwZWncpUA=; b=Tz3LQJkV6r4uSgSaawwBaFDQBbhQO6zIRJckW1S2bnZ8+sckHhvzh4jGPLM56FrTkz N7NhEcS6rwDeC1BeRE97cwpJNe6TQtOOOLr0W0c9rH3mznb81WgL+ofsRq1QJ4Y4Q2sL sOFGOOQL3cX0j5K5JxcDaG+heqp+gCTGRoAFLKif1NErNuuw/3TgEUV/04yMxn5qHA3m BNw0/ryZ4XZ8Aj6UW994jywXRN6wI5oCzrITHncCURTf0UN12K4sSHXI5uxal6FnSIwn HHMs1gl5cSQGEhjDX1wQvx8LZSJTjmyqPUA1w4oDjRldYEq/L8wcu+9e37UFhh1RPGw6 dQNA== X-Gm-Message-State: AOJu0YwJy9rH6CScEslhjGwKHO3ZzxAkcBp3zVntTPvZzy6zgV9mEUgz 1slbKcvdba9HLm+EwyH1eqYAkkhoGwlHFd22suoMQ8C+TGg6zIaUz32xaw== X-Received: by 2002:a17:90a:fe0b:b0:2c9:8b33:3197 with SMTP id 98e67ed59e1d1-2c98b3338b0mr1242340a91.10.1720041998287; Wed, 03 Jul 2024 14:26:38 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c91ce58877sm11370560a91.24.2024.07.03.14.26.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:26:37 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 3 Jul 2024 18:26:40 -0300 Message-ID: <20240703212648.48483-5-jamrial@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240703212648.48483-1-jamrial@gmail.com> References: <20240703212648.48483-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 05/11] avformat/hevc: don't write the same array values per nal addition 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: JnlfBBXaUCmP Signed-off-by: James Almer --- libavformat/hevc.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/libavformat/hevc.c b/libavformat/hevc.c index 651c3b4b1d..40f46668f9 100644 --- a/libavformat/hevc.c +++ b/libavformat/hevc.c @@ -672,11 +672,9 @@ static void nal_unit_parse_header(GetBitContext *gb, uint8_t *nal_type, } static int hvcc_array_add_nal_unit(const uint8_t *nal_buf, uint32_t nal_size, - uint8_t nal_type, int flags, HVCCNALUnitArray *array) { int ret; - int ps_array_completeness = !!(flags & FLAG_ARRAY_COMPLETENESS); uint16_t numNalus = array->numNalus; ret = av_reallocp_array(&array->nalUnit, numNalus + 1, sizeof(uint8_t*)); @@ -689,18 +687,8 @@ static int hvcc_array_add_nal_unit(const uint8_t *nal_buf, uint32_t nal_size, array->nalUnit [numNalus] = nal_buf; array->nalUnitLength[numNalus] = nal_size; - array->NAL_unit_type = nal_type; array->numNalus++; - /* - * When the sample entry name is ‘hvc1’, the default and mandatory value of - * array_completeness is 1 for arrays of all types of parameter sets, and 0 - * for all other arrays. When the sample entry name is ‘hev1’, the default - * value of array_completeness is 0 for all arrays. - */ - if (nal_type == HEVC_NAL_VPS || nal_type == HEVC_NAL_SPS || nal_type == HEVC_NAL_PPS) - array->array_completeness = ps_array_completeness; - return 0; } @@ -710,6 +698,8 @@ static int hvcc_add_nal_unit(const uint8_t *nal_buf, uint32_t nal_size, { int ret = 0; int is_nalff = !!(flags & FLAG_IS_NALFF); + int ps_array_completeness = !!(flags & FLAG_ARRAY_COMPLETENESS); + HVCCNALUnitArray *const array = &hvcc->arrays[array_idx]; GetBitContext gbc; uint8_t nal_type, nuh_layer_id; uint8_t *rbsp_buf; @@ -734,13 +724,23 @@ static int hvcc_add_nal_unit(const uint8_t *nal_buf, uint32_t nal_size, * hvcC. Perhaps the SEI playload type should be checked * and non-declarative SEI messages discarded? */ - ret = hvcc_array_add_nal_unit(nal_buf, nal_size, nal_type, - flags, - &hvcc->arrays[array_idx]); + ret = hvcc_array_add_nal_unit(nal_buf, nal_size, array); if (ret < 0) goto end; - if (hvcc->arrays[array_idx].numNalus == 1) + if (array->numNalus == 1) { hvcc->numOfArrays++; + array->NAL_unit_type = nal_type; + + /* + * When the sample entry name is ‘hvc1’, the default and mandatory value of + * array_completeness is 1 for arrays of all types of parameter sets, and 0 + * for all other arrays. When the sample entry name is ‘hev1’, the default + * value of array_completeness is 0 for all arrays. + */ + if (nal_type == HEVC_NAL_VPS || nal_type == HEVC_NAL_SPS || + nal_type == HEVC_NAL_PPS) + array->array_completeness = ps_array_completeness; + } /* Don't parse parameter sets. We already have the needed information*/ if (is_nalff) From patchwork Wed Jul 3 21:26:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 50309 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:cc64:0:b0:482:c625:d099 with SMTP id k4csp3347342vqv; Wed, 3 Jul 2024 14:27:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXqU6z3WMm07vRk+BCXZKT4i2ZZSkYKFSCCSZ/TRI3rAdlg/v5CkcvtIwvQJlIVaf7PMk09kIDvKSiIIauIL9/3di4A3njYDg+JNw== X-Google-Smtp-Source: AGHT+IGIlBV/lCCvEqnjm1zP9slq+RK2eXTBPGofIY5GAhe4axTheinnsDeD6o2o4Xp9dYwfJnFT X-Received: by 2002:a05:6512:104f:b0:52c:deea:57cb with SMTP id 2adb3069b0e04-52e8264acc1mr11312884e87.3.1720042052997; Wed, 03 Jul 2024 14:27:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720042052; cv=none; d=google.com; s=arc-20160816; b=okBoc3WLE3Vg0p8dbsJPm+CZCCqPDCJE+XUOlFOZxI1FLNt8qUbJ+SOnuMlCuABcpe ckZM1gZgcusLnfek+H+JWAQGWM63Jpoze6xo4keYGR2hTl1ylcfy+yQhGZ+FvBT1kJ/8 enPl3Rgw1z+f45hw/JkMZ+sBUJgPr/TY8OG5lBmDc8HQQpVUNyv35rwA0fYAJ7Fcet0C oXQ/Iiq6E+U21+74VdpRCM+KN7KENteB5CiFuXGNVHTgLHBnGq5Ql0QmD6a1hze5vSgS bS/R9/T10amMcdWVXQFmlHjyE2PWm8jeSX0sFr3UrYX9fUGsR1JtdAS2kbczWYA+rlKu 2DHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=/lj0SIQVVBsozX8kQGqjEKB77gpRNG6GZjqKKfO3j+k=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=pzPI1rTvULT9Jk4XdUUbi+lrLcFqwjxd32cL3jgKMGpMqXqCq62G0pJjior/3foMw0 dSQVQ9e5si4G4VoTRuTNDpkN9d5Sy9rk+hfTWmQ+z6Jwi5yKe41LKXgGvd/B3iIr+8Iq qorIio396uP0Z6DjR0qg1ckQQ3xM76rG7xd75g1qOf+RYxnrAVlQ6CHkT7k0FOXhPpCk AaJszmAbtEK1LXkt94T+cpnhYB888wDeeTjvxdMxCQNr0dQxEbuHco61sLi57ZI5RhTx vATfe7lOspQLd0DYcO9Eiiau6qtzACwCpD97XUzLcaKDg0ZNn5hcC7BF+fv960Oqx5ae DmlQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=f8vKXRqi; 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 a640c23a62f3a-a72ab075538si595422066b.608.2024.07.03.14.27.32; Wed, 03 Jul 2024 14:27:32 -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=20230601 header.b=f8vKXRqi; 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 99D0D68D9F3; Thu, 4 Jul 2024 00:26:53 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DC32668D9DE for ; Thu, 4 Jul 2024 00:26:42 +0300 (EEST) Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-2c9785517c0so25634a91.0 for ; Wed, 03 Jul 2024 14:26:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720042000; x=1720646800; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=V2HXMlWRD1ybNqTLfPl3QMUgh/lmKyf6OlPg/hFHnzM=; b=f8vKXRqi9Yo7+cgkQS25LJDzJ0vxohyqPfKrsfCRWsixKMDBO43+3QLso7bUZrNf/U bKO9Y8hqbZEnXpjFkW8LkmWmIgo4pH9Wl6Y4Y6MUuKLIARGr2eVsgGJVy5I30NeJJGzr +LYLcLYgQVUoz1QU6xYianheRvUTMg1nTurNDGmnAGOibDsCjHwgMchgXHsEbCftGtFw DRPLf3T38K+UQeI1/E4xlYYdyPtLPJCWv/oJ556WVyeMdyaeXV76pFJ7MIQUGkSB7yLu 306r9Rp54suAmgP67bhq5Y5ns60hhNJ/rCMkLX/0VOiyFiPBKFGCiU6LzEd1YN5KsA+8 SYRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720042000; x=1720646800; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=V2HXMlWRD1ybNqTLfPl3QMUgh/lmKyf6OlPg/hFHnzM=; b=AiShEuVEkqGt01q9PwxHlmZE+8uRJkxcH5ho9ro1EUctgAx1yMG9j0+jnutE5mTf/O OZeIquXlN+Rd2BwhCg8rNe1J3adSLr8mJLInXeeWpAldBSxCqGHkYnj0t2/fRg4coFER 3MqMhTY8kzRHYSEwZC6kb8Z99G2YWrQenwo9gTqG7yO6WoY1qQjaQ2MW8LxZZ6Qkln8v KPI7FjjEJd71gGAKkHIG+QcVZQpvudKXlC+WEBaYT/Xw9yDdMneRWjzBmMzCtBqPeBm9 T4ehBQcez96qzeOvNSjnRjCb3QePEZBXX58NKkSu+RVACj9SIpMPUbRlKLyaO7hZzwy8 p/fg== X-Gm-Message-State: AOJu0YxgKce+W7fZHl80qeLw0WmRW7NZciSVmK9JTrhUdGVlAoz0jIHl O57K6hVS2ugUGLAhWAYOJh65g+38dPiAuzz5T0qo9LQAbPh0/DyqZGmKhw== X-Received: by 2002:a17:90a:517:b0:2c3:37e7:aaa8 with SMTP id 98e67ed59e1d1-2c93d785fa1mr7489789a91.46.1720042000019; Wed, 03 Jul 2024 14:26:40 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c91ce58877sm11370560a91.24.2024.07.03.14.26.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:26:39 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 3 Jul 2024 18:26:41 -0300 Message-ID: <20240703212648.48483-6-jamrial@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240703212648.48483-1-jamrial@gmail.com> References: <20240703212648.48483-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 06/11] avformat/hevc: use a single array for per-PS NALUs 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: vrqcPR6lKKsA Signed-off-by: James Almer --- libavformat/hevc.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/libavformat/hevc.c b/libavformat/hevc.c index 40f46668f9..6fe701032b 100644 --- a/libavformat/hevc.c +++ b/libavformat/hevc.c @@ -40,15 +40,20 @@ enum { NB_ARRAYS }; + #define FLAG_ARRAY_COMPLETENESS (1 << 0) #define FLAG_IS_NALFF (1 << 1) +typedef struct HVCCNALUnit { + uint16_t nalUnitLength; + const uint8_t *nalUnit; +} HVCCNALUnit; + typedef struct HVCCNALUnitArray { uint8_t array_completeness; uint8_t NAL_unit_type; uint16_t numNalus; - uint16_t *nalUnitLength; - const uint8_t **nalUnit; + HVCCNALUnit *nal; } HVCCNALUnitArray; typedef struct HEVCDecoderConfigurationRecord { @@ -674,19 +679,17 @@ static void nal_unit_parse_header(GetBitContext *gb, uint8_t *nal_type, static int hvcc_array_add_nal_unit(const uint8_t *nal_buf, uint32_t nal_size, HVCCNALUnitArray *array) { + HVCCNALUnit *nal; int ret; uint16_t numNalus = array->numNalus; - ret = av_reallocp_array(&array->nalUnit, numNalus + 1, sizeof(uint8_t*)); - if (ret < 0) - return ret; - - ret = av_reallocp_array(&array->nalUnitLength, numNalus + 1, sizeof(uint16_t)); + ret = av_reallocp_array(&array->nal, numNalus + 1, sizeof(*array->nal)); if (ret < 0) return ret; - array->nalUnit [numNalus] = nal_buf; - array->nalUnitLength[numNalus] = nal_size; + nal = &array->nal[numNalus]; + nal->nalUnit = nal_buf; + nal->nalUnitLength = nal_size; array->numNalus++; return 0; @@ -785,8 +788,7 @@ static void hvcc_close(HEVCDecoderConfigurationRecord *hvcc) for (unsigned i = 0; i < FF_ARRAY_ELEMS(hvcc->arrays); i++) { HVCCNALUnitArray *const array = &hvcc->arrays[i]; array->numNalus = 0; - av_freep(&array->nalUnit); - av_freep(&array->nalUnitLength); + av_freep(&array->nal); } } @@ -871,7 +873,7 @@ static int hvcc_write(AVIOContext *pb, HEVCDecoderConfigurationRecord *hvcc) for (unsigned k = 0; k < array->numNalus; k++) av_log(NULL, AV_LOG_TRACE, "nalUnitLength[%u][%u]: %"PRIu16"\n", - j, k, array->nalUnitLength[k]); + j, k, array->nal[k].nalUnitLength); j++; } @@ -972,12 +974,13 @@ static int hvcc_write(AVIOContext *pb, HEVCDecoderConfigurationRecord *hvcc) avio_wb16(pb, array->numNalus); for (unsigned j = 0; j < array->numNalus; j++) { + HVCCNALUnit *nal = &array->nal[j]; + /* unsigned int(16) nalUnitLength; */ - avio_wb16(pb, array->nalUnitLength[j]); + avio_wb16(pb, nal->nalUnitLength); /* bit(8*nalUnitLength) nalUnit; */ - avio_write(pb, array->nalUnit[j], - array->nalUnitLength[j]); + avio_write(pb, nal->nalUnit, nal->nalUnitLength); } } From patchwork Wed Jul 3 21:26:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 50311 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:cc64:0:b0:482:c625:d099 with SMTP id k4csp3359609vqv; Wed, 3 Jul 2024 15:04:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWonhwsM3MMCX+0NA/SD2PCTGgNk36IUXz06wbzOOmze5zWXSoGKoDTA81fb+ppzPhvoG2eLogUBIPTlSjMJ7gdnMRbki6d5X1z6Q== X-Google-Smtp-Source: AGHT+IGtXdHq7L/S73Ok0m8OFWSjaGFwY0VukBa/KwacYbDDQcyqsDWOrnLK0B448/qPsNuQs+ul X-Received: by 2002:a05:6512:ba3:b0:52c:884a:96c7 with SMTP id 2adb3069b0e04-52e9806f02emr1092617e87.17.1720044254395; Wed, 03 Jul 2024 15:04:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720044254; cv=none; d=google.com; s=arc-20160816; b=whC20o9p3hmKVXM7/CkdtuVwACtjZyS/lfm1roEx8RUT3JWQQiLA29J1GVVcTfwTzf PyFDCOV//0kdSOXCnBqIY9Ipdh1IJ9UpKZgAh+aEZnsfCkA9Nhm6mXbj3Iz2cz1u1Syn oIEvjchnEd/nXLhPeFckAtyUS8dRpeZrmvQJJpOyIcNOliLfoK9CYJUQqbKP3zDuCmEC XgC/jwFl7wGnc+9B9TBgx8CI2Rf9eLMV/dVbpXQ98BZ3j+4K9FL2TCbnrV9Vt7yeM9ae 5z4u1x6wLLQqpbH9HWi6+JljWmrZ0GcuvdjhtoO7l4nhizU2csXCxbBGMbarRbi64Rov wyJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=k8glWCWBm60R/Dl/gsY+QJfQms2oYsEJMGWToDIWUks=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=eoyWtDcZnPJNxbNSmvLySxEEGZU8N4I7d4cNe6nH7G0An14zFIAz1jT9tTSbFj4S0v I0xSzWIeNQJMxgJ6nxu0GTvIjZ9sqnslYMAI+mQvvkDRAhHLDsioySJbH5tkFhASnAJw VVMlQyj1klmGsVTsSJltnJAtOpHp7GLuOPQUad2wYfKYDnC7aFsCrql5E/3YJqsh1zC2 z/xptqPp0zyHf1fX1VMRvFOvyoAfvUnyBRS5YnpCFnifroLO27ayJ/6ptvT3QS9ZgAgc j3OAWoCxTkFcpo4wzIf118fI5MNxnhVs2RWe+WGGKHn8xvALmckLAAdwb8luh0ufZs/k q0Cg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=aSI97UMq; 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 2adb3069b0e04-52e99fde613si514265e87.489.2024.07.03.15.04.13; Wed, 03 Jul 2024 15:04:14 -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=20230601 header.b=aSI97UMq; 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 8E6DB68D9F9; Thu, 4 Jul 2024 00:26:59 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 03BC268D9D9 for ; Thu, 4 Jul 2024 00:26:44 +0300 (EEST) Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-2c98a97d1ccso486199a91.0 for ; Wed, 03 Jul 2024 14:26:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720042002; x=1720646802; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=gvV8Gj+m+J+xMhyM7QmloZA8svS0YYcW5QZNqcudWfw=; b=aSI97UMqMNtEvhTXQXx/sXVThvHeT69bIOWIY2UCbZouQ8vaM34noYcsFWsazDMdFF FtA+POBEHpyLXZ8ZvszhiQca6wxXW0MtaYp/XtwIHFhT2Z+w1cBXFbbMV+ckQRO+RC3P 4dmUzVe7GCAR9nZn5HSmSni4TJmmUDSBUxZQAQE1z2nYKKIgoLUN5a1DPOt4pz+eo2Et lM0zsgZLnbAwQP8Yf1XIIJyHfwhCP9LUhKaBraPX0jfWToiewWU9aItikWntSsN0HSzj VSudTr+IS7I6hQkqsAbeQe+XcABFFDa1TpHVPomWFBWqAYchRMtSmEpNa8X3xY6myYwu zvXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720042002; x=1720646802; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gvV8Gj+m+J+xMhyM7QmloZA8svS0YYcW5QZNqcudWfw=; b=FvPdzcuWAlD+Y2yblfS0vdbjJmGyrjghechTo7I5P/6usncuMjIG8zbq+oP7ls0Z2G h95ItxYnDRc1I5qktgh3tJJpK2OKt8iWFk+xUJcdjNOKBSa6aVCtv2wM2eGrtMD+JEC0 q6gyCVYwQEwQAsVVdA4C6yiyNtU9yXmXl6kRW9nKO5IfwyHV/p3jYJXeFv8hs0M0nGvJ 8E5/SGNKlmKpuqXJE5RkkdxI2OdKZg1wZlh2ttQTh0m1Qjb1k/RylBNTqRkgnfuesau4 z4YwRq6qid34f8eW6SLtpBNqZFjsgg/7OaGJreQDJ7X8HQIDWX/ZMlDCKeQ7PnShgjnF o38g== X-Gm-Message-State: AOJu0YxhM8/J8XauWmVCGo0geEdkPSEg5ZrLK02QWe5zhgt5DHjMd6hi CkYDE2YbH3Cf6M4CzYi0LsATVW4/ghnExNOQFx1hfO0gjyHNNS5O94nu7Q== X-Received: by 2002:a17:90b:3616:b0:2c9:7343:71f1 with SMTP id 98e67ed59e1d1-2c97ad175cbmr4440422a91.14.1720042001856; Wed, 03 Jul 2024 14:26:41 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c91ce58877sm11370560a91.24.2024.07.03.14.26.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:26:41 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 3 Jul 2024 18:26:42 -0300 Message-ID: <20240703212648.48483-7-jamrial@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240703212648.48483-1-jamrial@gmail.com> References: <20240703212648.48483-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 07/11] avformat/hevc: store parameter set and layer IDs in HVCCNALUnit 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: qLldv0vnF7pi Signed-off-by: James Almer --- libavformat/hevc.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/libavformat/hevc.c b/libavformat/hevc.c index 6fe701032b..f3e5542699 100644 --- a/libavformat/hevc.c +++ b/libavformat/hevc.c @@ -45,6 +45,8 @@ enum { #define FLAG_IS_NALFF (1 << 1) typedef struct HVCCNALUnit { + uint8_t nuh_layer_id; + uint8_t parameter_set_id; uint16_t nalUnitLength; const uint8_t *nalUnit; } HVCCNALUnit; @@ -378,17 +380,17 @@ static void skip_sub_layer_ordering_info(GetBitContext *gb) get_ue_golomb_long(gb); // max_latency_increase_plus1 } -static int hvcc_parse_vps(GetBitContext *gb, +static int hvcc_parse_vps(GetBitContext *gb, HVCCNALUnit *nal, HEVCDecoderConfigurationRecord *hvcc) { unsigned int vps_max_sub_layers_minus1; + nal->parameter_set_id = get_bits(gb, 4); /* - * vps_video_parameter_set_id u(4) * vps_reserved_three_2bits u(2) * vps_max_layers_minus1 u(6) */ - skip_bits(gb, 12); + skip_bits(gb, 8); vps_max_sub_layers_minus1 = get_bits(gb, 3); @@ -501,7 +503,7 @@ static int parse_rps(GetBitContext *gb, unsigned int rps_idx, return 0; } -static int hvcc_parse_sps(GetBitContext *gb, +static int hvcc_parse_sps(GetBitContext *gb, HVCCNALUnit *nal, HEVCDecoderConfigurationRecord *hvcc) { unsigned int i, sps_max_sub_layers_minus1, log2_max_pic_order_cnt_lsb_minus4; @@ -526,7 +528,7 @@ static int hvcc_parse_sps(GetBitContext *gb, hvcc_parse_ptl(gb, hvcc, sps_max_sub_layers_minus1); - get_ue_golomb_long(gb); // sps_seq_parameter_set_id + nal->parameter_set_id = get_ue_golomb_long(gb); hvcc->chromaFormat = get_ue_golomb_long(gb); @@ -605,12 +607,12 @@ static int hvcc_parse_sps(GetBitContext *gb, return 0; } -static int hvcc_parse_pps(GetBitContext *gb, +static int hvcc_parse_pps(GetBitContext *gb, HVCCNALUnit *nal, HEVCDecoderConfigurationRecord *hvcc) { uint8_t tiles_enabled_flag, entropy_coding_sync_enabled_flag; - get_ue_golomb_long(gb); // pps_pic_parameter_set_id + nal->parameter_set_id = get_ue_golomb_long(gb); // pps_pic_parameter_set_id get_ue_golomb_long(gb); // pps_seq_parameter_set_id /* @@ -703,6 +705,7 @@ static int hvcc_add_nal_unit(const uint8_t *nal_buf, uint32_t nal_size, int is_nalff = !!(flags & FLAG_IS_NALFF); int ps_array_completeness = !!(flags & FLAG_ARRAY_COMPLETENESS); HVCCNALUnitArray *const array = &hvcc->arrays[array_idx]; + HVCCNALUnit *nal; GetBitContext gbc; uint8_t nal_type, nuh_layer_id; uint8_t *rbsp_buf; @@ -745,16 +748,19 @@ static int hvcc_add_nal_unit(const uint8_t *nal_buf, uint32_t nal_size, array->array_completeness = ps_array_completeness; } + nal = &array->nal[array->numNalus-1]; + nal->nuh_layer_id = nuh_layer_id; + /* Don't parse parameter sets. We already have the needed information*/ if (is_nalff) goto end; if (nal_type == HEVC_NAL_VPS) - ret = hvcc_parse_vps(&gbc, hvcc); + ret = hvcc_parse_vps(&gbc, nal, hvcc); else if (nal_type == HEVC_NAL_SPS) - ret = hvcc_parse_sps(&gbc, hvcc); + ret = hvcc_parse_sps(&gbc, nal, hvcc); else if (nal_type == HEVC_NAL_PPS) - ret = hvcc_parse_pps(&gbc, hvcc); + ret = hvcc_parse_pps(&gbc, nal, hvcc); if (ret < 0) goto end; From patchwork Wed Jul 3 21:26:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 50314 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:cc64:0:b0:482:c625:d099 with SMTP id k4csp3373426vqv; Wed, 3 Jul 2024 15:44:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUAcX0PDOgsSjvRETB5TcWvmw8Jf/dCKDcac6BzMu0jweItSG5b04mMdllDvK6an/yw2+TmtcAaH9dxToWNGwYWJaIi/vOEZ4W1Fg== X-Google-Smtp-Source: AGHT+IHLlQEzGNe1I/smQ6n3Yu8jRfC+FdBQxf4WLbN5MJR0y+ZgABjnHYBlVU5xMImZdhgeiKtz X-Received: by 2002:ac2:4e07:0:b0:52e:9407:ddcd with SMTP id 2adb3069b0e04-52e9407dee1mr3146505e87.18.1720046651917; Wed, 03 Jul 2024 15:44:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720046651; cv=none; d=google.com; s=arc-20160816; b=01oFrH1uHqQ+03TFVGnZpfMHFb7Fc6Cwzgu9wU6tdHqL84UY+3jGARfpdefi3F1Zjr 96nvY4Q3n2hjb1Gxh5HXKzqCZ9NsRfcXXXysxGksPBiAHpaBzeounTpdtrvbuR1NlUkX 6eXl2Rr1dwvcvFsP/ducp+L6uOT95XfirTvYAZST1c9xHE4fuS1ScM8eDplAxAUVxttE sPT6AWBdHD/fYwgoC/R+FfR7WQkFQUSKsQCb2Wq3pSisuayj5Ea7rAkTT0T0mJpvRuCL qPZwr951JJtGH5PeE2aw4acJ3fu9PNmWcNU25T9nELz5Y6uNi2j48Oi726q/vj4fBL85 +41Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=ghQeOpwCjpQLQbwsD1ZKFEEpH3QavAPdToHqJB6DI9Q=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=h10INwLg6ci9AUXvkgSvBMrky7LRHn+V93Ahaza2Sx0PFXOKF3JNACPLhW11yIHx6f DduoqrB8Nkqlop83jHlUPe14CVhHaBrwkK9gx4rFVslVsMN+6vj/72XIOLs1K7W8WHKv vr64XuVQruN2fZWtAihwN7dIqCRzYWxiaI12mrv4dFYMGbBW4difijcMYalMrxr9uVKM zd3Q/4XMR4oDSwMMwUmldPF7y5JDlc/eKcn8bHFpHeNJ6P1vTMuzxc9g8TxD4ORUPQck hI/+7bnmyoYzimeRTlObfGZnIj4FcrS89OfP5x3iwhmK01imsIVdhMQRQUbb5y/vgWt8 bRUw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=XrUkussO; 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 2adb3069b0e04-52e937c5d4dsi946323e87.156.2024.07.03.15.44.11; Wed, 03 Jul 2024 15:44:11 -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=20230601 header.b=XrUkussO; 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 0D71968DA03; Thu, 4 Jul 2024 00:27:01 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F210868D9EA for ; Thu, 4 Jul 2024 00:26:45 +0300 (EEST) Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-656d8b346d2so3626179a12.2 for ; Wed, 03 Jul 2024 14:26:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720042004; x=1720646804; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Tur/rmSdZstO/C+2iI+F+y6q1ynnoTdxx6CScD5fMX4=; b=XrUkussOHxAlbA56zHXHyTtQD4Z9T0/IJ7t9sxQ6xJkvH0zxm1IY+hOvJGU871WDMy QRicMqDev5rNxslDuJZcb+bZ+Tq1QVtZ0LpKSwPsrrDem5nNoaalmub1VT+2fGx6VBtk Rdk48mHRVBv9EkvhLPLmNOfqmaGaSLwikRxMsy0qYPKPV9/xLw3TAHl4cEKj1lptH5sR RNidfMH9PHopRszVD/20gtuhSAjbntuxWRV3vrOLuw57hCv0/rLWk8i4XKXQ7dNyTP71 SFp7AulQ4KbLU4mCripETCYlGGSy7kqH3V9C3kDjqLFV5Hy0m2Xb3Cwi8mGmBVVtY5+I 0oGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720042004; x=1720646804; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Tur/rmSdZstO/C+2iI+F+y6q1ynnoTdxx6CScD5fMX4=; b=FX5Yvc3WDrgmrTsqv5tkEsrYtR7eZMamjKnY+RdYAI/csaRA7341mNfCs2J/J1Buo6 Ew/t+cJrxsAgf4wUT/yl46Ggi040vpeIjYeBIB8iJdjA/H7C/5YCLwsj+SPD6rzEVlqc 0ZV9k4+5IrkrJsp2MNziEBUhX5UOvTsKdov/zMzAmRJx5R1SfPNuDSRE2JE1b2WdrxjA 4koHlJe3gQ0FbTvrIY7OKlBAv93CkCUQFkA1/xLM3z2W5VP/2aF208pR3Jp1cbeavUL1 VZTi7n2GIRe91oVNwRsN5UUM1uc3zhWrmnSLl+bUKTlMmic7x6r8a8Lqu9q6egVT+38L 093Q== X-Gm-Message-State: AOJu0YyStKI4kSthMMior3/FfyyiE31/Bm08ow++Bhd2YsD24dKoaQYy uS1vDuE0KHHVKH37e7CTuiMAGEardQ80mxm2hgzDwFBaxRywY48zklgzqw== X-Received: by 2002:a17:90a:55c2:b0:2c6:ee50:5af4 with SMTP id 98e67ed59e1d1-2c93d6d49acmr9143671a91.6.1720042003662; Wed, 03 Jul 2024 14:26:43 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c91ce58877sm11370560a91.24.2024.07.03.14.26.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:26:43 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 3 Jul 2024 18:26:43 -0300 Message-ID: <20240703212648.48483-8-jamrial@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240703212648.48483-1-jamrial@gmail.com> References: <20240703212648.48483-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 08/11] avformat/hevc: add a function to write a lhvC box 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: TrmioaTN1PZJ Signed-off-by: James Almer --- libavformat/hevc.c | 163 +++++++++++++++++++++++++++++++++++---------- libavformat/hevc.h | 17 +++++ 2 files changed, 145 insertions(+), 35 deletions(-) diff --git a/libavformat/hevc.c b/libavformat/hevc.c index f3e5542699..69e6f719e5 100644 --- a/libavformat/hevc.c +++ b/libavformat/hevc.c @@ -43,12 +43,16 @@ enum { #define FLAG_ARRAY_COMPLETENESS (1 << 0) #define FLAG_IS_NALFF (1 << 1) +#define FLAG_IS_LHVC (1 << 2) typedef struct HVCCNALUnit { uint8_t nuh_layer_id; uint8_t parameter_set_id; uint16_t nalUnitLength; const uint8_t *nalUnit; + + // VPS + uint8_t vps_max_sub_layers_minus1; } HVCCNALUnit; typedef struct HVCCNALUnitArray { @@ -383,8 +387,6 @@ static void skip_sub_layer_ordering_info(GetBitContext *gb) static int hvcc_parse_vps(GetBitContext *gb, HVCCNALUnit *nal, HEVCDecoderConfigurationRecord *hvcc) { - unsigned int vps_max_sub_layers_minus1; - nal->parameter_set_id = get_bits(gb, 4); /* * vps_reserved_three_2bits u(2) @@ -392,7 +394,7 @@ static int hvcc_parse_vps(GetBitContext *gb, HVCCNALUnit *nal, */ skip_bits(gb, 8); - vps_max_sub_layers_minus1 = get_bits(gb, 3); + nal->vps_max_sub_layers_minus1 = get_bits(gb, 3); /* * numTemporalLayers greater than 1 indicates that the stream to which this @@ -403,7 +405,7 @@ static int hvcc_parse_vps(GetBitContext *gb, HVCCNALUnit *nal, * that it is unknown whether the stream is temporally scalable. */ hvcc->numTemporalLayers = FFMAX(hvcc->numTemporalLayers, - vps_max_sub_layers_minus1 + 1); + nal->vps_max_sub_layers_minus1 + 1); /* * vps_temporal_id_nesting_flag u(1) @@ -411,7 +413,7 @@ static int hvcc_parse_vps(GetBitContext *gb, HVCCNALUnit *nal, */ skip_bits(gb, 17); - hvcc_parse_ptl(gb, hvcc, vps_max_sub_layers_minus1); + hvcc_parse_ptl(gb, hvcc, nal->vps_max_sub_layers_minus1); /* nothing useful for hvcC past this point */ return 0; @@ -508,10 +510,33 @@ static int hvcc_parse_sps(GetBitContext *gb, HVCCNALUnit *nal, { unsigned int i, sps_max_sub_layers_minus1, log2_max_pic_order_cnt_lsb_minus4; unsigned int num_short_term_ref_pic_sets, num_delta_pocs[HEVC_MAX_SHORT_TERM_REF_PIC_SETS]; + unsigned int sps_ext_or_max_sub_layers_minus1, multi_layer_ext_sps_flag; + + unsigned int sps_video_parameter_set_id = get_bits(gb, 4); - skip_bits(gb, 4); // sps_video_parameter_set_id + if (nal->nuh_layer_id == 0) { + sps_ext_or_max_sub_layers_minus1 = 0; + sps_max_sub_layers_minus1 = get_bits(gb, 3); + } else { + sps_ext_or_max_sub_layers_minus1 = get_bits(gb, 3); + if (sps_ext_or_max_sub_layers_minus1 == 7) { + const HVCCNALUnitArray *array = &hvcc->arrays[VPS_INDEX]; + const HVCCNALUnit *vps = NULL; + + for (i = 0; i < array->numNalus; i++) + if (sps_video_parameter_set_id == array->nal[i].parameter_set_id) { + vps = &array->nal[i]; + break; + } + if (!vps) + return AVERROR_INVALIDDATA; - sps_max_sub_layers_minus1 = get_bits (gb, 3); + sps_max_sub_layers_minus1 = vps->vps_max_sub_layers_minus1; + } else + sps_max_sub_layers_minus1 = sps_ext_or_max_sub_layers_minus1; + } + multi_layer_ext_sps_flag = nal->nuh_layer_id && + sps_ext_or_max_sub_layers_minus1 == 7; /* * numTemporalLayers greater than 1 indicates that the stream to which this @@ -524,12 +549,17 @@ static int hvcc_parse_sps(GetBitContext *gb, HVCCNALUnit *nal, hvcc->numTemporalLayers = FFMAX(hvcc->numTemporalLayers, sps_max_sub_layers_minus1 + 1); - hvcc->temporalIdNested = get_bits1(gb); - - hvcc_parse_ptl(gb, hvcc, sps_max_sub_layers_minus1); + if (!multi_layer_ext_sps_flag) { + hvcc->temporalIdNested = get_bits1(gb); + hvcc_parse_ptl(gb, hvcc, sps_max_sub_layers_minus1); + } nal->parameter_set_id = get_ue_golomb_long(gb); + if (multi_layer_ext_sps_flag) { + if (get_bits1(gb)) // update_rep_format_flag + skip_bits(gb, 8); // sps_rep_format_idx + } else { hvcc->chromaFormat = get_ue_golomb_long(gb); if (hvcc->chromaFormat == 3) @@ -547,12 +577,15 @@ static int hvcc_parse_sps(GetBitContext *gb, HVCCNALUnit *nal, hvcc->bitDepthLumaMinus8 = get_ue_golomb_long(gb); hvcc->bitDepthChromaMinus8 = get_ue_golomb_long(gb); + } log2_max_pic_order_cnt_lsb_minus4 = get_ue_golomb_long(gb); + if (!multi_layer_ext_sps_flag) { /* sps_sub_layer_ordering_info_present_flag */ i = get_bits1(gb) ? 0 : sps_max_sub_layers_minus1; for (; i <= sps_max_sub_layers_minus1; i++) skip_sub_layer_ordering_info(gb); + } get_ue_golomb_long(gb); // log2_min_luma_coding_block_size_minus3 get_ue_golomb_long(gb); // log2_diff_max_min_luma_coding_block_size @@ -561,9 +594,15 @@ static int hvcc_parse_sps(GetBitContext *gb, HVCCNALUnit *nal, get_ue_golomb_long(gb); // max_transform_hierarchy_depth_inter get_ue_golomb_long(gb); // max_transform_hierarchy_depth_intra - if (get_bits1(gb) && // scaling_list_enabled_flag - get_bits1(gb)) // sps_scaling_list_data_present_flag - skip_scaling_list_data(gb); + if (get_bits1(gb)) { // scaling_list_enabled_flag + int sps_infer_scaling_list_flag = 0; + if (multi_layer_ext_sps_flag) + sps_infer_scaling_list_flag = get_bits1(gb); + if (sps_infer_scaling_list_flag) + skip_bits(gb, 6); // sps_scaling_list_ref_layer_id + else if (get_bits1(gb)) // sps_scaling_list_data_present_flag + skip_scaling_list_data(gb); + } skip_bits1(gb); // amp_enabled_flag skip_bits1(gb); // sample_adaptive_offset_enabled_flag @@ -703,6 +742,7 @@ static int hvcc_add_nal_unit(const uint8_t *nal_buf, uint32_t nal_size, { int ret = 0; int is_nalff = !!(flags & FLAG_IS_NALFF); + int is_lhvc = !!(flags & FLAG_IS_LHVC); int ps_array_completeness = !!(flags & FLAG_ARRAY_COMPLETENESS); HVCCNALUnitArray *const array = &hvcc->arrays[array_idx]; HVCCNALUnit *nal; @@ -722,7 +762,7 @@ static int hvcc_add_nal_unit(const uint8_t *nal_buf, uint32_t nal_size, goto end; nal_unit_parse_header(&gbc, &nal_type, &nuh_layer_id); - if (nuh_layer_id > 0) + if (!is_lhvc && nuh_layer_id > 0) goto end; /* @@ -798,9 +838,12 @@ static void hvcc_close(HEVCDecoderConfigurationRecord *hvcc) } } -static int hvcc_write(AVIOContext *pb, HEVCDecoderConfigurationRecord *hvcc) +static int hvcc_write(AVIOContext *pb, HEVCDecoderConfigurationRecord *hvcc, + int flags) { - uint16_t vps_count, sps_count, pps_count; + uint16_t numNalus[NB_ARRAYS] = { 0 }; + int is_lhvc = !!(flags & FLAG_IS_LHVC); + int numOfArrays = 0; /* * We only support writing HEVCDecoderConfigurationRecord version 1. @@ -826,10 +869,32 @@ static int hvcc_write(AVIOContext *pb, HEVCDecoderConfigurationRecord *hvcc) * let's always set them to values meaning 'unspecified'. */ hvcc->avgFrameRate = 0; - hvcc->constantFrameRate = 0; + /* + * lhvC doesn't store this field. It instead reserves the bits, setting them + * to '11'b. + */ + hvcc->constantFrameRate = is_lhvc * 0x3; + + /* + * Skip all NALUs with nuh_layer_id == 0 if writing lhvC. We do it here and + * not before parsing them as some parameter sets with nuh_layer_id > 0 + * may reference base layer parameters sets. + */ + for (unsigned i = 0; i < FF_ARRAY_ELEMS(hvcc->arrays); i++) { + const HVCCNALUnitArray *const array = &hvcc->arrays[i]; + + if (array->numNalus == 0) + continue; + for (unsigned j = 0; j < array->numNalus; j++) + numNalus[i] += !is_lhvc || (array->nal[j].nuh_layer_id != 0); + numOfArrays += (numNalus[i] > 0); + } + + av_log(NULL, AV_LOG_TRACE, "%s\n", is_lhvc ? "lhvC" : "hvcC"); av_log(NULL, AV_LOG_TRACE, "configurationVersion: %"PRIu8"\n", hvcc->configurationVersion); + if (!is_lhvc) { av_log(NULL, AV_LOG_TRACE, "general_profile_space: %"PRIu8"\n", hvcc->general_profile_space); av_log(NULL, AV_LOG_TRACE, "general_tier_flag: %"PRIu8"\n", @@ -842,10 +907,12 @@ static int hvcc_write(AVIOContext *pb, HEVCDecoderConfigurationRecord *hvcc) hvcc->general_constraint_indicator_flags); av_log(NULL, AV_LOG_TRACE, "general_level_idc: %"PRIu8"\n", hvcc->general_level_idc); + } av_log(NULL, AV_LOG_TRACE, "min_spatial_segmentation_idc: %"PRIu16"\n", hvcc->min_spatial_segmentation_idc); av_log(NULL, AV_LOG_TRACE, "parallelismType: %"PRIu8"\n", hvcc->parallelismType); + if (!is_lhvc) { av_log(NULL, AV_LOG_TRACE, "chromaFormat: %"PRIu8"\n", hvcc->chromaFormat); av_log(NULL, AV_LOG_TRACE, "bitDepthLumaMinus8: %"PRIu8"\n", @@ -856,6 +923,7 @@ static int hvcc_write(AVIOContext *pb, HEVCDecoderConfigurationRecord *hvcc) hvcc->avgFrameRate); av_log(NULL, AV_LOG_TRACE, "constantFrameRate: %"PRIu8"\n", hvcc->constantFrameRate); + } av_log(NULL, AV_LOG_TRACE, "numTemporalLayers: %"PRIu8"\n", hvcc->numTemporalLayers); av_log(NULL, AV_LOG_TRACE, "temporalIdNested: %"PRIu8"\n", @@ -863,11 +931,11 @@ static int hvcc_write(AVIOContext *pb, HEVCDecoderConfigurationRecord *hvcc) av_log(NULL, AV_LOG_TRACE, "lengthSizeMinusOne: %"PRIu8"\n", hvcc->lengthSizeMinusOne); av_log(NULL, AV_LOG_TRACE, "numOfArrays: %"PRIu8"\n", - hvcc->numOfArrays); + numOfArrays); for (unsigned i = 0, j = 0; i < FF_ARRAY_ELEMS(hvcc->arrays); i++) { const HVCCNALUnitArray *const array = &hvcc->arrays[i]; - if (array->numNalus == 0) + if (numNalus[i] == 0) continue; av_log(NULL, AV_LOG_TRACE, "array_completeness[%u]: %"PRIu8"\n", @@ -875,28 +943,31 @@ static int hvcc_write(AVIOContext *pb, HEVCDecoderConfigurationRecord *hvcc) av_log(NULL, AV_LOG_TRACE, "NAL_unit_type[%u]: %"PRIu8"\n", j, array->NAL_unit_type); av_log(NULL, AV_LOG_TRACE, "numNalus[%u]: %"PRIu16"\n", - j, array->numNalus); - for (unsigned k = 0; k < array->numNalus; k++) + j, numNalus[i]); + for (unsigned k = 0; k < array->numNalus; k++) { + if (is_lhvc && array->nal[k].nuh_layer_id == 0) + continue; + av_log(NULL, AV_LOG_TRACE, "nalUnitLength[%u][%u]: %"PRIu16"\n", j, k, array->nal[k].nalUnitLength); + } j++; } /* * We need at least one of each: VPS, SPS and PPS. */ - vps_count = hvcc->arrays[VPS_INDEX].numNalus; - sps_count = hvcc->arrays[SPS_INDEX].numNalus; - pps_count = hvcc->arrays[PPS_INDEX].numNalus; - if (!vps_count || vps_count > HEVC_MAX_VPS_COUNT || - !sps_count || sps_count > HEVC_MAX_SPS_COUNT || - !pps_count || pps_count > HEVC_MAX_PPS_COUNT) + if ((!numNalus[VPS_INDEX] || numNalus[VPS_INDEX] > HEVC_MAX_VPS_COUNT) && !is_lhvc) + return AVERROR_INVALIDDATA; + if (!numNalus[SPS_INDEX] || numNalus[SPS_INDEX] > HEVC_MAX_SPS_COUNT || + !numNalus[PPS_INDEX] || numNalus[PPS_INDEX] > HEVC_MAX_PPS_COUNT) return AVERROR_INVALIDDATA; /* unsigned int(8) configurationVersion = 1; */ avio_w8(pb, hvcc->configurationVersion); + if (!is_lhvc) { /* * unsigned int(2) general_profile_space; * unsigned int(1) general_tier_flag; @@ -915,6 +986,7 @@ static int hvcc_write(AVIOContext *pb, HEVCDecoderConfigurationRecord *hvcc) /* unsigned int(8) general_level_idc; */ avio_w8(pb, hvcc->general_level_idc); + } /* * bit(4) reserved = '1111'b; @@ -928,6 +1000,7 @@ static int hvcc_write(AVIOContext *pb, HEVCDecoderConfigurationRecord *hvcc) */ avio_w8(pb, hvcc->parallelismType | 0xfc); + if (!is_lhvc) { /* * bit(6) reserved = '111111'b; * unsigned int(2) chromaFormat; @@ -948,9 +1021,13 @@ static int hvcc_write(AVIOContext *pb, HEVCDecoderConfigurationRecord *hvcc) /* bit(16) avgFrameRate; */ avio_wb16(pb, hvcc->avgFrameRate); + } /* + * if (!is_lhvc) * bit(2) constantFrameRate; + * else + * bit(2) reserved = '11'b; * bit(3) numTemporalLayers; * bit(1) temporalIdNested; * unsigned int(2) lengthSizeMinusOne; @@ -961,12 +1038,12 @@ static int hvcc_write(AVIOContext *pb, HEVCDecoderConfigurationRecord *hvcc) hvcc->lengthSizeMinusOne); /* unsigned int(8) numOfArrays; */ - avio_w8(pb, hvcc->numOfArrays); + avio_w8(pb, numOfArrays); for (unsigned i = 0; i < FF_ARRAY_ELEMS(hvcc->arrays); i++) { const HVCCNALUnitArray *const array = &hvcc->arrays[i]; - if (!array->numNalus) + if (!numNalus[i]) continue; /* * bit(1) array_completeness; @@ -977,11 +1054,14 @@ static int hvcc_write(AVIOContext *pb, HEVCDecoderConfigurationRecord *hvcc) array->NAL_unit_type & 0x3f); /* unsigned int(16) numNalus; */ - avio_wb16(pb, array->numNalus); + avio_wb16(pb, numNalus[i]); for (unsigned j = 0; j < array->numNalus; j++) { HVCCNALUnit *nal = &array->nal[j]; + if (is_lhvc && nal->nuh_layer_id == 0) + continue; + /* unsigned int(16) nalUnitLength; */ avio_wb16(pb, nal->nalUnitLength); @@ -1082,12 +1162,11 @@ static int hvcc_parse_nal_unit(const uint8_t *buf, uint32_t len, int type, return 0; } -int ff_isom_write_hvcc(AVIOContext *pb, const uint8_t *data, - int size, int ps_array_completeness) +static int write_configuration_record(AVIOContext *pb, const uint8_t *data, + int size, int flags) { HEVCDecoderConfigurationRecord hvcc; uint8_t *buf, *end, *start = NULL; - int flags = !!ps_array_completeness * FLAG_ARRAY_COMPLETENESS; int ret; if (size < 6) { @@ -1154,7 +1233,7 @@ int ff_isom_write_hvcc(AVIOContext *pb, const uint8_t *data, } } - ret = hvcc_write(pb, &hvcc); + ret = hvcc_write(pb, &hvcc, flags); goto end; } else if (!(AV_RB24(data) == 1 || AV_RB32(data) == 1)) { /* Not a valid Annex B start code prefix */ @@ -1183,10 +1262,24 @@ int ff_isom_write_hvcc(AVIOContext *pb, const uint8_t *data, buf += len; } - ret = hvcc_write(pb, &hvcc); + ret = hvcc_write(pb, &hvcc, flags); end: hvcc_close(&hvcc); av_free(start); return ret; } + +int ff_isom_write_hvcc(AVIOContext *pb, const uint8_t *data, + int size, int ps_array_completeness) +{ + return write_configuration_record(pb, data, size, + !!ps_array_completeness * FLAG_ARRAY_COMPLETENESS); +} + +int ff_isom_write_lhvc(AVIOContext *pb, const uint8_t *data, + int size, int ps_array_completeness) +{ + return write_configuration_record(pb, data, size, + (!!ps_array_completeness * FLAG_ARRAY_COMPLETENESS) | FLAG_IS_LHVC); +} diff --git a/libavformat/hevc.h b/libavformat/hevc.h index cb66ac66ac..12000b25a5 100644 --- a/libavformat/hevc.h +++ b/libavformat/hevc.h @@ -97,4 +97,21 @@ int ff_hevc_annexb2mp4_buf(const uint8_t *buf_in, uint8_t **buf_out, int ff_isom_write_hvcc(AVIOContext *pb, const uint8_t *data, int size, int ps_array_completeness); +/** + * Writes L-HEVC extradata (parameter sets with nuh_layer_id > 0, as a + * LHEVCDecoderConfigurationRecord) to the provided AVIOContext. + * + * If the extradata is Annex B format, it gets converted to lhvC format before + * writing. Otherwise, hvcC formated extradata is expected, not lhvC. + * + * @param pb address of the AVIOContext where the lhvC shall be written + * @param data address of the buffer holding the data needed to write the lhvC + * @param size size (in bytes) of the data buffer + * @param ps_array_completeness whether all parameter sets are in the lhvC (1) + * or there may be additional parameter sets in the bitstream (0) + * @return >=0 in case of success, a negative value corresponding to an AVERROR + * code in case of failure + */ +int ff_isom_write_lhvc(AVIOContext *pb, const uint8_t *data, + int size, int ps_array_completeness); #endif /* AVFORMAT_HEVC_H */ From patchwork Wed Jul 3 21:26:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 50313 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:cc64:0:b0:482:c625:d099 with SMTP id k4csp3359653vqv; Wed, 3 Jul 2024 15:04:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXwE8al0QLOEieWKmnXxg6eOW/1mir7JiuTbn7UqV6jqgyVE40PcqJ6OR77JH2u8BbHEow+dM5veg8wazreTugrH8pygDu7+966Tw== X-Google-Smtp-Source: AGHT+IExY6hnbAUDkFfxv5E/4B6XlajYUM/Yc6cgcfI1U8ZsOWz21C+HOjjSYp+qVGtCNqZ2tlgZ X-Received: by 2002:a17:907:86a0:b0:a5c:eafb:5288 with SMTP id a640c23a62f3a-a751448a596mr1133222066b.31.1720044259077; Wed, 03 Jul 2024 15:04:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720044259; cv=none; d=google.com; s=arc-20160816; b=fvL8IdvRq3SHWBE4IlAl8yrREJvJlZZeaymZysbxzQ10LbLukAOBnoUlDRyXbpKLsZ u4Q8Wb9eDMZG0aQezA2IzP5nA05w3I5UDrxkQw9+Lyn8N2eEC4XzXsEKPi4OGmKDvfPo 5h7RUovRKweZnDg9K4/jSzkVSs32jjZ/SG1U16CCwD3EZ34QpbvI70S30szoA+GCyyAM 6LE6ILshA7HrK8SmPalyS1dh5IvQD6Q2jVzmcuHbEizOTEejDGZ+ETOmlZ0DygLmvlpP RAKr6ThsPTshUYIMuuRlGXFGR4bj4Q67e6MCLCCtNLTi9wo+n4rVVaRMPYFDutJBiu7r Qdmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=Fena0D/UTYqGc835PoQAzejbwWJpKOeseJ2ENSaeH78=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=bn6T7NkLZLnEX5zLT3ybmlnbJYO9QE5WrCT7FEIgscOHBDZVxH+TAzWCorkGNSDXVS QhbqKTbqhGaAcQgj9oCYjjUGFYMaMMlW3hnANny1qaU4VptZvDL/zYVNUFV/RHC34Xr0 oF9BSaFI2fJWe77zTs2ygo1w0N8Y7baG+iUuF9bZEcagmQVMq+xn9NqsQpCeckbKaRQ/ J3+xR3o30Zo8onuoYGErNPgrGrge1unh3qNdi92+nbqBuYM13TWgcAecENCfq5nLdiwf OXQeRixbomirMSSPkBq4qd3eF4O+JgM7NgizzZUTbImhjkZs8EA9fAaFuauaJ/9VY/4W uwAg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=gj++zi4F; 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 a640c23a62f3a-a72ab04aa14si626812066b.319.2024.07.03.15.04.18; Wed, 03 Jul 2024 15:04:19 -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=20230601 header.b=gj++zi4F; 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 48AF468D9FA; Thu, 4 Jul 2024 00:26:55 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 251BB68D9DE for ; Thu, 4 Jul 2024 00:26:47 +0300 (EEST) Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-2c983d8bdc7so24339a91.0 for ; Wed, 03 Jul 2024 14:26:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720042006; x=1720646806; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=NV2xm4pqRWwpFVp7aW8CInV4e2ZHgAAXcqMVGVnmP78=; b=gj++zi4FLdqW9JAYaEw54Hr2kjntAaXAWycTVA2483WJZPQtccNQheeKMaWZ/ZTzKj IlpE2gOr2Th0pfo6uGDKdTPVTC/f0zusLH0lKfuRp/OGrC0C4D0MzdIwaRnBRYjEycHf ShIZJCsb8IXQtWtxP7ipOgY+AymD2qoQ3D+mRqxRqHZvZdUqfkOuwGkbmiFx22wWbq7y qN7qO3z9WrbHj5/rTKyKbEKvAHHvVe4rFqvDoR2P+CY5dp6p9gT4yedPyddrcJLWPeQz mrVghSwdzRTKoAF7UuH42yTi9aEzoRQ8uTZdFydDJ9k57eJawbHFbeyroi0H2tke9FRp n6vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720042006; x=1720646806; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NV2xm4pqRWwpFVp7aW8CInV4e2ZHgAAXcqMVGVnmP78=; b=Sa6nLnsKuG/ZCrAjt3lP/sbLMAoRfjUDWgFPxttK+ph+yCl3HCUYcO5K3aZXunElEA r8DOhrp2hd9IO0o1YtOBfnuZbhhuzHuw6h+AZQp47QcZXpmgXt3qvLlcTbFt7PUERriN 6DNMRoLcKzTW8VZg1MZXcTb95PpOw+kqkqHuD0lmKi4ss468BIwbu4Q6HIYJwc6wI9M8 lIDsHJdRBR1eTyBcENHKQZ/X7sksRqRg0HuuT4TFaq9dT1EKQl0gCXcloTPMrEcDnurf VQVOERo4ogdg0Nc4PAoJ9FaGbUOGnhHl0x/U5C2wcenMRc+8pNm+DMFlKWrXmKgKF7fe mrKA== X-Gm-Message-State: AOJu0Yw3DJOqlxtPMpqBwsJek3z2t6pdwMbCFAMjXP4BzBqFRht7BKqx j1C46nzc/0nxh7j4dzg3us6m6cLKH+anU0V+dwM92oJvCW1IEme6YxP+5A== X-Received: by 2002:a17:90a:55c2:b0:2c7:c788:d34d with SMTP id 98e67ed59e1d1-2c93d76508emr10537190a91.38.1720042005762; Wed, 03 Jul 2024 14:26:45 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c91ce58877sm11370560a91.24.2024.07.03.14.26.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:26:45 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 3 Jul 2024 18:26:44 -0300 Message-ID: <20240703212648.48483-9-jamrial@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240703212648.48483-1-jamrial@gmail.com> References: <20240703212648.48483-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 09/11] avformat/movenc: add support for writing lhvC boxes 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 3NA6oJLo3Oc5 Signed-off-by: James Almer --- libavformat/movenc.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index f8eb6fadf7..26a67e6e47 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1557,6 +1557,26 @@ static int mov_write_hvcc_tag(AVIOContext *pb, MOVTrack *track) return update_size(pb, pos); } +static int mov_write_lhvc_tag(AVIOContext *pb, MOVTrack *track) +{ + int64_t pos = avio_tell(pb); + int ret; + + avio_wb32(pb, 0); + ffio_wfourcc(pb, "lhvC"); + if (track->tag == MKTAG('h','v','c','1')) + ret = ff_isom_write_lhvc(pb, track->vos_data, track->vos_len, 1); + else + ret = ff_isom_write_lhvc(pb, track->vos_data, track->vos_len, 0); + + if (ret < 0) { + avio_seek(pb, pos, SEEK_SET); + return ret; + } + + return update_size(pb, pos); +} + static int mov_write_evcc_tag(AVIOContext *pb, MOVTrack *track) { int64_t pos = avio_tell(pb); @@ -2523,9 +2543,14 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex } else if (track->par->codec_id == AV_CODEC_ID_DNXHD) { mov_write_avid_tag(pb, track); avid = 1; - } else if (track->par->codec_id == AV_CODEC_ID_HEVC) + } else if (track->par->codec_id == AV_CODEC_ID_HEVC) { mov_write_hvcc_tag(pb, track); - else if (track->par->codec_id == AV_CODEC_ID_VVC) + if (track->st->disposition & AV_DISPOSITION_MULTILAYER) { + ret = mov_write_lhvc_tag(pb, track); + if (ret < 0) + av_log(mov->fc, AV_LOG_WARNING, "Not writing 'lhvC' atom for multilayer stream.\n"); + } + } else if (track->par->codec_id == AV_CODEC_ID_VVC) mov_write_vvcc_tag(pb, track); else if (track->par->codec_id == AV_CODEC_ID_H264 && !TAG_IS_AVCI(track->tag)) { mov_write_avcc_tag(pb, track); From patchwork Wed Jul 3 21:26:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 50316 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:cc64:0:b0:482:c625:d099 with SMTP id k4csp3396514vqv; Wed, 3 Jul 2024 16:54:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXxpoEojlunDR8AtsNufkwbQ69QhJphRonrlMFrSRjd7t9U7i8fNT7XgNH3nyVcncZH2tzrSQnPpTJUqUekvUu6zcXxKr66g4WKQg== X-Google-Smtp-Source: AGHT+IFSxqrIHbPgTT0qAOJvgNL1RjS/zjHs2FEXqzyehfR35G2Pfog6HsSTLzs/4vyIoAA/HTaa X-Received: by 2002:a17:907:97c8:b0:a77:b4e3:4fca with SMTP id a640c23a62f3a-a77ba46095emr516866b.9.1720050850871; Wed, 03 Jul 2024 16:54:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720050850; cv=none; d=google.com; s=arc-20160816; b=EzmoE3hI2hR26dinGhApbkFa2JIuuyXFRheyK2haH8MjgyBUu9P+gTJPiGI7oxkB1T g96pxzJXA/on3DJeXfXEs3Fa/yvTjrRm4fezg8NHEMeqpvB3DcCbRlNh7vAsyLT0NeE/ TAvyLrmPc2a1a+KNsTcF4TGsWVcwhmM4iegeHJd5DnoqigmxFNF4dBTKZg2adCFfxAlC vcPWd3ZlTdDQhw3fNzHhxtcCivfPxslcRibxCtKoJyk6xuBClvqK9Q9WjWmFzWs1VVxy 82kk9g+O+FfqaP6ddANQYz8dDxjzU3PByYXijFIlzc8sTD2iayW38d56zvGzUkF1BI0T /O/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=PS0mGuOYaPLhT7ilLGTbBnvbb+av6NBROoXu5G1ywCU=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=C4fiPyCRqmY14hGCMRUiWqe7crK95G7SutCTsCL/Ke/Hpke/5C3D6Bkx1KVhKRz5/I HL5hZkRu1hJFFu/2ShijAA/5HDW2va2bYjtodcAC4qixgSYGRPvHYlmxBNwxxZUuDvtI ChKvfGn/3zvLOx4rmGnYX88bSRul2vofVNMy9m9QtZf6WvMpNZjqb6YXT7kXw2W4/u1d 1N1tyDj0Q+AlsMpKlxQtWNAOcWt7lkqbnsE5uB3Y7OLH4b0Zvdm9HSrk3qBYpzdGAXK6 puUnX0En5Rgx7zn2gAywk6U9Jhm7RVsZsdGazmKzUajiRf3Bv9gklyREECrU/rbNQghr ghUQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=MnV67oWu; 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 a640c23a62f3a-a72ab049a03si623796666b.310.2024.07.03.16.54.10; Wed, 03 Jul 2024 16:54:10 -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=20230601 header.b=MnV67oWu; 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 E384A68DA08; Thu, 4 Jul 2024 00:27:01 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 912E568D9EE for ; Thu, 4 Jul 2024 00:26:51 +0300 (EEST) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-7066f68e22cso14540b3a.2 for ; Wed, 03 Jul 2024 14:26:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720042008; x=1720646808; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=M0VmP7zyEjRq7BIPibcoPG9PEpk9wNM6p6Kt2XRTXoI=; b=MnV67oWuirL3DuyE5wLrcvEXfHG7HAoElVVWv+BwBelmyM6qC+EF99arxnnwzlilfv l7WJQNWhfOXl6CrqV/4f5PhmvCUUUtONyUJ9AzARwD9QxuzucW7q58MJ8CW1k70V6IYw YXQRT4p7CuurROB20SGQPPSjXb4g4gdi4DnSfxp9qcjaFszANNHveP/83GPga7eZUB3i LXmpZvuuJxHytfAZwj1tXbXI5ehf6Wg2o4aGFWFSLRI/8InWSJjGskcQ0+lC7LicfuG+ uk5WD9LwFaaIeKVjOwmseflRslHLAmVgNCBwa1BU/nD7ZYLkuEFVWu+6OtRft2dCKCgT uTJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720042008; x=1720646808; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=M0VmP7zyEjRq7BIPibcoPG9PEpk9wNM6p6Kt2XRTXoI=; b=sIh85r+LOXfpB25dkfdzalJWfMDdX+fJamWgr3Z0w/5L2O2kLTBXSrQLU2moIt7Gyi 0WB1hBLsNIp8DFFz+VO3omyBVO/x0DH2Y3ZcEOF2YsQ5frYHmyhNPMvKxZOt8HS2qh66 9kEA4YIJ7uDXePln3z5Rnd0hplmR/Ju6X33mXW095RtOGJbUCAkZBSpaz0wxzw4zT3Jo KQfXdWoCCRIFk+MWGOC4NXb00SXMhBvvutTGmmABF3ntivrsuXQ6YUxTjrzrBnl2pzA7 ODoycxcJp8guANQ4f4qwqk6elpBmTGwdJHw4bGPZD/P6M9VbEcNClr85WKuil5SMCtyp tJIw== X-Gm-Message-State: AOJu0YziECkGvtkppqBEZwuFDeZ2dV5Zu9lNWrohnOENkhXmOW+EDI/Z 9CIs2fZSuhUowzwk8b2b3qSZlCK0/QlmWPKiip5MKAORfW7zdbGZwR/TSw== X-Received: by 2002:a05:6a20:7489:b0:1bd:2aa5:f177 with SMTP id adf61e73a8af0-1bef611aa11mr14587480637.11.1720042007451; Wed, 03 Jul 2024 14:26:47 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c91ce58877sm11370560a91.24.2024.07.03.14.26.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:26:47 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 3 Jul 2024 18:26:45 -0300 Message-ID: <20240703212648.48483-10-jamrial@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240703212648.48483-1-jamrial@gmail.com> References: <20240703212648.48483-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 10/11] avformat/movenc: add support for writting vexu boxes 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: all+QUUoB3nH Signed-off-by: James Almer --- libavformat/movenc.c | 159 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 154 insertions(+), 5 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 26a67e6e47..500ea25731 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -2190,6 +2190,138 @@ static int mov_write_sv3d_tag(AVFormatContext *s, AVIOContext *pb, AVSphericalMa return update_size(pb, sv3d_pos); } +static inline int64_t rescale_rational(AVRational q, int b) +{ + return av_rescale(q.num, b, q.den); +} + +static void mov_write_vexu_proj_tag(AVFormatContext *s, AVIOContext *pb, + const AVSphericalMapping *spherical_mapping) +{ + avio_wb32(pb, 24); /* size */ + ffio_wfourcc(pb, "proj"); + avio_wb32(pb, 16); /* size */ + ffio_wfourcc(pb, "prji"); + avio_wb32(pb, 0); /* version + flags */ + + switch (spherical_mapping->projection) { + case AV_SPHERICAL_RECTILINEAR: + ffio_wfourcc(pb, "rect"); + break; + case AV_SPHERICAL_EQUIRECTANGULAR: + ffio_wfourcc(pb, "equi"); + break; + case AV_SPHERICAL_HALF_EQUIRECTANGULAR: + ffio_wfourcc(pb, "hequ"); + break; + case AV_SPHERICAL_FISHEYE: + ffio_wfourcc(pb, "fish"); + break; + default: + av_assert0(0); + } +} + +static int mov_write_eyes_tag(AVFormatContext *s, AVIOContext *pb, + const AVStereo3D *stereo3d) +{ + int64_t pos = avio_tell(pb); + int view = 0; + + avio_wb32(pb, 0); /* size */ + ffio_wfourcc(pb, "eyes"); + + // stri is mandatory + avio_wb32(pb, 13); /* size */ + ffio_wfourcc(pb, "stri"); + avio_wb32(pb, 0); /* version + flags */ + switch (stereo3d->view) { + case AV_STEREO3D_VIEW_LEFT: + view |= 1 << 0; + break; + case AV_STEREO3D_VIEW_RIGHT: + view |= 1 << 1; + break; + case AV_STEREO3D_VIEW_PACKED: + view |= (1 << 0) | (1 << 1); + break; + } + view |= !!(stereo3d->flags & AV_STEREO3D_FLAG_INVERT) << 3; + avio_w8(pb, view); + + // hero is optional + if (stereo3d->primary_eye != AV_PRIMARY_EYE_NONE) { + avio_wb32(pb, 13); /* size */ + ffio_wfourcc(pb, "hero"); + avio_wb32(pb, 0); /* version + flags */ + avio_w8(pb, stereo3d->primary_eye); + } + + // it's not clear if cams is mandatory or optional + if (stereo3d->baseline) { + avio_wb32(pb, 24); /* size */ + ffio_wfourcc(pb, "cams"); + avio_wb32(pb, 16); /* size */ + ffio_wfourcc(pb, "blin"); + avio_wb32(pb, 0); /* version + flags */ + avio_wb32(pb, stereo3d->baseline); + } + + // it's not clear if cmfy is mandatory or optional + if (stereo3d->horizontal_disparity_adjustment.num) { + avio_wb32(pb, 24); /* size */ + ffio_wfourcc(pb, "cmfy"); + avio_wb32(pb, 16); /* size */ + ffio_wfourcc(pb, "dadj"); + avio_wb32(pb, 0); /* version + flags */ + avio_wb32(pb, rescale_rational(stereo3d->horizontal_disparity_adjustment, 10000)); + } + + return update_size(pb, pos); +} + +static int mov_write_vexu_tag(AVFormatContext *s, AVIOContext *pb, + const AVStereo3D *stereo3d, + const AVSphericalMapping *spherical_mapping) +{ + int64_t pos; + + if (spherical_mapping && + spherical_mapping->projection != AV_SPHERICAL_RECTILINEAR && + spherical_mapping->projection != AV_SPHERICAL_EQUIRECTANGULAR && + spherical_mapping->projection != AV_SPHERICAL_HALF_EQUIRECTANGULAR && + spherical_mapping->projection != AV_SPHERICAL_FISHEYE) { + av_log(s, AV_LOG_WARNING, "Unsupported projection %d. proj not written.\n", + spherical_mapping->projection); + spherical_mapping = NULL; + } + + if (stereo3d && (stereo3d->type == AV_STEREO3D_2D || + (!(stereo3d->flags & AV_STEREO3D_FLAG_INVERT) && + stereo3d->view == AV_STEREO3D_VIEW_UNSPEC && + stereo3d->primary_eye == AV_PRIMARY_EYE_NONE && + !stereo3d->baseline && + !stereo3d->horizontal_disparity_adjustment.num))) { + av_log(s, AV_LOG_WARNING, "Unsupported stereo 3d metadata. eyes not written.\n"); + stereo3d = NULL; + } + + if (!spherical_mapping && !stereo3d) + return 0; + + pos = avio_tell(pb); + avio_wb32(pb, 0); /* size */ + ffio_wfourcc(pb, "vexu"); + + if (spherical_mapping) + mov_write_vexu_proj_tag(s, pb, spherical_mapping); + + if (stereo3d) + mov_write_eyes_tag(s, pb, stereo3d); + + return update_size(pb, pos); +} + static int mov_write_dvcc_dvvc_tag(AVFormatContext *s, AVIOContext *pb, AVDOVIDecoderConfigurationRecord *dovi) { uint8_t buf[ISOM_DVCC_DVVC_SIZE]; @@ -2326,11 +2458,6 @@ static int mov_write_clli_tag(AVIOContext *pb, MOVTrack *track) return 12; } -static inline int64_t rescale_rational(AVRational q, int b) -{ - return av_rescale(q.num, b, q.den); -} - static int mov_write_mdcv_tag(AVIOContext *pb, MOVTrack *track) { const int chroma_den = 50000; @@ -2623,6 +2750,28 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex mov_write_sv3d_tag(mov->fc, pb, (AVSphericalMapping*)spherical_mapping->data); } + if (track->mode == MODE_MOV || (track->mode == MODE_MP4 && + mov->fc->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL)) { + const AVPacketSideData *sd; + const AVStereo3D *stereo3d = NULL; + const AVSphericalMapping *spherical_mapping = NULL; + + sd = av_packet_side_data_get(track->st->codecpar->coded_side_data, + track->st->codecpar->nb_coded_side_data, + AV_PKT_DATA_STEREO3D); + if (sd) + stereo3d = (AVStereo3D *)sd->data; + + sd = av_packet_side_data_get(track->st->codecpar->coded_side_data, + track->st->codecpar->nb_coded_side_data, + AV_PKT_DATA_SPHERICAL); + if (sd) + spherical_mapping = (AVSphericalMapping *)sd->data; + + if (stereo3d || spherical_mapping) + mov_write_vexu_tag(s, pb, stereo3d, spherical_mapping); + } + if (track->mode == MODE_MP4) { const AVPacketSideData *dovi = av_packet_side_data_get(track->st->codecpar->coded_side_data, track->st->codecpar->nb_coded_side_data, From patchwork Wed Jul 3 21:26:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 50319 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:cc64:0:b0:482:c625:d099 with SMTP id k4csp3419432vqv; Wed, 3 Jul 2024 18:04:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWAyxAbC+xjrQPhpg7G9IhXMI2dNAhF5mp80C67YERihE8nEZv5qDWqd7USm3XBJORg3N+drUFKA3Czomk99wxVVAMG5Z8BSDlUAw== X-Google-Smtp-Source: AGHT+IGJ48JyGbIwV8W27o0fr2Er2PsyBJ5PQpDvGL1ZlXpn16i9KD9zKJ+G44HvYaob57uw+ptp X-Received: by 2002:a05:6402:35c5:b0:58c:b2b8:31b2 with SMTP id 4fb4d7f45d1cf-58e5a8e8e27mr120882a12.17.1720055045482; Wed, 03 Jul 2024 18:04:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720055045; cv=none; d=google.com; s=arc-20160816; b=yGTM2WiFKG4yrkbtARjjwRtffpYVCjUkz2fn62/B/+K1oH7mhuTD7MXG3oC3igx1Zn n8iHMb7UDW1fvni5Br1F2rKFdfGRgpHfPmDtoxV6u3fs5XUuVvnbadjdU1n8urxUXt39 /g2paTD6i+WZSWAzt/RPdwH0CdvNi08OxNY+jGGFCYy/JggXw69FXgO7IT2KS176asRY ub+GRcP1nWrI7EoCGwoLpMFzMBjZsQMskkRKfhZUyeFogtlxq67O4jA3y58nJFdNTx2p mPZRYfAolQgBykBW0XHCDuce9RWiCrIs835QUOB3wI20cQ0WFw/KJYyuode86aq7SSJd Jj0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding: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=do0m1eLnDUMegzeo75WHEAZhO/iCQYPgcbQlokeg7uU=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=Cy6Rpd1UfRgMpwUAAvY9E8Xkz91j2GYi15OxSK4RnaN5lSm2g+Ejf4ZPj4dfVUjEYU gGkAUJi0YMTlMJDu2F4zmXuDJvHZR2QZX1lpxk2wy9qz6jGx+86pRwwZrG1NIRuRB1aI fLGBe94/+HA08WOVOtLXcUF/0BKh/HBU1Fx2vOP6RiXojUxLFBA8FJvWpkauwM4tR1xZ ON7VOVAnm6tUscm55syAIObxlSN/OodNJX1qjii+rVyCkTvdEqBwcjwiksHmaj0qs1/d MYnUw0qPtxhO/MiOmuMfNTQtkjFki7Laqt2jyBO/gA+DMS1XirsYvSJX17e6LqBgyMrZ r0Bw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=AD47C7Kx; 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 4fb4d7f45d1cf-58c447596fasi1774692a12.475.2024.07.03.18.04.04; Wed, 03 Jul 2024 18:04:05 -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=20230601 header.b=AD47C7Kx; 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 90BE368DA0D; Thu, 4 Jul 2024 00:27:09 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 39ED968D9F9 for ; Thu, 4 Jul 2024 00:26:54 +0300 (EEST) Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1fab03d2f23so45890745ad.0 for ; Wed, 03 Jul 2024 14:26:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720042010; x=1720646810; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=mt1jns9z0idIhvLFMMZnGMUbIC/HJeFVqEKfWRvgeEc=; b=AD47C7Kx+G3g3Ef2dw4HmikaWIoFa02Z5e0UM4tbl6szOi1hOugPUMjppcoaS8NFVJ Q9VtXwH2qZcrJ5XX8+nv2VRP+c9+HLVX7R4jpwuVc7B6rZbohs2E1lv7M8F97ez4FYF1 ahxCKW/s4SqIXXuCdZ3zWHa86ddTCEBQjdz8Wl+Bgkcr9KqFL15xBsWLR+5KbhcuJySl PFdFXN9NEMwkiBcsaGV9qLJzaaE28l85JOLbNNor9hpt8gt3azmiMEkTgl3SooQkN42j BDQixhh8vrZb1KxbLeZaoUgDECHD4Hm3EBe8VGDxGRSky8/IEVutYONAdBRzAiowoTnF 0pgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720042010; x=1720646810; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mt1jns9z0idIhvLFMMZnGMUbIC/HJeFVqEKfWRvgeEc=; b=iXoedsJQOBselTQxlg+6Lx4XBpeJJvxUthFxEwl2x35N9ZCX3qTRFIkDe6lY+Zb9VF dJgKd8a0UdWeUqhBhIRB7cEu27Q9y+p3oKj3cGCEXXy5QlXqcurOOFXdwoffS0aMR9nh 3269VkXn71EEFhw/CSiqvqDM/YOPeMjP8AWYr45WWzEIrA4Cx1wKU93ig23WV1gOZuhF 7HGTjnXmP3KIoUSus8dmBWenoFUAA6gkuZtveWINSTFICAzneKZFUFKvRhYDEOjnSNX8 R0j/Zf7/4xhnMMccjlWI1BueY3E5/ulTNOK6dvICoCHExi+VMtBrariXibo1K8xkbZdZ ZsxQ== X-Gm-Message-State: AOJu0YzXQ1dVRAVPym9Ucn5ESB0kaDJNl71Zb64hmv0Cbu6AqKEErm3l 21n170YQ6g50WrNS1DdfW65nGI9EOQjuG3UYrJWy413Mft/MNnpmkt7hEg== X-Received: by 2002:a17:90b:4d8f:b0:2c7:3e4c:e782 with SMTP id 98e67ed59e1d1-2c93d5de1b6mr9453661a91.0.1720042010340; Wed, 03 Jul 2024 14:26:50 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c91ce58877sm11370560a91.24.2024.07.03.14.26.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 14:26:49 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 3 Jul 2024 18:26:46 -0300 Message-ID: <20240703212648.48483-11-jamrial@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240703212648.48483-1-jamrial@gmail.com> References: <20240703212648.48483-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 11/11] avformat/movenc: add support for writting hfov boxes 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: sEeHofRxyT44 Signed-off-by: James Almer --- libavformat/movenc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 500ea25731..5f4c1cb6ea 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -2195,6 +2195,17 @@ static inline int64_t rescale_rational(AVRational q, int b) return av_rescale(q.num, b, q.den); } +static void mov_write_hfov_tag(AVFormatContext *s, AVIOContext *pb, + const AVStereo3D *stereo3d) +{ + if (!stereo3d->horizontal_field_of_view.num) + return; + + avio_wb32(pb, 12); /* size */ + ffio_wfourcc(pb, "hfov"); + avio_wb32(pb, rescale_rational(stereo3d->horizontal_field_of_view, 1000)); +} + static void mov_write_vexu_proj_tag(AVFormatContext *s, AVIOContext *pb, const AVSphericalMapping *spherical_mapping) { @@ -2770,6 +2781,8 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex if (stereo3d || spherical_mapping) mov_write_vexu_tag(s, pb, stereo3d, spherical_mapping); + if (stereo3d) + mov_write_hfov_tag(s, pb, stereo3d); } if (track->mode == MODE_MP4) {