From patchwork Fri Apr 14 16:42:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 41182 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4645:b0:e3:3194:9d20 with SMTP id eb5csp642329pzb; Fri, 14 Apr 2023 09:43:07 -0700 (PDT) X-Google-Smtp-Source: AKy350aBuhZboq+CaAbhNEyCuANzQcxP9E5Fr/R5lvgfQPHFnpjjBos75/xfW50h01qTTjZN28li X-Received: by 2002:a17:907:3203:b0:94e:e99f:ae5 with SMTP id xg3-20020a170907320300b0094ee99f0ae5mr2597852ejb.65.1681490586886; Fri, 14 Apr 2023 09:43:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681490586; cv=none; d=google.com; s=arc-20160816; b=nVGHsYQnwJt+wKTnA59cU1ijR4SjIjssB3FUzDomzEGdgKCMDU2y2dLhIe5BPKpXuT RMU3eBoJGlX1g7mfZh+CZvj2rlGv5PhNosMSc5INwKXMAH+RPt/jwiCyhYUI6az6630z a1sNN4TYVzZGE6xPM2rUIio2OMK4wCpXXT3cOHhCFOMmhQ8/zYXNtbNxggPzrO35yphX 18cMznLp94YmfWLph6u3aOGA1y6mKWGQpbGf6R4LdyA1TfDFzxiTJQJDOk8vM4Zi3sqL QCFe4fgRRFw1GSV0/8wvWCixKkNLm5ESB8PWZRchDBdBleTgTPxgqO/EtpM947VB4zR1 53SQ== 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 :delivered-to; bh=JHru05shEmxxAWG6facM1qc0fIbv4PcLrHmgNClCttg=; b=C4TSArPngL3bYuf5aU9EY1wd448Dml1b1VLpdz9lML78fXHUMg6FHQuxBFY6aEVrNv Rdqt3RUFxAz5F5mEgL9mVQK9E7slFWvJ3gc/+qogNk9coSPG73uds4Zx+2JbyVN70ZPs RkvPCIG46G5N/7bNxx7hE5+0quIzBq8y3Oj+cENKPlTuuDGrwyExU2od6cPKbz4Ad28J p1EMTRIaIJ+9y34/UxKwkkS6GV1Tgdno2I8Q+qFAy3w1VQ/Fjg/z3qh6moGRX6KKuZHB Pp7GzSWqLkgQ4EOO6aDeKsCiMKGjXmjrWwDlcBCfPdZsSVVxBrBpr2YBNNCmWbg8Ms8U ykSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id fl23-20020a1709072a9700b008b90d160acbsi4616701ejc.579.2023.04.14.09.43.04; Fri, 14 Apr 2023 09:43: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; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 53ECC68BEB1; Fri, 14 Apr 2023 19:43:01 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 26B1168B79A for ; Fri, 14 Apr 2023 19:42:55 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 90AED2405F9 for ; Fri, 14 Apr 2023 18:42:54 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id sjcw9F4O51Yt for ; Fri, 14 Apr 2023 18:42:54 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 230AA2404EC for ; Fri, 14 Apr 2023 18:42:54 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 9E8A43A0191 for ; Fri, 14 Apr 2023 18:42:47 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 14 Apr 2023 18:42:38 +0200 Message-Id: <20230414164244.15264-1-anton@khirnov.net> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/7] lavfi: ensure audio frame durations match the sample count 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: lGVwnhEMcRPb --- libavfilter/avfilter.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 8d5702a0c8..d2e9ba47ef 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -997,6 +997,14 @@ int ff_filter_frame(AVFilterLink *link, AVFrame *frame) av_log(link->dst, AV_LOG_ERROR, "Sample rate change is not supported\n"); goto error; } + + frame->duration = av_rescale_q(frame->nb_samples, (AVRational){ 1, frame->sample_rate }, + link->time_base); +#if FF_API_PKT_DURATION +FF_DISABLE_DEPRECATION_WARNINGS + frame->pkt_duration = frame->duration; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } link->frame_blocked_in = link->frame_wanted_out = 0; From patchwork Fri Apr 14 16:42:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 41184 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4645:b0:e3:3194:9d20 with SMTP id eb5csp642460pzb; Fri, 14 Apr 2023 09:43:21 -0700 (PDT) X-Google-Smtp-Source: AKy350Y6I/FlkLJjeCKADF9gFqpprsvRf/Zi3LAQzmZxSBzDTxm+qiBMVYML0/IQ+kKrgBmWiQ+z X-Received: by 2002:a17:907:238d:b0:94e:83d3:1b51 with SMTP id vf13-20020a170907238d00b0094e83d31b51mr5439630ejb.23.1681490601583; Fri, 14 Apr 2023 09:43:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681490601; cv=none; d=google.com; s=arc-20160816; b=UkLrytv8QKFLF8V8SDHJ6eXicwFlGzInzHvP+sym+VcV+D7671gomN3OvnA0C9kHeV ldKxrYfC2CIA2ZfhUW/flBoM4msnlriIqyp/OeSpDS2nw00l0hwxhyMP6k9hXaNmP388 dP6yDgmrUi7iPhr2MyA4VMqdP9AHnzHekdjPthmVwsTHqAn5D5UWAg7XVRwxHEyYJdYQ sgC5rkcC2uRrlwFshnmEmS1yK9buZbsPfk1p8DkOMdxxehMKYlxVCIWWHketNCoYANSF i/VMUf0OSe/n+YBmz5JbZJiS5pR1LL9+py0wrvDVm11N/EdNHiCYIiN9+CR9mBeaUhv5 TyZQ== 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:delivered-to; bh=/OtQKgDblMPOOBTqF+Q2byW3KFfBhlgNFEnzQYQkJ/4=; b=F6KO+NPjAadpvdCBmfAiNd5EhbjLIImFnhDRCAGmzL+XG+jKLrR+cy/3X274li1Js7 UWYbo9rkq2KQBa2/AbIrRnXv6LC6hwaoMswHife2DE0k7H+18rEdg1oLdX6kcU7lwOY8 zDl+Y8NOD1X3uen0jKwe+kh9UuUBykAuh2LC+rt0jwNlDShEnP2HQYYFkor+JvndxvdV 84o5TOsbO8uHuucOliJgWmbFcA88Syhy20V9TKv3LRBNYRl0yI3xXANLhvcGsVtHfs9h 1R/MC3yhJGEeHp8VOePrTtcCSe2y1+HkTBUiyxHSnUYWiIxx/jiKu7yVviO+LqvL5SqK vw8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id s10-20020a1709060d6a00b0094974b981d3si4727838ejh.915.2023.04.14.09.43.21; Fri, 14 Apr 2023 09:43:21 -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; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8DB0F68BECF; Fri, 14 Apr 2023 19:43:03 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8EC5F68B79A for ; Fri, 14 Apr 2023 19:42:55 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 596202404F8 for ; Fri, 14 Apr 2023 18:42:55 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id yXe5VdiF_52O for ; Fri, 14 Apr 2023 18:42:54 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 2A77D2404EE for ; Fri, 14 Apr 2023 18:42:54 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id AB6523A039B for ; Fri, 14 Apr 2023 18:42:47 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 14 Apr 2023 18:42:39 +0200 Message-Id: <20230414164244.15264-2-anton@khirnov.net> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230414164244.15264-1-anton@khirnov.net> References: <20230414164244.15264-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/7] lavc/encode: do not use pkt_duration for encoding 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: Jac2VZbpBK/E Current code prefers deprecated AVFrame.pkt_duration over its replacement AVFrame.duration whenever the former is set and not equal to the latter. However, duration will only be actually used when the caller sets the AV_CODEC_FLAG_FRAME_DURATION flag, which was added _after_ AVFrame.duration. This implies that any caller aware of AV_CODEC_FLAG_FRAME_DURATION is also aware of AVFrame.duration. pkt_duration should then never be used. --- libavcodec/encode.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/libavcodec/encode.c b/libavcodec/encode.c index 041fc7670e..0f11efc481 100644 --- a/libavcodec/encode.c +++ b/libavcodec/encode.c @@ -457,13 +457,6 @@ static int encode_send_frame_internal(AVCodecContext *avctx, const AVFrame *src) finish: -#if FF_API_PKT_DURATION -FF_DISABLE_DEPRECATION_WARNINGS - if (dst->pkt_duration && dst->pkt_duration != dst->duration) - dst->duration = dst->pkt_duration; -FF_ENABLE_DEPRECATION_WARNINGS -#endif - if (avctx->codec->type == AVMEDIA_TYPE_VIDEO) { ret = encode_generate_icc_profile(avctx, dst); if (ret < 0) From patchwork Fri Apr 14 16:42:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 41186 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4645:b0:e3:3194:9d20 with SMTP id eb5csp642612pzb; Fri, 14 Apr 2023 09:43:38 -0700 (PDT) X-Google-Smtp-Source: AKy350Yy4dONankoQ1bW32yStaCAmRVh/qJqpeXYBUyohYpa4RRRWYuX5dvmDHAZ4AFfNzk5V7lP X-Received: by 2002:a50:ed1a:0:b0:506:7d3e:ade5 with SMTP id j26-20020a50ed1a000000b005067d3eade5mr2922205eds.33.1681490618296; Fri, 14 Apr 2023 09:43:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681490618; cv=none; d=google.com; s=arc-20160816; b=z5ecLf6j0gfJ40gP0rButY+yhCbDOCDufUpZpxtfQxSN54Ugb0+I+zWSi3cssQ6eFg Lpl51iHhMK6xftTZM+2yo2B5fUzdRAZ+N+O6YFjCbL5KJXyQ69k01R+7IwYYGdBqDNEs eBziY9xzyYI14M4etaiFgP52NE7Tg+i/Keaag/idpA8Oe3J3gl4G7ezj0G+CAkHhgeMK Eb6GM0ZVg72EtDCDnhCspHWEfcRbidMHtV4Mzz9bkVHCwoWMEh4bCFRhYU0mmIMQziFP gv9iWFnecVicCrNBvS8dtncB75num0HrXEDWxeC8jsz7qd4Sh22Rcwt/QDO9dke+cG24 RVDg== 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:delivered-to; bh=j41PIAT/ocDYzamNeFph6b9RrR4pirgZgZGBlbSh3JQ=; b=SYebtv3HdzImCmH1spfLRla+78Ne3rQsGSFAg0a4PDtpuY7H+tM83lJPImcgYVapGM gh0SGFqAFKQXDPPg0p7LJ+119NKQwg1ZSEE6pqaubPPBC7Ey9ZHYszhhdlwmmhjVMz1P kFag5lJzaeqD+b7AyPFFpGY9q2R1dog8A8yHWFYNjrQUU1UECDfw1uHBxK4bb7n/3wrw AP/tPdIGLP7++PDraDBj9GxNIQZmM40M6d5rDOS8qWqVQ74y7jEy/xfoQGJXwiIs1NsD kPguE7qHxV74Rrzd9E+jRmYXNMFvsCQCS7KR5/zDajta6MlzIiesyyOUvDlR+8L1ccS8 PpXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id bm15-20020a0564020b0f00b005050354b69asi4749683edb.185.2023.04.14.09.43.37; Fri, 14 Apr 2023 09:43:38 -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; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8711A68BEF3; Fri, 14 Apr 2023 19:43:05 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 24EB468BEB1 for ; Fri, 14 Apr 2023 19:42:56 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id D8D1B240591 for ; Fri, 14 Apr 2023 18:42:55 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id Lyr_XrL-J0vF for ; Fri, 14 Apr 2023 18:42:55 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 2C7672404F5 for ; Fri, 14 Apr 2023 18:42:54 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id B6B5A3A03E5 for ; Fri, 14 Apr 2023 18:42:47 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 14 Apr 2023 18:42:40 +0200 Message-Id: <20230414164244.15264-3-anton@khirnov.net> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230414164244.15264-1-anton@khirnov.net> References: <20230414164244.15264-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/7] lavc/mjpegdec: simplify smvjpeg_receive_frame() 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: LRZiqOgrdz+P Unify the code for returning the first and every subsequent frame in a packet. --- libavcodec/mjpegdec.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 3fc18aac73..0a69c42459 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -3020,26 +3020,20 @@ static int smvjpeg_receive_frame(AVCodecContext *avctx, AVFrame *frame) { MJpegDecodeContext *s = avctx->priv_data; AVPacket *const pkt = avctx->internal->in_pkt; - int64_t pkt_dts; int got_frame = 0; int ret; - if (s->smv_next_frame > 0) { - av_assert0(s->smv_frame->buf[0]); - ret = av_frame_ref(frame, s->smv_frame); - if (ret < 0) - return ret; - - smv_process_frame(avctx, frame); - return 0; - } + if (s->smv_next_frame > 0) + goto return_frame; ret = ff_decode_get_packet(avctx, pkt); if (ret < 0) return ret; - ret = ff_mjpeg_decode_frame(avctx, frame, &got_frame, pkt); - pkt_dts = pkt->dts; + av_frame_unref(s->smv_frame); + + ret = ff_mjpeg_decode_frame(avctx, s->smv_frame, &got_frame, pkt); + s->smv_frame->pkt_dts = pkt->dts; av_packet_unref(pkt); if (ret < 0) return ret; @@ -3047,11 +3041,9 @@ static int smvjpeg_receive_frame(AVCodecContext *avctx, AVFrame *frame) if (!got_frame) return AVERROR(EAGAIN); - frame->pkt_dts = pkt_dts; - - av_assert0(frame->buf[0]); - av_frame_unref(s->smv_frame); - ret = av_frame_ref(s->smv_frame, frame); +return_frame: + av_assert0(s->smv_frame->buf[0]); + ret = av_frame_ref(frame, s->smv_frame); if (ret < 0) return ret; From patchwork Fri Apr 14 16:42:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 41185 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4645:b0:e3:3194:9d20 with SMTP id eb5csp642565pzb; Fri, 14 Apr 2023 09:43:34 -0700 (PDT) X-Google-Smtp-Source: AKy350ZjOIpEN02741lvh1VLMqnqm3iPpSW3yEhv2WxdlxRFZcpvPdU+CasCmHwAEXCad/8xiOhG X-Received: by 2002:a17:906:7c81:b0:94e:732f:a594 with SMTP id w1-20020a1709067c8100b0094e732fa594mr7881289ejo.23.1681490613844; Fri, 14 Apr 2023 09:43:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681490613; cv=none; d=google.com; s=arc-20160816; b=ukPiCRJM9Y+RjpxW7k+Jzq87QxYnBIztZLjypPflRJd31oGLkyraDcqhSUcri6vM9E ZLlCZ1K05whPvdoWG/S19uK43WSioKMiBnin2D6J2DY7ZYwZhEGrOKWIehW4MaH4XsuM eouK6s8sSwMeYegFHqBXv8vEx7pxm/FCTSntoxvKG7Nnb4+v+0MGWI0bmFcAsScH6KJY j0UydBqbJn8mccXlTWzzCMeg/Fsg0FlzCOEB77F0ta4YVA7sSp5atHfFNgHydaSzGuHe 6G4ve0FyA8gDFCb7YJGw1wyews2Xo6sJmC3QCYheb3VTZpxyEtQXBOAjXUwO+4ZveB2J v1+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:delivered-to; bh=hsA4qIBmuhCM+xXDsfJ8AKLJsjxi3kqPlFYqKnN/r8k=; b=nfTpJY+PNJsEEhyLR+fqRfVTTwiaNGA15IbDJVGX/zOYlL5fhxHhxKhZZWjnzIfK3z SyhFeSlb9z+CQhfDQOHXMqFSvMdUEm5sncxvfdBXx6fI/QlHX+bNCfLcDZYAWlrq+7VZ oTDPbRGHXomygLst7f+glgUM4ttT8sxsMrlOQzqdoUVfXK+8uSAaU/k2jFqhXQvH4Vly k2bANh1jQzKK6UWnwG6VyfGS25ccEtOaFCk4Hg3UcALIMNbQM+g4BBzjCdBHwyCdizWp ZJq/xiu4E/ea0eNaDzNvM9mTgbgAFF/9shb0XAJIQoFa85lbTxhMe9PoDIpCL3+eSUKy Z7TA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id fb21-20020a1709073a1500b0094ede5840d4si2172372ejc.704.2023.04.14.09.43.29; Fri, 14 Apr 2023 09:43:33 -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; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7ACEB68BEEC; Fri, 14 Apr 2023 19:43:04 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D843E68B79A for ; Fri, 14 Apr 2023 19:42:55 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 9D4352404EE for ; Fri, 14 Apr 2023 18:42:55 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id IDMrDLvl4-2v for ; Fri, 14 Apr 2023 18:42:55 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 30464240591 for ; Fri, 14 Apr 2023 18:42:54 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id C16493A0404 for ; Fri, 14 Apr 2023 18:42:47 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 14 Apr 2023 18:42:41 +0200 Message-Id: <20230414164244.15264-4-anton@khirnov.net> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230414164244.15264-1-anton@khirnov.net> References: <20230414164244.15264-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/7] lavc/mjpegdec: properly set pts and duration for smvjpeg 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: 0qd5Bumf8wdB A single smvjpeg packet decodes into one large mjpeg frame, slices of which are then returned as output frames. Packet duration covers all of these slices. --- libavcodec/mjpegdec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 0a69c42459..9b0137c91c 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -3010,6 +3010,8 @@ static void smv_process_frame(AVCodecContext *avctx, AVFrame *frame) frame->crop_top = FFMIN(s->smv_next_frame * avctx->height, frame->height); frame->crop_bottom = frame->height - (s->smv_next_frame + 1) * avctx->height; + if (s->smv_frame->pts != AV_NOPTS_VALUE) + s->smv_frame->pts += s->smv_frame->duration; s->smv_next_frame = (s->smv_next_frame + 1) % s->smv_frames_per_jpeg; if (s->smv_next_frame == 0) @@ -3041,6 +3043,9 @@ static int smvjpeg_receive_frame(AVCodecContext *avctx, AVFrame *frame) if (!got_frame) return AVERROR(EAGAIN); + // packet duration covers all the frames in the packet + s->smv_frame->duration /= s->smv_frames_per_jpeg; + return_frame: av_assert0(s->smv_frame->buf[0]); ret = av_frame_ref(frame, s->smv_frame); From patchwork Fri Apr 14 16:42:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 41183 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4645:b0:e3:3194:9d20 with SMTP id eb5csp642421pzb; Fri, 14 Apr 2023 09:43:17 -0700 (PDT) X-Google-Smtp-Source: AKy350Y4QopXaXDaCetQrlR/chNq0q41JIX0mlOBOq8RBLPA4Z00SwwBIDF0xDjq1xspT9xa4dQJ X-Received: by 2002:a05:6402:2141:b0:505:745:a271 with SMTP id bq1-20020a056402214100b005050745a271mr7683951edb.23.1681490596974; Fri, 14 Apr 2023 09:43:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681490596; cv=none; d=google.com; s=arc-20160816; b=Q2ch3UsSYQXFndrykUh1AX3igIGu1TAGH4FPqv8BYYYREed1IqA4HtpBgDMd0BsbOh wM74wJXQC5ZTYUFPvPFtNJz51y422AqbQH+FSlzEchk2vKoj0XtjUCw/duDMUCD2yP0J NgD9GHEn4aniA0qa7gs6VhH2C0++R4tKqjR2Pwnvxmh19kONVe8Xt/canvn8uB8G1DWH gCAyuFdRenz90SQEkKk90+R1Mr5+4uYHzfP3otIdMvfjzRUYTqu8FAi1E8FjX6ATVnKp D2uM1QyiIB7IvnIw1yi+fRcoqyJucd2pHESZXb1l0JnDctv/XP0g69+J4898d3I1a8by GGGg== 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:delivered-to; bh=TtqNAnW/vlERaQ3fL/IFKs58MrS4RIYCIeHg4HoGHIA=; b=uyNl+7AqTT81gpqPayki0Avy3SRKKcf2Nji+Hho0bb4FdKeINTXdf057Hb8AlmrPm8 KP4+Qd+Wu577xBSRBK+KjuzrgBws8NdESayAgQrti/ujjNZVtCQQc0oRGrQTsHQ8J7pM 40h27MhKwlSNekMs/C2gZ7vjXD++JsOK23X78GL3oM5wYNUkyy0TBOTfXlIm4tdRyNKw u8f6Irlgzc/Ke3JkX5vR0yUARAJyVaZkWOTjqMZXZGvgPSjbVx80oSqJ2AVQoKjlXw3O bg2D0ThopmHeqLh2YeLwG+AeLeZR/s+gwnNABf6y0PwU1YakKawf6jtNVCPXqp1mhej8 ILRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id m9-20020aa7c489000000b005048cf4f5b7si4503171edq.489.2023.04.14.09.43.13; Fri, 14 Apr 2023 09:43:16 -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; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6CB0E68BEE0; Fri, 14 Apr 2023 19:43:02 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5CC1168B79A for ; Fri, 14 Apr 2023 19:42:55 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 1E7882404EC for ; Fri, 14 Apr 2023 18:42:55 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id biyzQkWaOAh0 for ; Fri, 14 Apr 2023 18:42:54 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 2E7232404F8 for ; Fri, 14 Apr 2023 18:42:54 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id CC1FD3A042D for ; Fri, 14 Apr 2023 18:42:47 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 14 Apr 2023 18:42:42 +0200 Message-Id: <20230414164244.15264-5-anton@khirnov.net> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230414164244.15264-1-anton@khirnov.net> References: <20230414164244.15264-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 5/7] fftools/sync_queue: update audio frame duration when re-chunking 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: 1kee9CtEgPI2 --- fftools/sync_queue.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fftools/sync_queue.c b/fftools/sync_queue.c index 42a6b89b79..a7aac04047 100644 --- a/fftools/sync_queue.c +++ b/fftools/sync_queue.c @@ -431,7 +431,7 @@ static int receive_samples(SyncQueue *sq, SyncQueueStream *st, offset_audio(src.f, nb_samples); st->samples_queued -= nb_samples; - return 0; + goto finish; } // otherwise allocate a new frame and copy the data @@ -474,6 +474,10 @@ static int receive_samples(SyncQueue *sq, SyncQueueStream *st, dst->nb_samples += to_copy; } +finish: + dst->duration = av_rescale_q(nb_samples, (AVRational){ 1, dst->sample_rate }, + dst->time_base); + return 0; fail: From patchwork Fri Apr 14 16:42:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 41187 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4645:b0:e3:3194:9d20 with SMTP id eb5csp642740pzb; Fri, 14 Apr 2023 09:43:51 -0700 (PDT) X-Google-Smtp-Source: AKy350bfe5/kdhn0IHIkqvxUX5U0wKSYqWmftLuhsiIahkoKtBBLr2s7PnbJChJWnHHIJuL7M05S X-Received: by 2002:a17:907:2395:b0:878:711d:9310 with SMTP id vf21-20020a170907239500b00878711d9310mr6201923ejb.1.1681490631381; Fri, 14 Apr 2023 09:43:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681490631; cv=none; d=google.com; s=arc-20160816; b=wzUpsybOYsJUSKE/f74+VejFEiq1ltTfXjP0HQHrNuKQlI5zI4eQNiYxebbQdeKw/h xXbP/0V/EaEh0QEIQSC89g0B+3Gg613enR8i/dSyIGLi3EwZkXQz8jaXRryaK6eL2LkF 3qZClXUYfRu7KYtnoaOv6Cq8Q8BWQxR6gn+nG7Ev+FffCYCRYo16ap1+TkTXey5Hdsk7 jry0dWkRZFYCtT16S2nO3AoxGj4/b5fe+oVEyWqry0yiS+lrVnW1g9mZCl94RpJUy9e5 +RoV3OkGR3LaOHPdCFRzhrue3/f3/NsDTbM4DufxHEAzMFMEJYStCj3H3gBzCwso8mCN U/jQ== 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:delivered-to; bh=jca3DbFRTuXg7rFMILiuDsfEqPR8ZPP3WqVNDVzxS6A=; b=hPDnKIg+w/shB2l3DF44FM8XncVKsdS6wKQGPSjuTd9flsrs3DS3FNwCkFIqMK3oln Q9r1ORc0AvGWp7iZY1L5xPqLqfp9yfIzRHWkpS3EABJAdLA3MaXCwmoIvCpU5Fiu3L6j Zay7qnHsx9KP+KwFmhpakY0h3b/W7teoItHm3UBbWkAkHWTUcKeynxWxxCYMo/NJIc5q /1M7vfgskRyPXscRPYmIkgPSNpi6r4B4k6ECdzEKwAV4uoIjZr9BvznwvczfQg4c0/hE uia1xHg96eP6cqo++O3X7mrwhBrxcAm0I0qGenYGXSCwdONwxfF4a0ukOwQ/8cizvJgQ Qmsg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id n2-20020a1709062bc200b00932af15caa7si4828920ejg.731.2023.04.14.09.43.46; Fri, 14 Apr 2023 09:43:51 -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; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9272F68BEFF; Fri, 14 Apr 2023 19:43:06 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 631B168BEF3 for ; Fri, 14 Apr 2023 19:43:00 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 23D122404F5 for ; Fri, 14 Apr 2023 18:42:56 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id u0v4hw9RC02C for ; Fri, 14 Apr 2023 18:42:55 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 33B8C2405B5 for ; Fri, 14 Apr 2023 18:42:54 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id D70C23A0567 for ; Fri, 14 Apr 2023 18:42:47 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 14 Apr 2023 18:42:43 +0200 Message-Id: <20230414164244.15264-6-anton@khirnov.net> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230414164244.15264-1-anton@khirnov.net> References: <20230414164244.15264-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 6/7] fftools/ffmpeg_enc: set audio frame duration when encoding 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: h5lQqb40ucGb --- fftools/ffmpeg_enc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index a0779c45ae..00cccef65b 100644 --- a/fftools/ffmpeg_enc.c +++ b/fftools/ffmpeg_enc.c @@ -795,6 +795,8 @@ static void do_audio_out(OutputFile *of, OutputStream *ost, av_rescale_q(start_time, AV_TIME_BASE_Q, enc->time_base); } frame->time_base = enc->time_base; + frame->duration = av_rescale_q(frame->nb_samples, (AVRational){1, frame->sample_rate}, + enc->time_base); if (!check_recording_time(ost, frame->pts, frame->time_base)) return; From patchwork Fri Apr 14 16:42:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 41188 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4645:b0:e3:3194:9d20 with SMTP id eb5csp642794pzb; Fri, 14 Apr 2023 09:43:55 -0700 (PDT) X-Google-Smtp-Source: AKy350aV0TnOcIUs8IqP4cs68+X7F2IJ94GIK9gWf+LT3arwMWdS8jK3/aYMUYOJr0LT9IP9Ymah X-Received: by 2002:aa7:c148:0:b0:501:d43e:d1e3 with SMTP id r8-20020aa7c148000000b00501d43ed1e3mr7589445edp.8.1681490635587; Fri, 14 Apr 2023 09:43:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681490635; cv=none; d=google.com; s=arc-20160816; b=lqpuDCivrZ7W/g7ZFLTqA93v1IdnjXyKHg24X+cOMTmNCWZNiUsb3dBb4vAxMILbWS NGESmJK6tBq05j81aWrFQtqaRUQUhAgtkWhW3rldi0heztKr/BJC5S4QJojL4DgL+23z LKuoKdsN5XlsDHWt76dtvS/jpoiXeYknZYYC0niFJBZE8NfYZ1Gm0C0bVAq3twtZqWW9 Y9GPRlXQ8LDqZ9nCwD8tY/SnQ+iEv3ym2bSu+SLGufyTkduGL+AHbkuzsRjAs6rhyPAn 4+rztWiwgFdvu9DhIwryFcVahQJNgqEDH9nLigOqJwnaLCdaSiq1rMmb566j+kze1Rm7 nNuQ== 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:delivered-to; bh=+ol2UMtunhs8s8R2htxt1RGpM5Ru5pi/W087SQGDGvQ=; b=x6QjBcc+r6tIlQrTJfKaNmILdwv6qLwwvIH9DS19qDA0XnhSyCotlFBaDVXL29qa8o Ou8TPE6iTpG1jCD5tyEpnwUgmEkP7tPnVs7RadFBwKN9In7cExBphy6eDYRWpEK32z9Q QG29TLtGkT70cJLOoiTpRFWM06geNLBtbeyhEScXbmz5Wx472cPMONWhmxH7ub+Nb+ow pTnkbm1JMlkBydL+MlDWQaxVeMLtKiki6lXegTFyTgyNQgNPcCHfpmCgsdOgocruGM/U G64t20CyXNXtYZqZaluAwnUYbTAbLA53s6hBcUUEWlYNRNLrZmIGxmtKiSPBDi1BtTOB bnWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id r24-20020a056402019800b005066ccdf27fsi4285524edv.345.2023.04.14.09.43.55; Fri, 14 Apr 2023 09:43:55 -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; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8B1BE68BF06; Fri, 14 Apr 2023 19:43:07 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6DE1468BEF4 for ; Fri, 14 Apr 2023 19:43:00 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 1E3222405B5 for ; Fri, 14 Apr 2023 18:42:57 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 6sGeEgdUsdsM for ; Fri, 14 Apr 2023 18:42:55 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 5512F2405EC for ; Fri, 14 Apr 2023 18:42:54 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id E2F6D3A0586 for ; Fri, 14 Apr 2023 18:42:47 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 14 Apr 2023 18:42:44 +0200 Message-Id: <20230414164244.15264-7-anton@khirnov.net> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230414164244.15264-1-anton@khirnov.net> References: <20230414164244.15264-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 7/7] fftools/ffmpeg: propagate frame durations to packets when encoding 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: YwXTUPyzYr8W Remove now-obsolete code setting packet durations pre-muxing for CFR encoded video. Changes output in the following FATE tests: * numerous adpcm tests * ffmpeg-filter_complex_audio * lavf-asf * lavf-mkv * lavf-mkv_attachment * matroska-encoding-delay All of these change due to the fact that the output duration is now the actual input data duration and does not include padding added by the encoder. * apng-osample: less wrong packet durations are now passed to the muxer. They are not entirely correct, because the first frame duration should be 3 rather than 2. This is caused by the vsync code and should be addressed later, but this change is a step in the right direction. * tscc2-mov: last output frame has a duration of 11 rather than 1 - this corresponds to the duration actually returned by the demuxer. * film-cvid: video frame durations are now 2 rather than 1 - this corresponds to durations actually returned by the demuxer and matches the timestamps. * mpeg2-ticket6677: durations of some video frames are now 2 rather than 1 - this matches the timestamps. --- fftools/ffmpeg_enc.c | 2 + fftools/ffmpeg_mux.c | 9 - tests/ref/acodec/adpcm-ima_wav | 2 +- tests/ref/acodec/adpcm-ima_wav-trellis | 2 +- tests/ref/acodec/adpcm-ms | 2 +- tests/ref/acodec/adpcm-ms-trellis | 2 +- tests/ref/acodec/adpcm-swf | 2 +- tests/ref/acodec/adpcm-swf-trellis | 2 +- tests/ref/acodec/adpcm-swf-wav | 2 +- tests/ref/acodec/adpcm-yamaha | 2 +- tests/ref/acodec/adpcm-yamaha-trellis | 2 +- tests/ref/fate/apng-osample | 12 +- tests/ref/fate/autorotate | 4 +- tests/ref/fate/ffmpeg-filter_complex_audio | 2 +- tests/ref/fate/film-cvid | 216 ++++++++++----------- tests/ref/fate/matroska-encoding-delay | 2 +- tests/ref/fate/mpeg2-ticket6677 | 4 +- tests/ref/fate/tscc2-mov | 2 +- tests/ref/lavf/asf | 2 +- tests/ref/lavf/mkv | 2 +- tests/ref/lavf/mkv_attachment | 2 +- 21 files changed, 135 insertions(+), 142 deletions(-) diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index 00cccef65b..d7259e6ccb 100644 --- a/fftools/ffmpeg_enc.c +++ b/fftools/ffmpeg_enc.c @@ -322,6 +322,8 @@ int enc_open(OutputStream *ost, AVFrame *frame) return ret; } + av_dict_set(&ost->encoder_opts, "flags", "+frame_duration", AV_DICT_MULTIKEY); + ret = hw_device_setup_for_encode(ost); if (ret < 0) { av_log(ost, AV_LOG_ERROR, diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index b316925115..f23e237d37 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -77,15 +77,6 @@ static int write_packet(Muxer *mux, OutputStream *ost, AVPacket *pkt) if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && ost->vsync_method == VSYNC_DROP) pkt->pts = pkt->dts = AV_NOPTS_VALUE; - if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) { - if (ost->frame_rate.num && ost->is_cfr) { - if (pkt->duration > 0) - av_log(ost, AV_LOG_WARNING, "Overriding packet duration by frame rate, this should not happen\n"); - pkt->duration = av_rescale_q(1, av_inv_q(ost->frame_rate), - pkt->time_base); - } - } - av_packet_rescale_ts(pkt, pkt->time_base, ost->st->time_base); pkt->time_base = ost->st->time_base; diff --git a/tests/ref/acodec/adpcm-ima_wav b/tests/ref/acodec/adpcm-ima_wav index bd3306dfc5..44ca53a565 100644 --- a/tests/ref/acodec/adpcm-ima_wav +++ b/tests/ref/acodec/adpcm-ima_wav @@ -1,4 +1,4 @@ -56b75c3a6dacedcf2ce7b0586aa33594 *tests/data/fate/acodec-adpcm-ima_wav.wav +af0b82a719762cc6e1a952a6081231cf *tests/data/fate/acodec-adpcm-ima_wav.wav 267324 tests/data/fate/acodec-adpcm-ima_wav.wav 78a2af1c895792d0c221d127bdd48ece *tests/data/fate/acodec-adpcm-ima_wav.out.wav stddev: 903.51 PSNR: 37.21 MAXDIFF:34026 bytes: 1058400/ 1061748 diff --git a/tests/ref/acodec/adpcm-ima_wav-trellis b/tests/ref/acodec/adpcm-ima_wav-trellis index 10d78c74f2..29c28edddf 100644 --- a/tests/ref/acodec/adpcm-ima_wav-trellis +++ b/tests/ref/acodec/adpcm-ima_wav-trellis @@ -1,4 +1,4 @@ -f9075c7a3adb2cd114b0bac69afcada6 *tests/data/fate/acodec-adpcm-ima_wav-trellis.wav +6f0df0f3275f833c341d63b9054caebb *tests/data/fate/acodec-adpcm-ima_wav-trellis.wav 267324 tests/data/fate/acodec-adpcm-ima_wav-trellis.wav 26a9b280c14737b159c56e60181f1170 *tests/data/fate/acodec-adpcm-ima_wav-trellis.out.wav stddev: 710.03 PSNR: 39.30 MAXDIFF:25944 bytes: 1058400/ 1061748 diff --git a/tests/ref/acodec/adpcm-ms b/tests/ref/acodec/adpcm-ms index c760b783c2..9f546c9b77 100644 --- a/tests/ref/acodec/adpcm-ms +++ b/tests/ref/acodec/adpcm-ms @@ -1,4 +1,4 @@ -a407b87daeef5b25dfb6c5b3f519e9c1 *tests/data/fate/acodec-adpcm-ms.wav +ed29590dc005c64940c46cfe4a0e8eba *tests/data/fate/acodec-adpcm-ms.wav 268378 tests/data/fate/acodec-adpcm-ms.wav 7be370f937c51e8a967e6a3d08d5156a *tests/data/fate/acodec-adpcm-ms.out.wav stddev: 1050.01 PSNR: 35.91 MAXDIFF:29806 bytes: 1058400/ 1060576 diff --git a/tests/ref/acodec/adpcm-ms-trellis b/tests/ref/acodec/adpcm-ms-trellis index 8587e703c6..e7ea230dba 100644 --- a/tests/ref/acodec/adpcm-ms-trellis +++ b/tests/ref/acodec/adpcm-ms-trellis @@ -1,4 +1,4 @@ -7ed05f7a88046aa4cd547ddf71953637 *tests/data/fate/acodec-adpcm-ms-trellis.wav +70deb036ed0bf3dd03699eafbbfa51b7 *tests/data/fate/acodec-adpcm-ms-trellis.wav 268378 tests/data/fate/acodec-adpcm-ms-trellis.wav ed9d9cdfd264f2ec6c79127c04dd224e *tests/data/fate/acodec-adpcm-ms-trellis.out.wav stddev: 896.03 PSNR: 37.28 MAXDIFF:28029 bytes: 1058400/ 1060576 diff --git a/tests/ref/acodec/adpcm-swf b/tests/ref/acodec/adpcm-swf index 61d92da084..0bc9d6ffd0 100644 --- a/tests/ref/acodec/adpcm-swf +++ b/tests/ref/acodec/adpcm-swf @@ -1,4 +1,4 @@ -64aedd1487cb355406dde36d2bba374f *tests/data/fate/acodec-adpcm-swf.flv +03bda567604b31c86c8740a044eedb1d *tests/data/fate/acodec-adpcm-swf.flv 267801 tests/data/fate/acodec-adpcm-swf.flv 9d061488fdc1a557bdc454b9d1aba59c *tests/data/fate/acodec-adpcm-swf.out.wav stddev: 919.82 PSNR: 37.06 MAXDIFF:51119 bytes: 1058400/ 1064960 diff --git a/tests/ref/acodec/adpcm-swf-trellis b/tests/ref/acodec/adpcm-swf-trellis index f4c69ca622..a6f9b10ac0 100644 --- a/tests/ref/acodec/adpcm-swf-trellis +++ b/tests/ref/acodec/adpcm-swf-trellis @@ -1,4 +1,4 @@ -fde151ce9b8be0e144e72113508bcff6 *tests/data/fate/acodec-adpcm-swf-trellis.flv +83d6efddeb11bb0f0a4131a6384c7e4b *tests/data/fate/acodec-adpcm-swf-trellis.flv 267801 tests/data/fate/acodec-adpcm-swf-trellis.flv 6a0007e42d92a225a8becddedccf9a0f *tests/data/fate/acodec-adpcm-swf-trellis.out.wav stddev: 731.05 PSNR: 39.05 MAXDIFF:51119 bytes: 1058400/ 1064960 diff --git a/tests/ref/acodec/adpcm-swf-wav b/tests/ref/acodec/adpcm-swf-wav index 80ce287b01..a6c51c565e 100644 --- a/tests/ref/acodec/adpcm-swf-wav +++ b/tests/ref/acodec/adpcm-swf-wav @@ -1,4 +1,4 @@ -a21ee5ba531ec89e306d78c861eb6ed1 *tests/data/fate/acodec-adpcm-swf-wav.wav +e8a4ac69e50211f3ef828d26b7051397 *tests/data/fate/acodec-adpcm-swf-wav.wav 266624 tests/data/fate/acodec-adpcm-swf-wav.wav 9d061488fdc1a557bdc454b9d1aba59c *tests/data/fate/acodec-adpcm-swf-wav.out.wav stddev: 919.82 PSNR: 37.06 MAXDIFF:51119 bytes: 1058400/ 1064960 diff --git a/tests/ref/acodec/adpcm-yamaha b/tests/ref/acodec/adpcm-yamaha index f3e6dbede2..8b94979245 100644 --- a/tests/ref/acodec/adpcm-yamaha +++ b/tests/ref/acodec/adpcm-yamaha @@ -1,4 +1,4 @@ -245c194e84d482a70ca89de9c0bbd591 *tests/data/fate/acodec-adpcm-yamaha.wav +4719ae6d28c4b13c270caefb34fde140 *tests/data/fate/acodec-adpcm-yamaha.wav 265274 tests/data/fate/acodec-adpcm-yamaha.wav 758b4aee62964831d0a335ada9672104 *tests/data/fate/acodec-adpcm-yamaha.out.wav stddev: 1242.71 PSNR: 34.44 MAXDIFF:39960 bytes: 1058400/ 1060864 diff --git a/tests/ref/acodec/adpcm-yamaha-trellis b/tests/ref/acodec/adpcm-yamaha-trellis index 909a95139b..f653f21492 100644 --- a/tests/ref/acodec/adpcm-yamaha-trellis +++ b/tests/ref/acodec/adpcm-yamaha-trellis @@ -1,4 +1,4 @@ -c8306ada93ef52b1e87b6758853f4937 *tests/data/fate/acodec-adpcm-yamaha-trellis.wav +6601c0c29d2ac6ed2eee94b13bc3f289 *tests/data/fate/acodec-adpcm-yamaha-trellis.wav 265274 tests/data/fate/acodec-adpcm-yamaha-trellis.wav 8ad27b0ea7e13e70ed334b5ec26c62ef *tests/data/fate/acodec-adpcm-yamaha-trellis.out.wav stddev: 926.56 PSNR: 36.99 MAXDIFF:33570 bytes: 1058400/ 1060864 diff --git a/tests/ref/fate/apng-osample b/tests/ref/fate/apng-osample index 5fca5e667d..c91dd5284d 100644 --- a/tests/ref/fate/apng-osample +++ b/tests/ref/fate/apng-osample @@ -3,9 +3,9 @@ #codec_id 0: rawvideo #dimensions 0: 116x135 #sar 0: 0/1 -0, 0, 0, 1, 62640, 0x31eb581d -0, 3, 3, 1, 62640, 0x29e11b82 -0, 6, 6, 1, 62640, 0x207ed588 -0, 9, 9, 1, 62640, 0x3845c906 -0, 12, 12, 1, 62640, 0x6797fe69 -0, 15, 15, 1, 62640, 0x1f086a09 +0, 0, 0, 2, 62640, 0x31eb581d +0, 3, 3, 3, 62640, 0x29e11b82 +0, 6, 6, 3, 62640, 0x207ed588 +0, 9, 9, 3, 62640, 0x3845c906 +0, 12, 12, 3, 62640, 0x6797fe69 +0, 15, 15, 3, 62640, 0x1f086a09 diff --git a/tests/ref/fate/autorotate b/tests/ref/fate/autorotate index c18a017abf..dff628bbff 100644 --- a/tests/ref/fate/autorotate +++ b/tests/ref/fate/autorotate @@ -1,5 +1,5 @@ -e432aa783e79208a61052f6ced525fff *tests/data/fate/autorotate.mov -197358 tests/data/fate/autorotate.mov +701a366a5b97ea92b0e25f5d059a0dd6 *tests/data/fate/autorotate.mov +197366 tests/data/fate/autorotate.mov #extradata 0: 34, 0x9d7d073f #tb 0: 1/15360 #media_type 0: video diff --git a/tests/ref/fate/ffmpeg-filter_complex_audio b/tests/ref/fate/ffmpeg-filter_complex_audio index 0d1f650040..3f2f670514 100644 --- a/tests/ref/fate/ffmpeg-filter_complex_audio +++ b/tests/ref/fate/ffmpeg-filter_complex_audio @@ -6,4 +6,4 @@ 0, -256, -256, 1536, 416, 0x3001fb2d 0, 1280, 1280, 1536, 418, 0xba72fc16 0, 2816, 2816, 1536, 418, 0xba72fc16 -0, 4352, 4352, 1536, 418, 0xba72fc16 +0, 4352, 4352, 3, 418, 0xba72fc16 diff --git a/tests/ref/fate/film-cvid b/tests/ref/fate/film-cvid index 24540bf131..60bbc192d8 100644 --- a/tests/ref/fate/film-cvid +++ b/tests/ref/fate/film-cvid @@ -4,112 +4,112 @@ #dimensions 0: 320x224 #sar 0: 0/1 0, 0, 0, 1, 215040, 0x067c5362 -0, 2, 2, 1, 215040, 0xd9eacb98 -0, 4, 4, 1, 215040, 0x3c8a4cbd -0, 6, 6, 1, 215040, 0xbdf996e1 -0, 8, 8, 1, 215040, 0x1b7fa123 -0, 10, 10, 1, 215040, 0x834b4a8d -0, 12, 12, 1, 215040, 0xf4b1bebe -0, 14, 14, 1, 215040, 0x088c3802 -0, 16, 16, 1, 215040, 0xf6ddedb9 -0, 18, 18, 1, 215040, 0x2791d538 -0, 20, 20, 1, 215040, 0x81fe4688 -0, 22, 22, 1, 215040, 0xad864fbd -0, 24, 24, 1, 215040, 0xa637a97a -0, 26, 26, 1, 215040, 0x2287e378 -0, 28, 28, 1, 215040, 0x13a017d7 -0, 30, 30, 1, 215040, 0x89a4acee -0, 32, 32, 1, 215040, 0x97888ffc -0, 34, 34, 1, 215040, 0x7c2c3b58 -0, 36, 36, 1, 215040, 0x2e3ab808 -0, 38, 38, 1, 215040, 0x2d553af2 -0, 40, 40, 1, 215040, 0x929c420e -0, 42, 42, 1, 215040, 0x4841bd6d -0, 44, 44, 1, 215040, 0xb350fbcd -0, 46, 46, 1, 215040, 0x0d70b918 -0, 48, 48, 1, 215040, 0xf98b0f47 -0, 50, 50, 1, 215040, 0x748b8ff2 -0, 52, 52, 1, 215040, 0x62017c38 -0, 54, 54, 1, 215040, 0x46042bb4 -0, 56, 56, 1, 215040, 0xe7a74806 -0, 58, 58, 1, 215040, 0xb4c856e6 -0, 60, 60, 1, 215040, 0xb21a28dd -0, 62, 62, 1, 215040, 0x2a6e0834 -0, 64, 64, 1, 215040, 0x7044d6ca -0, 66, 66, 1, 215040, 0x17780335 -0, 68, 68, 1, 215040, 0x94f51e7a -0, 70, 70, 1, 215040, 0x5beb5f5f -0, 72, 72, 1, 215040, 0xc7d59527 -0, 74, 74, 1, 215040, 0x40f69049 -0, 76, 76, 1, 215040, 0x1f78740e -0, 78, 78, 1, 215040, 0x49f7265d -0, 80, 80, 1, 215040, 0x057ac5c9 -0, 82, 82, 1, 215040, 0x649bd476 -0, 84, 84, 1, 215040, 0x1c75aa43 -0, 86, 86, 1, 215040, 0xc4bd1e29 -0, 88, 88, 1, 215040, 0x5033fa74 -0, 90, 90, 1, 215040, 0xba5c949e -0, 92, 92, 1, 215040, 0x2fa78a0e -0, 94, 94, 1, 215040, 0x9d363dce -0, 96, 96, 1, 215040, 0xd1dc82b0 -0, 98, 98, 1, 215040, 0xd25be322 -0, 100, 100, 1, 215040, 0xf1374ef9 -0, 102, 102, 1, 215040, 0x33467b42 -0, 104, 104, 1, 215040, 0x7ec7dfad -0, 106, 106, 1, 215040, 0x706ed416 -0, 108, 108, 1, 215040, 0x6576b3eb -0, 110, 110, 1, 215040, 0x6576b3eb -0, 112, 112, 1, 215040, 0x6576b3eb -0, 114, 114, 1, 215040, 0x6576b3eb -0, 116, 116, 1, 215040, 0x6576b3eb -0, 118, 118, 1, 215040, 0x6576b3eb -0, 120, 120, 1, 215040, 0x6576b3eb -0, 122, 122, 1, 215040, 0x6873993d -0, 124, 124, 1, 215040, 0x8c2a84d8 -0, 126, 126, 1, 215040, 0xdd456bd5 -0, 128, 128, 1, 215040, 0x50fa4f3d -0, 130, 130, 1, 215040, 0x00c4369c -0, 132, 132, 1, 215040, 0xe4c220d2 -0, 134, 134, 1, 215040, 0xe43a033b -0, 136, 136, 1, 215040, 0x72f6e32c -0, 138, 138, 1, 215040, 0xb738c69c -0, 140, 140, 1, 215040, 0x56bda3fe -0, 142, 142, 1, 215040, 0xaa2f7da3 -0, 144, 144, 1, 215040, 0xf21f5c24 -0, 146, 146, 1, 215040, 0xd33e3579 -0, 148, 148, 1, 215040, 0x6a601495 -0, 150, 150, 1, 215040, 0xdfcff1e0 -0, 152, 152, 1, 215040, 0xa774d327 -0, 154, 154, 1, 215040, 0x8e9db8c9 -0, 156, 156, 1, 215040, 0xb4fd9689 -0, 158, 158, 1, 215040, 0xa80b77ff -0, 160, 160, 1, 215040, 0x1d9c6568 -0, 162, 162, 1, 215040, 0x388c515a -0, 164, 164, 1, 215040, 0x388c515a -0, 166, 166, 1, 215040, 0x388c515a -0, 168, 168, 1, 215040, 0x388c515a -0, 170, 170, 1, 215040, 0x388c515a -0, 172, 172, 1, 215040, 0x388c515a -0, 174, 174, 1, 215040, 0x388c515a -0, 176, 176, 1, 215040, 0x388c515a -0, 178, 178, 1, 215040, 0x388c515a -0, 180, 180, 1, 215040, 0x388c515a -0, 182, 182, 1, 215040, 0x388c515a -0, 184, 184, 1, 215040, 0x3aef5fee -0, 186, 186, 1, 215040, 0x3aef5fee -0, 188, 188, 1, 215040, 0x3aef5fee -0, 190, 190, 1, 215040, 0x3aef5fee -0, 192, 192, 1, 215040, 0x7f8e4b62 -0, 194, 194, 1, 215040, 0xbf9fcae8 -0, 196, 196, 1, 215040, 0x02f9a66c -0, 198, 198, 1, 215040, 0x00ef062f -0, 200, 200, 1, 215040, 0xe83b132c -0, 202, 202, 1, 215040, 0x2701d21b -0, 204, 204, 1, 215040, 0xbea79188 -0, 206, 206, 1, 215040, 0x6f6d3109 -0, 208, 208, 1, 215040, 0x4173f1e8 -0, 210, 210, 1, 215040, 0xd7adfce1 -0, 212, 212, 1, 215040, 0xa3825ffd -0, 214, 214, 1, 215040, 0x41e63fe4 -0, 216, 216, 1, 215040, 0xb525b9c5 +0, 2, 2, 2, 215040, 0xd9eacb98 +0, 4, 4, 2, 215040, 0x3c8a4cbd +0, 6, 6, 2, 215040, 0xbdf996e1 +0, 8, 8, 2, 215040, 0x1b7fa123 +0, 10, 10, 2, 215040, 0x834b4a8d +0, 12, 12, 2, 215040, 0xf4b1bebe +0, 14, 14, 2, 215040, 0x088c3802 +0, 16, 16, 2, 215040, 0xf6ddedb9 +0, 18, 18, 2, 215040, 0x2791d538 +0, 20, 20, 2, 215040, 0x81fe4688 +0, 22, 22, 2, 215040, 0xad864fbd +0, 24, 24, 2, 215040, 0xa637a97a +0, 26, 26, 2, 215040, 0x2287e378 +0, 28, 28, 2, 215040, 0x13a017d7 +0, 30, 30, 2, 215040, 0x89a4acee +0, 32, 32, 2, 215040, 0x97888ffc +0, 34, 34, 2, 215040, 0x7c2c3b58 +0, 36, 36, 2, 215040, 0x2e3ab808 +0, 38, 38, 2, 215040, 0x2d553af2 +0, 40, 40, 2, 215040, 0x929c420e +0, 42, 42, 2, 215040, 0x4841bd6d +0, 44, 44, 2, 215040, 0xb350fbcd +0, 46, 46, 2, 215040, 0x0d70b918 +0, 48, 48, 2, 215040, 0xf98b0f47 +0, 50, 50, 2, 215040, 0x748b8ff2 +0, 52, 52, 2, 215040, 0x62017c38 +0, 54, 54, 2, 215040, 0x46042bb4 +0, 56, 56, 2, 215040, 0xe7a74806 +0, 58, 58, 2, 215040, 0xb4c856e6 +0, 60, 60, 2, 215040, 0xb21a28dd +0, 62, 62, 2, 215040, 0x2a6e0834 +0, 64, 64, 2, 215040, 0x7044d6ca +0, 66, 66, 2, 215040, 0x17780335 +0, 68, 68, 2, 215040, 0x94f51e7a +0, 70, 70, 2, 215040, 0x5beb5f5f +0, 72, 72, 2, 215040, 0xc7d59527 +0, 74, 74, 2, 215040, 0x40f69049 +0, 76, 76, 2, 215040, 0x1f78740e +0, 78, 78, 2, 215040, 0x49f7265d +0, 80, 80, 2, 215040, 0x057ac5c9 +0, 82, 82, 2, 215040, 0x649bd476 +0, 84, 84, 2, 215040, 0x1c75aa43 +0, 86, 86, 2, 215040, 0xc4bd1e29 +0, 88, 88, 2, 215040, 0x5033fa74 +0, 90, 90, 2, 215040, 0xba5c949e +0, 92, 92, 2, 215040, 0x2fa78a0e +0, 94, 94, 2, 215040, 0x9d363dce +0, 96, 96, 2, 215040, 0xd1dc82b0 +0, 98, 98, 2, 215040, 0xd25be322 +0, 100, 100, 2, 215040, 0xf1374ef9 +0, 102, 102, 2, 215040, 0x33467b42 +0, 104, 104, 2, 215040, 0x7ec7dfad +0, 106, 106, 2, 215040, 0x706ed416 +0, 108, 108, 2, 215040, 0x6576b3eb +0, 110, 110, 2, 215040, 0x6576b3eb +0, 112, 112, 2, 215040, 0x6576b3eb +0, 114, 114, 2, 215040, 0x6576b3eb +0, 116, 116, 2, 215040, 0x6576b3eb +0, 118, 118, 2, 215040, 0x6576b3eb +0, 120, 120, 2, 215040, 0x6576b3eb +0, 122, 122, 2, 215040, 0x6873993d +0, 124, 124, 2, 215040, 0x8c2a84d8 +0, 126, 126, 2, 215040, 0xdd456bd5 +0, 128, 128, 2, 215040, 0x50fa4f3d +0, 130, 130, 2, 215040, 0x00c4369c +0, 132, 132, 2, 215040, 0xe4c220d2 +0, 134, 134, 2, 215040, 0xe43a033b +0, 136, 136, 2, 215040, 0x72f6e32c +0, 138, 138, 2, 215040, 0xb738c69c +0, 140, 140, 2, 215040, 0x56bda3fe +0, 142, 142, 2, 215040, 0xaa2f7da3 +0, 144, 144, 2, 215040, 0xf21f5c24 +0, 146, 146, 2, 215040, 0xd33e3579 +0, 148, 148, 2, 215040, 0x6a601495 +0, 150, 150, 2, 215040, 0xdfcff1e0 +0, 152, 152, 2, 215040, 0xa774d327 +0, 154, 154, 2, 215040, 0x8e9db8c9 +0, 156, 156, 2, 215040, 0xb4fd9689 +0, 158, 158, 2, 215040, 0xa80b77ff +0, 160, 160, 2, 215040, 0x1d9c6568 +0, 162, 162, 2, 215040, 0x388c515a +0, 164, 164, 2, 215040, 0x388c515a +0, 166, 166, 2, 215040, 0x388c515a +0, 168, 168, 2, 215040, 0x388c515a +0, 170, 170, 2, 215040, 0x388c515a +0, 172, 172, 2, 215040, 0x388c515a +0, 174, 174, 2, 215040, 0x388c515a +0, 176, 176, 2, 215040, 0x388c515a +0, 178, 178, 2, 215040, 0x388c515a +0, 180, 180, 2, 215040, 0x388c515a +0, 182, 182, 2, 215040, 0x388c515a +0, 184, 184, 2, 215040, 0x3aef5fee +0, 186, 186, 2, 215040, 0x3aef5fee +0, 188, 188, 2, 215040, 0x3aef5fee +0, 190, 190, 2, 215040, 0x3aef5fee +0, 192, 192, 2, 215040, 0x7f8e4b62 +0, 194, 194, 2, 215040, 0xbf9fcae8 +0, 196, 196, 2, 215040, 0x02f9a66c +0, 198, 198, 2, 215040, 0x00ef062f +0, 200, 200, 2, 215040, 0xe83b132c +0, 202, 202, 2, 215040, 0x2701d21b +0, 204, 204, 2, 215040, 0xbea79188 +0, 206, 206, 2, 215040, 0x6f6d3109 +0, 208, 208, 2, 215040, 0x4173f1e8 +0, 210, 210, 2, 215040, 0xd7adfce1 +0, 212, 212, 2, 215040, 0xa3825ffd +0, 214, 214, 2, 215040, 0x41e63fe4 +0, 216, 216, 2, 215040, 0xb525b9c5 0, 218, 218, 1, 215040, 0x00000000 diff --git a/tests/ref/fate/matroska-encoding-delay b/tests/ref/fate/matroska-encoding-delay index 086fe94e93..437992468d 100644 --- a/tests/ref/fate/matroska-encoding-delay +++ b/tests/ref/fate/matroska-encoding-delay @@ -1,4 +1,4 @@ -ce2ab14d45217a043f9f50fe6adfe5ce *tests/data/fate/matroska-encoding-delay.matroska +416f35d123daef715b7c4bbb75c9c778 *tests/data/fate/matroska-encoding-delay.matroska 961251 tests/data/fate/matroska-encoding-delay.matroska #extradata 0: 22, 0x32ea0490 #tb 0: 1/1000 diff --git a/tests/ref/fate/mpeg2-ticket6677 b/tests/ref/fate/mpeg2-ticket6677 index 2079a08c20..01e46b559b 100644 --- a/tests/ref/fate/mpeg2-ticket6677 +++ b/tests/ref/fate/mpeg2-ticket6677 @@ -4,9 +4,9 @@ #dimensions 0: 720x480 #sar 0: 8/9 0, 1, 1, 1, 518400, 0xc1866f5f -0, 2, 2, 1, 518400, 0x9ba32764 +0, 2, 2, 2, 518400, 0x9ba32764 0, 4, 4, 1, 518400, 0xa9031bb8 0, 5, 5, 1, 518400, 0x5e2c3502 0, 6, 6, 1, 518400, 0xe860027a -0, 7, 7, 1, 518400, 0xa9152430 +0, 7, 7, 2, 518400, 0xa9152430 0, 9, 9, 1, 518400, 0xb98dd9f7 diff --git a/tests/ref/fate/tscc2-mov b/tests/ref/fate/tscc2-mov index 679f5bb63c..068002a82e 100644 --- a/tests/ref/fate/tscc2-mov +++ b/tests/ref/fate/tscc2-mov @@ -7,4 +7,4 @@ 0, 1, 1, 1, 1180116, 0x6f73e080 0, 2, 2, 1, 1180116, 0x5244d9e5 0, 3, 3, 1, 1180116, 0x629bf10f -0, 4, 4, 1, 1180116, 0x97c726cb +0, 4, 4, 11, 1180116, 0x97c726cb diff --git a/tests/ref/lavf/asf b/tests/ref/lavf/asf index fbcbd480d0..340461fdb5 100644 --- a/tests/ref/lavf/asf +++ b/tests/ref/lavf/asf @@ -1,3 +1,3 @@ -76f131a5426f0ba5fc7409d1a1bbfdd7 *tests/data/lavf/lavf.asf +776cd99d73857d4ef824e3936c6a0932 *tests/data/lavf/lavf.asf 333585 tests/data/lavf/lavf.asf tests/data/lavf/lavf.asf CRC=0xf6340a10 diff --git a/tests/ref/lavf/mkv b/tests/ref/lavf/mkv index 0aeb7cfae6..5d0bf06fa9 100644 --- a/tests/ref/lavf/mkv +++ b/tests/ref/lavf/mkv @@ -1,3 +1,3 @@ -fde4f0580865684b878f0e13997213af *tests/data/lavf/lavf.mkv +1dce6c32d49a8f637262db2d8e7f2744 *tests/data/lavf/lavf.mkv 320439 tests/data/lavf/lavf.mkv tests/data/lavf/lavf.mkv CRC=0xec6c3c68 diff --git a/tests/ref/lavf/mkv_attachment b/tests/ref/lavf/mkv_attachment index 6ab72b9a45..b79bf9a619 100644 --- a/tests/ref/lavf/mkv_attachment +++ b/tests/ref/lavf/mkv_attachment @@ -1,3 +1,3 @@ -c75c844f592d44c2a79ff5fc1e8179e0 *tests/data/lavf/lavf.mkv_attachment +140ffb4f6a734972a9d38f4e6d57f304 *tests/data/lavf/lavf.mkv_attachment 472589 tests/data/lavf/lavf.mkv_attachment tests/data/lavf/lavf.mkv_attachment CRC=0xec6c3c68