From patchwork Mon Aug 28 12:35:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 43374 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3822:b0:149:dfde:5c0a with SMTP id p34csp114383pzf; Mon, 28 Aug 2023 05:38:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG8Z4QItdupCRknANLaoaqA2DXMwpiPZtCBJFvvrgYaKFlwB3AkArtFj41gJ1VIKHo+Ru5q X-Received: by 2002:a05:6402:1610:b0:525:469a:fc38 with SMTP id f16-20020a056402161000b00525469afc38mr19241873edv.31.1693226300096; Mon, 28 Aug 2023 05:38:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693226300; cv=none; d=google.com; s=arc-20160816; b=JTLvo1BXKh1LFhIRbidHRa96cSh3taTm1pQmcDrGbwH5maBIJhm3eX2VTPn2loQAJz P20GME7XSikFZtiGgHXqMuC6wIA029E4OwHdVwULkKkhYnPSudMWOjgy51RjXzNk1WO+ fdq7zcVUadi3ShFWtjg4sZuPDmj83q4PrDye9rWMpVwHdyQPeOAF+0C3+n7hCC8VF5hr 8CddzAGZemFA1ZBRrATeNri6r2mJY7EIJI+mUC1qZzhr6l42I+JsystSLJ2j+1gkcKMw emCOlbxtAdRkGYjqo722AABSIFQSErOiaQCIiXsXOwug4UIZ/PETjgOy+RJi6pyZXmtf gJ+w== 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=1mRfbQxmnuOBgvgfeo+Z0P6Lg8BCZrsv8uSYD8kNCjQ=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=gelYrMOPu1UX8z7nuUtBApbe1p/IUv5Q4SyWsBipxPgT18zyV4sksuq74JdYABgXoi de+QLpxYSuiIdy+jF7CzqIz1d+P1qv7Af7C/+iJG0zcv96I9CoipW69+x8KMCbSLUd5J eR1fBOFA5JqQD815+5P6abRARlayZLh1UavveOanjLpIoTD7ruOBMrTxhFb1+vwhY7j+ tdXDy6tjb0vsWNLzvBr6UPRz6fM7RsvyG6C4S4AntqIHGor67nulOUbe83tcMmxXQAbK OW3yj31uoLGtSb2OTtMAlceZyghmPbEwBK+smkH5yoonaFdW+3kEK1ZiiiKOzPijR33P /73A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20221208 header.b=IFoGXBdw; 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 u13-20020aa7d98d000000b005234b452a4fsi4426853eds.68.2023.08.28.05.38.11; Mon, 28 Aug 2023 05:38:20 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20221208 header.b=IFoGXBdw; 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 19FD568C6D1; Mon, 28 Aug 2023 15:37:00 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-oa1-f42.google.com (mail-oa1-f42.google.com [209.85.160.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 706F368C687 for ; Mon, 28 Aug 2023 15:36:56 +0300 (EEST) Received: by mail-oa1-f42.google.com with SMTP id 586e51a60fabf-1c8e9d75ce1so1766539fac.3 for ; Mon, 28 Aug 2023 05:36:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693226213; x=1693831013; 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=vlgw3U3+j+NXfo8YZ6gma2AXIXPQpoyNN1jrh7wr+RQ=; b=IFoGXBdwlFvKCFuzejvItIyq3sEj+xxn0D30/PDNdNKEmjlDG+Woll3rU6AAfHp7fS 4izC0Oeu7qjta7q4LeXEdYFxEXz3AFzaQmgoCDyCgTIpEC5294NlNENgdDeEd89WKr4r 57c0UtDh1L4vItV7lZ3CEKqis0pb4qK6+GhNyQDwcYa2J6YEe3zOEiVevY1EosW7sO8f TBiU/znBrYj6LE4Nazt9S/kY4YtDv+sdsSHJP7oMx7lnaLZtsEPLB5pWFAfp9iNjEc3G agRSCm9eNNaeVBKjEemEkJJEiW0Ca97TcBICvlhGN3X5MYpDA1wDXg8wbFjxBenh9f7w 1oGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693226213; x=1693831013; 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=vlgw3U3+j+NXfo8YZ6gma2AXIXPQpoyNN1jrh7wr+RQ=; b=Nr/ISinIPX39cvjaY54P1shkK4Ml42ZORbxL1eWDDCKSDg39GmvrLTWNk7hz6dGWq1 yeY1gXi3ysLzKuxe4JyOqnSFtMeXRP2RmYnqKiAhKuelcOW+Fe6qRgR3YVfk8T/9Ul4i hxZ938rUgmr2BG6NtSD5BDcsdwAL5Nh5JAU3Ec2TEWoQazdHm8YCS00q8ptoSTgc47J5 FK0tXvZokVPGJ/uS0W+FMNqf58wrMq4eQwmmupUXDg+PgYcG3CovbVSHvaRPtng/chzk kwhNK5TvkckBUPsIdCJ1PLlCgl7y5zRmY5uEFy8MdFkGieF2ZeHQ66IO0scaZ8YKwJ6j D43A== X-Gm-Message-State: AOJu0YwwP7MbWdIMpIxniG7OoO4sQ0mD8W8oWQGjNAhAA46Kx2+UTBQE uRsiH4rn4YhMqI0zEwQf5phOXY4wLIw= X-Received: by 2002:a05:6870:2185:b0:1bb:9fd0:6b7f with SMTP id l5-20020a056870218500b001bb9fd06b7fmr10940912oae.11.1693226213075; Mon, 28 Aug 2023 05:36:53 -0700 (PDT) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id b15-20020a056830104f00b006b9a98b9659sm3404615otp.19.2023.08.28.05.36.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 05:36:52 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 28 Aug 2023 09:35:01 -0300 Message-ID: <20230828123617.57535-10-jamrial@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230828123617.57535-1-jamrial@gmail.com> References: <20230828123617.57535-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 09/12] fftools/ffmpeg: stop injecting stream side data in packets 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: /kIxzc9oa3cd This is no longer needed as the side data is available for decoders in the AVCodecContext. The tests affected reflect the removal of useless CPB and Stereo 3D side data in packets. Signed-off-by: James Almer --- fftools/ffmpeg_demux.c | 22 ------------------- tests/ref/fate/autorotate | 4 ++-- tests/ref/fate/copy-trac3074 | 2 +- tests/ref/fate/matroska-avoid-negative-ts | 2 +- tests/ref/fate/matroska-dovi-write-config7 | 2 +- tests/ref/fate/matroska-dovi-write-config8 | 2 +- tests/ref/fate/matroska-encoding-delay | 2 +- .../fate/matroska-mastering-display-metadata | 4 ++-- tests/ref/fate/matroska-spherical-mono-remux | 4 ++-- tests/ref/fate/matroska-stereo_mode | 8 +++---- tests/ref/fate/matroska-vp8-alpha-remux | 2 +- .../ref/fate/mov-mp4-disposition-mpegts-remux | 4 ++-- tests/ref/fate/mxf-d10-user-comments | 2 +- tests/ref/fate/mxf-remux-applehdr10 | 2 +- tests/ref/fate/vp9-superframe-bsf | 2 +- 15 files changed, 21 insertions(+), 43 deletions(-) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index 7c66617126..f545e8b499 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -480,28 +480,6 @@ static int input_packet_process(Demuxer *d, DemuxMsg *msg, AVPacket *src) ds->data_size += pkt->size; ds->nb_packets++; - /* add the stream-global side data to the first packet */ - if (ds->nb_packets == 1) { - for (int i = 0; i < ist->st->codecpar->side_data.nb_sd; i++) { - AVPacketSideData *src_sd = ist->st->codecpar->side_data.sd[i]; - uint8_t *dst_data; - - if (src_sd->type == AV_PKT_DATA_DISPLAYMATRIX) - continue; - - if (av_packet_get_side_data(pkt, src_sd->type, NULL)) - continue; - - dst_data = av_packet_new_side_data(pkt, src_sd->type, src_sd->size); - if (!dst_data) { - ret = AVERROR(ENOMEM); - goto fail; - } - - memcpy(dst_data, src_sd->data, src_sd->size); - } - } - if (debug_ts) { av_log(NULL, AV_LOG_INFO, "demuxer+ffmpeg -> ist_index:%d:%d type:%s pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s duration:%s duration_time:%s off:%s off_time:%s\n", f->index, pkt->stream_index, diff --git a/tests/ref/fate/autorotate b/tests/ref/fate/autorotate index dff628bbff..2aa29fafa7 100644 --- a/tests/ref/fate/autorotate +++ b/tests/ref/fate/autorotate @@ -11,8 +11,8 @@ #codec_id 1: ac3 #sample_rate 1: 44100 #channel_layout_name 1: mono -0, -512, 0, 512, 6997, 0x55c700f6, S=1, 40 -1, -256, -256, 1536, 416, 0x92ddc529, S=2, 10, 4 +0, -512, 0, 512, 6997, 0x55c700f6 +1, -256, -256, 1536, 416, 0x92ddc529, S=1, 10 0, 0, 512, 512, 4847, 0xe74f522e, F=0x0 1, 1280, 1280, 1536, 418, 0x0a7fcd2d 0, 512, 1024, 512, 5281, 0xbd4a5dac, F=0x0 diff --git a/tests/ref/fate/copy-trac3074 b/tests/ref/fate/copy-trac3074 index b6d23f8c1c..53ba27e920 100644 --- a/tests/ref/fate/copy-trac3074 +++ b/tests/ref/fate/copy-trac3074 @@ -5,7 +5,7 @@ #codec_id 0: eac3 #sample_rate 0: 48000 #channel_layout_name 0: stereo -0, 0, 0, 1536, 512, 0x2beaf79f, S=1, 4 +0, 0, 0, 1536, 512, 0x2beaf79f 0, 1536, 1536, 1536, 512, 0x29ddf9d6 0, 3072, 3072, 1536, 512, 0xba0afa79 0, 4608, 4608, 1536, 512, 0xe019f394 diff --git a/tests/ref/fate/matroska-avoid-negative-ts b/tests/ref/fate/matroska-avoid-negative-ts index 05821cbf09..3ba289c6e6 100644 --- a/tests/ref/fate/matroska-avoid-negative-ts +++ b/tests/ref/fate/matroska-avoid-negative-ts @@ -11,7 +11,7 @@ dede1d72a28c7eb0a849acf230b08247 *tests/data/fate/matroska-avoid-negative-ts.mat #codec_id 1: mp3 #sample_rate 1: 44100 #channel_layout_name 1: mono -0, -37, 43, 40, 9156, 0xe5bd034a, S=1, 40 +0, -37, 43, 40, 9156, 0xe5bd034a 1, 0, 0, 26, 417, 0x7198c15e 0, 3, 3, 40, 1740, 0x29ac4480, F=0x0 1, 26, 26, 26, 417, 0x3c67c32d diff --git a/tests/ref/fate/matroska-dovi-write-config7 b/tests/ref/fate/matroska-dovi-write-config7 index aaeeb34751..dc5b73a44e 100644 --- a/tests/ref/fate/matroska-dovi-write-config7 +++ b/tests/ref/fate/matroska-dovi-write-config7 @@ -13,7 +13,7 @@ #dimensions 1: 1920x1080 #sar 1: 0/1 0, -83, 0, 41, 699, 0x728548f1 -1, -83, 0, 41, 1085, 0xfb2dba82, S=1, 8 +1, -83, 0, 41, 1085, 0xfb2dba82 0, -42, 167, 41, 95, 0xc0312044, F=0x0 1, -42, 167, 41, 481, 0xf23f91d5, F=0x0 0, 0, 83, 41, 99, 0x5e0a2221, F=0x0 diff --git a/tests/ref/fate/matroska-dovi-write-config8 b/tests/ref/fate/matroska-dovi-write-config8 index 55fe191047..472cbed708 100644 --- a/tests/ref/fate/matroska-dovi-write-config8 +++ b/tests/ref/fate/matroska-dovi-write-config8 @@ -12,7 +12,7 @@ #codec_id 1: aac #sample_rate 1: 44100 #channel_layout_name 1: stereo -0, -67, 0, 33, 63375, 0xc76606ab, S=1, 8 +0, -67, 0, 33, 63375, 0xc76606ab 0, -34, 133, 33, 46706, 0x0e08a7e5, F=0x0 0, 0, 67, 33, 29766, 0x753c031a, F=0x0 1, 0, 0, 23, 6, 0x031e0108 diff --git a/tests/ref/fate/matroska-encoding-delay b/tests/ref/fate/matroska-encoding-delay index d2ff2d07be..ee1989cbcb 100644 --- a/tests/ref/fate/matroska-encoding-delay +++ b/tests/ref/fate/matroska-encoding-delay @@ -12,7 +12,7 @@ #sample_rate 1: 48000 #channel_layout_name 1: stereo 1, -10, -10, 24, 1152, 0x724077b8 -0, 0, 0, 40, 237628, 0xeff25579, S=1, 40 +0, 0, 0, 40, 237628, 0xeff25579 1, 14, 14, 24, 1152, 0x80625572 1, 38, 38, 24, 1152, 0x7d7f4dce 0, 40, 40, 40, 238066, 0xb2265f41 diff --git a/tests/ref/fate/matroska-mastering-display-metadata b/tests/ref/fate/matroska-mastering-display-metadata index 3726469213..53f84c1793 100644 --- a/tests/ref/fate/matroska-mastering-display-metadata +++ b/tests/ref/fate/matroska-mastering-display-metadata @@ -22,9 +22,9 @@ #codec_id 3: ffv1 #dimensions 3: 1280x720 #sar 3: 1/1 -0, 0, 0, 16, 57008, 0x43416399, S=2, 8, 88 +0, 0, 0, 16, 57008, 0x43416399 1, 0, 0, 16, 2403, 0xaa818522 -3, 0, 0, 16, 274117, 0xc439610f, S=2, 8, 88 +3, 0, 0, 16, 274117, 0xc439610f 0, 17, 17, 16, 57248, 0xa06cd7b5 1, 17, 17, 16, 2403, 0xe1a991e5 2, 17, 17, 16, 1602, 0x5d868171 diff --git a/tests/ref/fate/matroska-spherical-mono-remux b/tests/ref/fate/matroska-spherical-mono-remux index e9904b2c92..6fcda14822 100644 --- a/tests/ref/fate/matroska-spherical-mono-remux +++ b/tests/ref/fate/matroska-spherical-mono-remux @@ -12,8 +12,8 @@ fddfea5f05a7a9a0d187df9a72900055 *tests/data/fate/matroska-spherical-mono-remux. #codec_id 1: h264 #dimensions 1: 1920x1080 #sar 1: 0/1 -0, -80, 0, 40, 69118, 0x73cb52f0, S=2, 12, 36 -1, -80, 0, 40, 69118, 0x73cb52f0, S=2, 12, 36 +0, -80, 0, 40, 69118, 0x73cb52f0 +1, -80, 0, 40, 69118, 0x73cb52f0 0, -40, 160, 40, 1103, 0x082a059f, F=0x0 1, -40, 160, 40, 1103, 0x082a059f, F=0x0 [STREAM] diff --git a/tests/ref/fate/matroska-stereo_mode b/tests/ref/fate/matroska-stereo_mode index d406bb9b52..45296e7746 100644 --- a/tests/ref/fate/matroska-stereo_mode +++ b/tests/ref/fate/matroska-stereo_mode @@ -43,10 +43,10 @@ #dimensions 6: 512x512 #sar 6: 2/1 0, 0, 0, 1000, 206173, 0x95af7455 -1, 0, 0, 1000, 206173, 0x95af7455, S=1, 12 -2, 0, 0, 1000, 206173, 0x95af7455, S=1, 12 -3, 0, 0, 1000, 206173, 0x95af7455, S=1, 12 -4, 0, 0, 1000, 206173, 0x95af7455, S=1, 12 +1, 0, 0, 1000, 206173, 0x95af7455 +2, 0, 0, 1000, 206173, 0x95af7455 +3, 0, 0, 1000, 206173, 0x95af7455 +4, 0, 0, 1000, 206173, 0x95af7455 5, 0, 0, 1000, 206173, 0x95af7455 6, 0, 0, 1000, 206173, 0x95af7455 0, 1000, 1000, 1000, 36, 0x34891010, F=0x0 diff --git a/tests/ref/fate/matroska-vp8-alpha-remux b/tests/ref/fate/matroska-vp8-alpha-remux index eba3ffb77a..8117325433 100644 --- a/tests/ref/fate/matroska-vp8-alpha-remux +++ b/tests/ref/fate/matroska-vp8-alpha-remux @@ -5,7 +5,7 @@ #codec_id 0: vp8 #dimensions 0: 320x213 #sar 0: 1/1 -0, 0, 0, 33, 2108, 0x59b92a34, S=2, 1900, 12 +0, 0, 0, 33, 2108, 0x59b92a34, S=1, 1900 0, 32, 32, 33, 142, 0x2f2a3fed, F=0x0, S=1, 160 0, 65, 65, 33, 157, 0x17804767, F=0x0, S=1, 209 0, 99, 99, 33, 206, 0x537262ca, F=0x0, S=1, 317 diff --git a/tests/ref/fate/mov-mp4-disposition-mpegts-remux b/tests/ref/fate/mov-mp4-disposition-mpegts-remux index efef043074..ba419843dc 100644 --- a/tests/ref/fate/mov-mp4-disposition-mpegts-remux +++ b/tests/ref/fate/mov-mp4-disposition-mpegts-remux @@ -10,9 +10,9 @@ adb3b95c07a5f3e0c86641dd62f01dae *tests/data/fate/mov-mp4-disposition-mpegts-rem #codec_id 1: ac3 #sample_rate 1: 48000 #channel_layout_name 1: stereo -1, 0, 0, 1536, 768, 0xa63778d4, S=1, 4 +1, 0, 0, 1536, 768, 0xa63778d4 1, 1536, 1536, 1536, 768, 0x7d577f3f -0, 3072, 3072, 1536, 768, 0xc2867884, S=1, 4 +0, 3072, 3072, 1536, 768, 0xc2867884 1, 3072, 3072, 1536, 768, 0xd86b7c8f 0, 4608, 4608, 1536, 690, 0xa2714bf3 1, 4608, 4608, 1536, 626, 0x09f4382f diff --git a/tests/ref/fate/mxf-d10-user-comments b/tests/ref/fate/mxf-d10-user-comments index 1b59beec7c..ccfdc83f11 100644 --- a/tests/ref/fate/mxf-d10-user-comments +++ b/tests/ref/fate/mxf-d10-user-comments @@ -6,7 +6,7 @@ #codec_id 0: mpeg2video #dimensions 0: 1280x720 #sar 0: 3/4 -0, -1, 0, 1, 150000, 0x0547870d, S=1, 40 +0, -1, 0, 1, 150000, 0x0547870d 0, 0, 1, 1, 150000, 0xe80a1612, F=0x0 0, 1, 2, 1, 150000, 0xc5c50e2f, F=0x0 0, 2, 3, 1, 150000, 0x51e28a04, F=0x0 diff --git a/tests/ref/fate/mxf-remux-applehdr10 b/tests/ref/fate/mxf-remux-applehdr10 index 29e0e03a72..9fbf8b60c7 100644 --- a/tests/ref/fate/mxf-remux-applehdr10 +++ b/tests/ref/fate/mxf-remux-applehdr10 @@ -10,7 +10,7 @@ #codec_id 1: pcm_s24le #sample_rate 1: 48000 #channel_layout_name 1: mono -0, 0, 0, 1, 57008, 0x43416399, S=1, 88 +0, 0, 0, 1, 57008, 0x43416399 1, 0, 0, 801, 2403, 0x00000000 0, 1, 1, 1, 57248, 0xa06cd7b5 1, 801, 801, 801, 2403, 0x00000000 diff --git a/tests/ref/fate/vp9-superframe-bsf b/tests/ref/fate/vp9-superframe-bsf index d7985c6973..485644dfb2 100644 --- a/tests/ref/fate/vp9-superframe-bsf +++ b/tests/ref/fate/vp9-superframe-bsf @@ -3,7 +3,7 @@ #codec_id 0: vp9 #dimensions 0: 352x288 #sar 0: 1/1 -0, 0, 0, 33, 6958, 0x38e58ee6, S=1, 12 +0, 0, 0, 33, 6958, 0x38e58ee6 0, 33, 33, 33, 852, 0x3edf9ed0, F=0x0 0, 66, 66, 33, 27, 0x62d007e5, F=0x0 0, 100, 100, 33, 25, 0x51980749, F=0x0