From patchwork Wed Mar 11 23:42:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jan_Ekstr=C3=B6m?= X-Patchwork-Id: 18132 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id B897944A6E4 for ; Thu, 12 Mar 2020 02:07:43 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 958C168ABAC; Thu, 12 Mar 2020 02:07:43 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0C532689BC2 for ; Thu, 12 Mar 2020 02:07:37 +0200 (EET) Received: by mail-ed1-f48.google.com with SMTP id m25so5139512edq.8 for ; Wed, 11 Mar 2020 17:07:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=cZjpzZsIJ6LyBfwWACrA8Fg0MonkoB9cbgSX/8pEPlM=; b=rZs6SokyhB8ptzOETXHFBIeo73NfWRU4mJPRgn8dm1tt+Rxdv7Ou5t5jv5COoUWiLr UrEu3d8ykxDVpCmp6MrVkMRXB6t28TsmcW9krnM4ZHxNu1wU8Kp1IljUVfcyDElpxsrR MWiH+yp/8E4I7JK8qIUgdjPoBy91KibydvqXOnZ3T4o6EEFBQzCYpi43Z3zi2pBvUIv9 +OFwWdWRJRa4XnzwL1ou/wjJUWy+jrRnyubTx8SyMK1u1CtkUfqBr9bfDqxTr+QRFGzW lR2xzV/gvZAvn2X4xCfg8hETFiMygmmW2fGkikQXxVELf2KQ4iamc0NTU0icg/gW83i7 MAOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=cZjpzZsIJ6LyBfwWACrA8Fg0MonkoB9cbgSX/8pEPlM=; b=LTpDreygmJuXlgLJJ0lce9Hr45fk85l3r+Txj2HxYeY8stknBOvckXcim21k9ftATb 0aP5ZV25pEOwvzx49EnN/TzgWGe1LoHiL18JG4lTKJ9CUAFVxQ44y7XRMsaumYAJ75VG oA9rO9zxkd65mgSfi/9S9k0OSGj3YAMv7eCEcfQrATKczOroDULR/UFL/6/aWz7Jh1vq QuQivmpEVSGuI1YctMXIQMmNPhct7HXCxLZ1zLtj+5E3tqmTOP0VqKf4Z1jIUMuyKPvJ YSzc1+Pkd1LDrbgY0eN5lxH5m6Yn9V19BtFNtAGbty/vfOtqz7HBK5nGd0ofu0k9S1QN 4KQg== X-Gm-Message-State: ANhLgQ1tIsJ68nULfCwquDdJbb1SLEeEfX8X56JD4+H1wpxYF/a1GWw9 w7lVbC7FLSsyEk2c9EqYR1QT6We1 X-Google-Smtp-Source: ADFU+vuJbV1aYekFWLjEb6evsVhgFuCaywjKrTizbSrIdwH5nXyZV2RQKkL3mwJHrFdpfQ69HHrCEw== X-Received: by 2002:a2e:8112:: with SMTP id d18mr3322238ljg.137.1583970165805; Wed, 11 Mar 2020 16:42:45 -0700 (PDT) Received: from localhost.localdomain (91-159-194-103.elisa-laajakaista.fi. [91.159.194.103]) by smtp.gmail.com with ESMTPSA id e9sm16471250ljp.24.2020.03.11.16.42.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 16:42:45 -0700 (PDT) From: =?utf-8?q?Jan_Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Thu, 12 Mar 2020 01:42:42 +0200 Message-Id: <20200311234244.28303-1-jeebjp@gmail.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/3] ffmpeg: explicitly handle sub2video subpicture initialization X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Each time the sub2video structure is initialized, the sub2video subpicture is initialized together with the first received heartbeat. The heartbeat's PTS is utilized as the subpicture start time. Additionally, add some documentation on the stages. --- fftools/ffmpeg.c | 22 +++++++++++++++------- fftools/ffmpeg.h | 3 ++- fftools/ffmpeg_filter.c | 8 +++++++- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index e5fbd479a8..aaaf241314 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -237,7 +237,7 @@ static void sub2video_push_ref(InputStream *ist, int64_t pts) } } -void sub2video_update(InputStream *ist, AVSubtitle *sub) +void sub2video_update(InputStream *ist, int64_t heartbeat_pts, AVSubtitle *sub) { AVFrame *frame = ist->sub2video.frame; int8_t *dst; @@ -254,7 +254,12 @@ void sub2video_update(InputStream *ist, AVSubtitle *sub) AV_TIME_BASE_Q, ist->st->time_base); num_rects = sub->num_rects; } else { - pts = ist->sub2video.end_pts; + /* If we are initializing the system, utilize current heartbeat + PTS as the start time, and show until the following subpicture + is received. Otherwise, utilize the previous subpicture's end time + as the fall-back value. */ + pts = ist->sub2video.initialize ? + heartbeat_pts : ist->sub2video.end_pts; end_pts = INT64_MAX; num_rects = 0; } @@ -269,6 +274,7 @@ void sub2video_update(InputStream *ist, AVSubtitle *sub) sub2video_copy_rect(dst, dst_linesize, frame->width, frame->height, sub->rects[i]); sub2video_push_ref(ist, pts); ist->sub2video.end_pts = end_pts; + ist->sub2video.initialize = 0; } static void sub2video_heartbeat(InputStream *ist, int64_t pts) @@ -291,9 +297,11 @@ static void sub2video_heartbeat(InputStream *ist, int64_t pts) /* do not send the heartbeat frame if the subtitle is already ahead */ if (pts2 <= ist2->sub2video.last_pts) continue; - if (pts2 >= ist2->sub2video.end_pts || - (!ist2->sub2video.frame->data[0] && ist2->sub2video.end_pts < INT64_MAX)) - sub2video_update(ist2, NULL); + if (pts2 >= ist2->sub2video.end_pts || ist2->sub2video.initialize) + /* if we have hit the end of the current displayed subpicture, + or if we need to initialize the system, update the + overlayed subpicture and its start/end times */ + sub2video_update(ist2, pts2 + 1, NULL); for (j = 0, nb_reqs = 0; j < ist2->nb_filters; j++) nb_reqs += av_buffersrc_get_nb_failed_requests(ist2->filters[j]->filter); if (nb_reqs) @@ -307,7 +315,7 @@ static void sub2video_flush(InputStream *ist) int ret; if (ist->sub2video.end_pts < INT64_MAX) - sub2video_update(ist, NULL); + sub2video_update(ist, INT64_MAX, NULL); for (i = 0; i < ist->nb_filters; i++) { ret = av_buffersrc_add_frame(ist->filters[i]->filter, NULL); if (ret != AVERROR_EOF && ret < 0) @@ -2507,7 +2515,7 @@ static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output, return ret; if (ist->sub2video.frame) { - sub2video_update(ist, &subtitle); + sub2video_update(ist, INT64_MIN, &subtitle); } else if (ist->nb_filters) { if (!ist->sub2video.sub_queue) ist->sub2video.sub_queue = av_fifo_alloc(8 * sizeof(AVSubtitle)); diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index c0b8eb599f..fbaae15377 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -348,6 +348,7 @@ typedef struct InputStream { AVFifoBuffer *sub_queue; ///< queue of AVSubtitle* before filter init AVFrame *frame; int w, h; + unsigned int initialize; ///< marks if sub2video_update should force an initialization } sub2video; int dr1; @@ -645,7 +646,7 @@ int filtergraph_is_simple(FilterGraph *fg); int init_simple_filtergraph(InputStream *ist, OutputStream *ost); int init_complex_filtergraph(FilterGraph *fg); -void sub2video_update(InputStream *ist, AVSubtitle *sub); +void sub2video_update(InputStream *ist, int64_t heartbeat_pts, AVSubtitle *sub); int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *frame); diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 40cc4c191c..b66faa50b5 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -740,6 +740,12 @@ static int sub2video_prepare(InputStream *ist, InputFilter *ifilter) return AVERROR(ENOMEM); ist->sub2video.last_pts = INT64_MIN; ist->sub2video.end_pts = INT64_MIN; + + /* sub2video structure has been (re-)initialized. + Mark it as such so that the system will be + initialized with the first received heartbeat. */ + ist->sub2video.initialize = 1; + return 0; } @@ -1168,7 +1174,7 @@ int configure_filtergraph(FilterGraph *fg) while (av_fifo_size(ist->sub2video.sub_queue)) { AVSubtitle tmp; av_fifo_generic_read(ist->sub2video.sub_queue, &tmp, sizeof(tmp), NULL); - sub2video_update(ist, &tmp); + sub2video_update(ist, INT64_MIN, &tmp); avsubtitle_free(&tmp); } } From patchwork Wed Mar 11 23:42:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jan_Ekstr=C3=B6m?= X-Patchwork-Id: 18130 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 4E967449AC9 for ; Thu, 12 Mar 2020 01:48:47 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 205BE68AD7C; Thu, 12 Mar 2020 01:48:47 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 646C368A2B6 for ; Thu, 12 Mar 2020 01:48:40 +0200 (EET) Received: by mail-lj1-f169.google.com with SMTP id a10so4296349ljp.11 for ; Wed, 11 Mar 2020 16:48:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=tU5cj8IhOsrQLhD4VCGiJ4N+nz6o4YmySWYBnvFqEFc=; b=JFJm2QicbpTrmAbbuArZwl+WbHp6wMgMXer33kd5NelHf3gOxO0NNhMGOB6czvMuY+ PXqdZUdHSAKD4T6XVZCPEL8/q9b5qJpxItezAx76YkBKwXNwVOTqnt0PTksAz7fMFS3R e4UP1sBbUQvbN2//BM9/4duJbTsrL4dRXMfdd4Rki7VfaVWQXbXzPSRa1bCIDvoOU0OP 2sUTblpNUIg/cSydFEnqp/0swO3Z7JrZJzxz7v8SIleSSgXiqRKB1V6lWRmgvnBUksWE sl1UHuUgVS+VhDfifg4gNmFNYnjPgkgGn1StSdj1rh9CW90At2f6nYvAFUS8RoCzK+C5 DgDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tU5cj8IhOsrQLhD4VCGiJ4N+nz6o4YmySWYBnvFqEFc=; b=chiB28iMfg+dUp+M3yTfnXBnBVVphkCX0pPj1LffAgB7sHeG9z/G0yUt+x4+hBrEE8 bIo5tz0yJUeFb+q/ge5gD3VqQWGmhc358GKG6RtQzZoW6vSdhv6kXcMx4htaEYu8bbxC aymM5uSFb9ad1r6/4iaENqFhba2n0PealHva1fP2aFcwOF4PVKLZGfog9a29u+2a6kk4 X57kFRRO8dB5d2msBel6EOmY5yDLTq15FU/k3daQn2d312OpR+WRLHRs5t8Eqq2/L7Kr RWfNrrDZgjPaEW6Q7V9v6uN+egEKHRd4V7szTOqYEdDrOCQFIZ0KWVhSKYXD/XhunyE+ Rgmw== X-Gm-Message-State: ANhLgQ2JKP3XG2AOwALl0rUs3WrISs779s91xYpFD7GVPJxLdrF3fJ1A 4Po0C6GvAesHWJ1RjwEPq97xvnK0 X-Google-Smtp-Source: ADFU+vtoAEOwhIe2SbXS2d6Or46gITN+JQa38z7NO35xZigafn7lzGvjho7psflIvXzeOGuaHXnxdA== X-Received: by 2002:a19:f601:: with SMTP id x1mr1872900lfe.55.1583970166847; Wed, 11 Mar 2020 16:42:46 -0700 (PDT) Received: from localhost.localdomain (91-159-194-103.elisa-laajakaista.fi. [91.159.194.103]) by smtp.gmail.com with ESMTPSA id e9sm16471250ljp.24.2020.03.11.16.42.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 16:42:46 -0700 (PDT) From: =?utf-8?q?Jan_Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Thu, 12 Mar 2020 01:42:43 +0200 Message-Id: <20200311234244.28303-2-jeebjp@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200311234244.28303-1-jeebjp@gmail.com> References: <20200311234244.28303-1-jeebjp@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/3] fate/ffmpeg: add a second, simple sub2video test X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- tests/fate/ffmpeg.mak | 9 ++++ tests/ref/fate/sub2video_basic | 95 ++++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 tests/ref/fate/sub2video_basic diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak index 967150983a..835aab3665 100644 --- a/tests/fate/ffmpeg.mak +++ b/tests/fate/ffmpeg.mak @@ -56,6 +56,15 @@ fate-sub2video: CMD = framecrc \ -filter_complex "sws_flags=+accurate_rnd+bitexact\;[0:0]scale=720:480[v]\;[v][1:0]overlay[v2]" \ -map "[v2]" -c:v rawvideo -map 1:s -c:s dvdsub +# Very basic sub2video example, decode and convert to AVFrame with sub2video. +# Attempt to not touch timestamps. +FATE_SAMPLES_FFMPEG-$(call ALLYES, VOBSUB_DEMUXER DVDSUB_DECODER AVFILTER) += fate-sub2video_basic +fate-sub2video_basic: CMD = framecrc \ + -i $(TARGET_SAMPLES)/sub/vobsub.idx \ + -vsync passthrough -copyts \ + -filter_complex "sws_flags=+accurate_rnd+bitexact\;[0:s:0]scale" \ + -c:v rawvideo + FATE_FFMPEG-$(call ALLYES, PCM_S16LE_DEMUXER PCM_S16LE_MUXER PCM_S16LE_DECODER PCM_S16LE_ENCODER) += fate-unknown_layout-pcm fate-unknown_layout-pcm: $(AREF) fate-unknown_layout-pcm: CMD = md5 \ diff --git a/tests/ref/fate/sub2video_basic b/tests/ref/fate/sub2video_basic new file mode 100644 index 0000000000..5f72e292c9 --- /dev/null +++ b/tests/ref/fate/sub2video_basic @@ -0,0 +1,95 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 720x480 +#sar 0: 0/1 +0, 3312, 3312, 1, 1382400, 0x00000000 +0, 3312, 3312, 1, 1382400, 0x8c93c2ba +0, 3436, 3436, 1, 1382400, 0x00000000 +0, 3684, 3684, 1, 1382400, 0xb02e32ca +0, 3802, 3802, 1, 1382400, 0x00000000 +0, 4520, 4520, 1, 1382400, 0x83b71116 +0, 4584, 4584, 1, 1382400, 0x00000000 +0, 4586, 4586, 1, 1382400, 0x85547fd1 +0, 4645, 4645, 1, 1382400, 0x00000000 +0, 4648, 4648, 1, 1382400, 0x00000000 +0, 4648, 4648, 1, 1382400, 0xb6a8f181 +0, 4715, 4715, 1, 1382400, 0x00000000 +0, 4717, 4717, 1, 1382400, 0xb64d1a2c +0, 4748, 4748, 1, 1382400, 0x00000000 +0, 4750, 4750, 1, 1382400, 0x7b37ecf3 +0, 4792, 4792, 1, 1382400, 0x00000000 +0, 4993, 4993, 1, 1382400, 0xdc025bd1 +0, 5027, 5027, 1, 1382400, 0x00000000 +0, 5029, 5029, 1, 1382400, 0x688b294d +0, 5068, 5068, 1, 1382400, 0x00000000 +0, 5070, 5070, 1, 1382400, 0xa2b33d1b +0, 5117, 5117, 1, 1382400, 0x00000000 +0, 5119, 5119, 1, 1382400, 0xb3e525e3 +0, 5168, 5168, 1, 1382400, 0x00000000 +0, 5170, 5170, 1, 1382400, 0xaa8fbdd7 +0, 5216, 5216, 1, 1382400, 0x00000000 +0, 5218, 5218, 1, 1382400, 0x7b7f26dd +0, 5249, 5249, 1, 1382400, 0x00000000 +0, 5251, 5251, 1, 1382400, 0x15e2f836 +0, 5289, 5289, 1, 1382400, 0x00000000 +0, 5291, 5291, 1, 1382400, 0x0fee9b0c +0, 5358, 5358, 1, 1382400, 0x00000000 +0, 5360, 5360, 1, 1382400, 0x89d62791 +0, 5429, 5429, 1, 1382400, 0x00000000 +0, 5431, 5431, 1, 1382400, 0xa6a9fd74 +0, 5490, 5490, 1, 1382400, 0x00000000 +0, 5491, 5491, 1, 1382400, 0x7896178d +0, 5537, 5537, 1, 1382400, 0x00000000 +0, 5588, 5588, 1, 1382400, 0x01751a52 +0, 5647, 5647, 1, 1382400, 0x00000000 +0, 5688, 5688, 1, 1382400, 0xa3959c6f +0, 5770, 5770, 1, 1382400, 0x00000000 +0, 5772, 5772, 1, 1382400, 0x3d3ea47b +0, 5826, 5826, 1, 1382400, 0x00000000 +0, 5828, 5828, 1, 1382400, 0x593f8b24 +0, 5931, 5931, 1, 1382400, 0x00000000 +0, 5933, 5933, 1, 1382400, 0x171f05ba +0, 6001, 6001, 1, 1382400, 0x00000000 +0, 6003, 6003, 1, 1382400, 0xb014cdf1 +0, 6054, 6054, 1, 1382400, 0x00000000 +0, 6839, 6839, 1, 1382400, 0xd918e667 +0, 6880, 6880, 1, 1382400, 0x00000000 +0, 7386, 7386, 1, 1382400, 0xc9406331 +0, 7419, 7419, 1, 1382400, 0x00000000 +0, 7501, 7501, 1, 1382400, 0xaf08b10d +0, 7549, 7549, 1, 1382400, 0x00000000 +0, 7551, 7551, 1, 1382400, 0x00000000 +0, 7551, 7551, 1, 1382400, 0x853a9d93 +0, 7589, 7589, 1, 1382400, 0x00000000 +0, 7605, 7605, 1, 1382400, 0x7491a87d +0, 7647, 7647, 1, 1382400, 0x00000000 +0, 7649, 7649, 1, 1382400, 0xf7383c58 +0, 7697, 7697, 1, 1382400, 0x00000000 +0, 7699, 7699, 1, 1382400, 0xe66be411 +0, 7743, 7743, 1, 1382400, 0x00000000 +0, 8032, 8032, 1, 1382400, 0xd6850362 +0, 8082, 8082, 1, 1382400, 0x00000000 +0, 8084, 8084, 1, 1382400, 0x3e1ed109 +0, 8115, 8115, 1, 1382400, 0x00000000 +0, 8116, 8116, 1, 1382400, 0x39c1b7bd +0, 8160, 8160, 1, 1382400, 0x00000000 +0, 8180, 8180, 1, 1382400, 0x35b85f2e +0, 8207, 8207, 1, 1382400, 0x00000000 +0, 8209, 8209, 1, 1382400, 0x00000000 +0, 8209, 8209, 1, 1382400, 0x83f103e5 +0, 8247, 8247, 1, 1382400, 0x00000000 +0, 8249, 8249, 1, 1382400, 0xbc1ca9b3 +0, 8278, 8278, 1, 1382400, 0x00000000 +0, 8281, 8281, 1, 1382400, 0x94d4a51e +0, 8321, 8321, 1, 1382400, 0x00000000 +0, 8323, 8323, 1, 1382400, 0xf88cdfde +0, 8367, 8367, 1, 1382400, 0x00000000 +0, 8565, 8565, 1, 1382400, 0xdd51423b +0, 8611, 8611, 1, 1382400, 0x00000000 +0, 8669, 8669, 1, 1382400, 0x08259fa4 +0, 8708, 8708, 1, 1382400, 0x00000000 +0, 8941, 8941, 1, 1382400, 0x1663fa34 +0, 8994, 8994, 1, 1382400, 0x00000000 +0, 8996, 8996, 1, 1382400, 0xda2ceb55 +0, 9027, 9027, 1, 1382400, 0x00000000 From patchwork Wed Mar 11 23:42:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jan_Ekstr=C3=B6m?= X-Patchwork-Id: 18131 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 539FB449C20 for ; Thu, 12 Mar 2020 01:49:06 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3DE7668AE27; Thu, 12 Mar 2020 01:49:06 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C112B68A3AF for ; Thu, 12 Mar 2020 01:48:59 +0200 (EET) Received: by mail-wr1-f46.google.com with SMTP id n15so5015855wrw.13 for ; Wed, 11 Mar 2020 16:48:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=oA4qYxIgBA6H4yp2hXJZbxNZbix7xW7AGC8lRFOrat0=; b=aOXCV8TKH6y7er5Y9pCtxxgW7e7Ej1FiKZrsOkBP2k5KVv5r57lUOxaA5p+DEZH+Lr vGSwhz1rvWrRLg+/YhOJVZ2Fcejl2SiNRo1leCBJrr2kE3vTk/imZ4va9qiGyeMsdRIF 1BH1PCcTt9s6uhc7RuE9mU74h270xMFgpcvXhcHRZ9P0741TpNdUPrLH/2H+MdD2WFWU /Nqoc+G1qZG+Ku33SJjAqtiJLNc3bBkMO8rWLmkeqwtR3l1D1ULPkCr1v/nBe9BAzgNH Wkn+yjH0vwDjXk9WriSPRFTp6xbolJjKc7EofeOQ5Elr9PpMp4uhb3tdr7r05x2pyoLt CyYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oA4qYxIgBA6H4yp2hXJZbxNZbix7xW7AGC8lRFOrat0=; b=uBUgI7LNw0BHrn8xOw8ge2iKDmRTfr5hLDji7r378WrSPZYXD/bKeq+0wnkuG6WQyJ dBZXPG8Y6GutrZYZm4VVkKll97BjuIqq2HpaUsfSZnKTsxyq7inI9Jz/yoI0GfOSu86i 9R61Bczi2URG7zOtY4ggaSfQGC6oWKxTxIEdqT57LoJk24pfvwmpx0wjfhsZm/bKCUNk vbSNHSJAZMyA+wqU7Z6PHOHB9BDRU/9wm/65+7SRWKZ6g2G2eDsRRQVjP2dyf7ruicXm DfupEWFOwmt5iFrfwxXsK/b6Ra/eKJ2efpU7b4ZF7AhH6pc/8HlOFfc7J1rlug+dHKRJ QM4A== X-Gm-Message-State: ANhLgQ1UMSdFASQLyv1P7wvrrzgj11xCWXPTbKcy5eNDWHEyxqnj2kbF 8MEk6+M9DePSw5zSDJUZCBx8XRoH X-Google-Smtp-Source: ADFU+vstU1QkIiA9FZWJuBuKxC5kPCBSClJ00eFoDS6HoUEf0PA88QLIqF5jTHLgLgkGgDJ5AGiMWg== X-Received: by 2002:ac2:5508:: with SMTP id j8mr3513222lfk.31.1583970168009; Wed, 11 Mar 2020 16:42:48 -0700 (PDT) Received: from localhost.localdomain (91-159-194-103.elisa-laajakaista.fi. [91.159.194.103]) by smtp.gmail.com with ESMTPSA id e9sm16471250ljp.24.2020.03.11.16.42.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 16:42:47 -0700 (PDT) From: =?utf-8?q?Jan_Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Thu, 12 Mar 2020 01:42:44 +0200 Message-Id: <20200311234244.28303-3-jeebjp@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200311234244.28303-1-jeebjp@gmail.com> References: <20200311234244.28303-1-jeebjp@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/3] fate/ffmpeg: add test for time limited sub2video instance X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Utilizes a subpicture sample with one decodable subpicture for the test. Based on a failing test case in reported by Michael in https://ffmpeg.org/pipermail/ffmpeg-devel/2019-February/240398.html which at the time had no test case for it. Additionally, this is the first test case for the presentation graphics format. --- tests/fate/ffmpeg.mak | 10 ++++++++++ tests/ref/fate/sub2video_time_limited | 8 ++++++++ 2 files changed, 18 insertions(+) create mode 100644 tests/ref/fate/sub2video_time_limited diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak index 835aab3665..0b0610f647 100644 --- a/tests/fate/ffmpeg.mak +++ b/tests/fate/ffmpeg.mak @@ -65,6 +65,16 @@ fate-sub2video_basic: CMD = framecrc \ -filter_complex "sws_flags=+accurate_rnd+bitexact\;[0:s:0]scale" \ -c:v rawvideo +# Time-limited run with a sample that doesn't require seeking and +# contains samples within the initial period. +FATE_SAMPLES_FFMPEG-$(call ALLYES, SUP_DEMUXER PGSSUB_DECODER AVFILTER) += fate-sub2video_time_limited +fate-sub2video_time_limited: CMD = framecrc \ + -i $(TARGET_SAMPLES)/sub/pgs_sub.sup \ + -vsync passthrough -copyts \ + -t 15 \ + -filter_complex "sws_flags=+accurate_rnd+bitexact\;[0:s:0]scale" \ + -c:v rawvideo + FATE_FFMPEG-$(call ALLYES, PCM_S16LE_DEMUXER PCM_S16LE_MUXER PCM_S16LE_DECODER PCM_S16LE_ENCODER) += fate-unknown_layout-pcm fate-unknown_layout-pcm: $(AREF) fate-unknown_layout-pcm: CMD = md5 \ diff --git a/tests/ref/fate/sub2video_time_limited b/tests/ref/fate/sub2video_time_limited new file mode 100644 index 0000000000..9fb6fb06f9 --- /dev/null +++ b/tests/ref/fate/sub2video_time_limited @@ -0,0 +1,8 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 1920x1080 +#sar 0: 0/1 +0, 2, 2, 1, 8294400, 0x00000000 +0, 2, 2, 1, 8294400, 0xa87c518f +0, 10, 10, 1, 8294400, 0xa87c518f