From patchwork Tue Mar 12 06:00:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marth64 X-Patchwork-Id: 46979 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:dc95:b0:1a1:738b:6bc0 with SMTP id ky21csp1662741pzb; Mon, 11 Mar 2024 23:00:24 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUTtCw28qTp1GkueDxUyWnaC2l3Po2uNFTqn1S/x3rxD14vLGq3CCOz2f5yvYEUF6KNBsNIva0p8iDg06S/RshiX6sOTrqDL88JqA== X-Google-Smtp-Source: AGHT+IHR3Q1K0HLM2m6jtsIi0u+2OIgPDqUxtftZl5iIDg9IOqB6s/wZn7lnDEYonkimJxNsbHVE X-Received: by 2002:a17:906:b14e:b0:a45:c694:98ae with SMTP id bt14-20020a170906b14e00b00a45c69498aemr5494621ejb.20.1710223223769; Mon, 11 Mar 2024 23:00:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710223223; cv=none; d=google.com; s=arc-20160816; b=mQwT9eIh1aR/hs95xsV47dpe8ZP0ChYMluuMclE32+rQc9SIlOGxR+dbj9mv3RZBYu MgmbPTRFlsg2IV/Q16/YCoacc1FRUgZHmRfsdnxph9yuNloa3dyocNG7cuQPEfDjqg8v avqUUBvsD8ApNnhBfBXXAn9VNonGiUnYH9nKJqsBeGG1NVJqRelDin2Il6iLpvtmDghm PBY0T2Vb2mR/oqs6OYbCq+kC+TFLkltTfWmNTqz5/uSMVC0hHORCKitgbhSfNa3zY0Qs j6ayB88J4+XWKI+A97bZ6mP1Qjh6qB+0D3n6OEazlSXju3EjGG1C8IL/ahxvp38Try4k J1GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc: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=SnpdVnLzmhzXnP/dD64MBZNM9DGGmEMmbLcvjFK+HL4=; fh=PlWMzmI9LD2qGS7ipLrQl8z0iaQTLQLHzoGuXcBzpCg=; b=vthvHSG9N1YmKJLmGmFbs1BHBlHVUPpZAUed7YBYZ0PtPrNsJ8EDCv6Rwifli2rBNo hx++NuWsusslbbEi2R+5O0onbbbJHfM+Znd2Zt1nORAF5ICLUhVNAzAFCEKmzYTyE03C vfEKRSTlTbUuu2EJ4zMboNODNpx1wcqA4sOVaV+rV5K3sIQGrlHeorhmmPC5+W/M8Fv3 RbN100FLpD01Tc8wTC3EHNnkA5vyYzRlte0o6+vf1IIsX19m5ZfHkaITGGV0yHlfikqq I9CwkfYbPvRYOfyTy46FwbDg3LYuoY97R7m3GfWnj6QkByXeuwIqC9qKIx33obmDx3qW 2T6g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@proxyid.net header.s=google header.b=N1Hma7qK; 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 gl6-20020a170906e0c600b00a438fc5c03esi3010102ejb.970.2024.03.11.23.00.23; Mon, 11 Mar 2024 23:00:23 -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=@proxyid.net header.s=google header.b=N1Hma7qK; 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 C71EA68D025; Tue, 12 Mar 2024 08:00:18 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-yb1-f226.google.com (mail-yb1-f226.google.com [209.85.219.226]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4A28168C1D5 for ; Tue, 12 Mar 2024 08:00:12 +0200 (EET) Received: by mail-yb1-f226.google.com with SMTP id 3f1490d57ef6-db4364ecd6aso3720320276.2 for ; Mon, 11 Mar 2024 23:00:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proxyid.net; s=google; t=1710223210; x=1710828010; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CCopq5K7S7TwEPcAnaExZE6aKMKrKNm8QpSlXL5waSk=; b=N1Hma7qKwpxdx2rPPZ0qNAmJx3Hp0Q63CJtHGTM/DzWk7uctGs2SqTq2oTt6Mm6O9F ePxx/73Uk5Z8GgCFldcLsXmKxOV7/jIYrWevuv/LiIbVCTfEcWFU/PjWLQIR5/u2v+fF +Vmp+9p5GV2EF3N1MF4BzGLUoy/ZEagXthYjCfBI9eLZn7QMbJ348BSCi/nOeBwYShqF nIdiemDCV0P6P3gfu7zQrpjEJU96GyCUxEU7FEcFz/0/95m0+9S2I8yZ/X6l2zW0jYee +5A/R5enQImXT8+CRTpJF2HJseRc9vIo2uWOjaaUMbzvWlnEyAKweIIbq6aEvf/vbQKX KSRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710223210; x=1710828010; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CCopq5K7S7TwEPcAnaExZE6aKMKrKNm8QpSlXL5waSk=; b=PSDbnpH4pgbIJQAk5l9JcB8uq8+hwZddIRYErzjTXRkvVW32RDptMHV5ADyphrptC5 f0N86os50imSE+BRCajjLv0KRo7Msrj7QBFmgXlNqntWQv0heySMdWEv8BGXppNZ2IgC MDss5zHC26EnjwzzCG2ubyOZuOhtFVFApwfTTwoJMpG2/8t5V4LDbgTdR9XJfKEb0rwM aO4zCdRK5esSV7Vt13jHnSaqkCpNoQkgUScaskuzToHwTR7lsWzy6ARpFByf0uvraM7h Hf92HY6FQylX1fTtKWWDv07HaJTERT+RQaNetTY0/FkndfF7HXoIGb9nlGUkP5sJQZji SRqA== X-Gm-Message-State: AOJu0Yw+goI5LXgf909tFtFapdEK8auqIIV3WBFVdTpk9r9GqW/SNCAC iol26Ngelfc7DBldZIvxNxjUV267LhQplM4vMkrCrUfd3sxZOvrkz0twJUqama2IIJlC0UJGnAC IyHOoKmC1lY/c+6UEh/zkL73xYFivnpcDB2sSH4SW X-Received: by 2002:a5b:c8a:0:b0:dc7:43fe:e124 with SMTP id i10-20020a5b0c8a000000b00dc743fee124mr5586256ybq.11.1710223210385; Mon, 11 Mar 2024 23:00:10 -0700 (PDT) Received: from wsx-cc1-001.. (c-76-141-249-38.hsd1.il.comcast.net. [76.141.249.38]) by smtp-relay.gmail.com with ESMTPS id ds4-20020a056902248400b00dc6185d4494sm322329ybb.6.2024.03.11.23.00.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 23:00:10 -0700 (PDT) X-Relaying-Domain: proxyid.net From: Marth64 To: ffmpeg-devel@ffmpeg.org Date: Tue, 12 Mar 2024 01:00:00 -0500 Message-Id: <20240312060005.2111135-2-marth64@proxyid.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240312060005.2111135-1-marth64@proxyid.net> References: <20240312060005.2111135-1-marth64@proxyid.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 1/6] avcodec/mpeg12dec: extract only one type of CC substream 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 Cc: Marth64 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Ij/rtrgvbeOz In MPEG-2 user data, there can be different types of Closed Captions formats embedded (A53, SCTE-20, or DVD). The current behavior of the CC extraction code in the MPEG-2 decoder is to not be aware of multiple formats if multiple exist, therefore allowing one format to overwrite the other during the extraction process since the CC extraction shares one output buffer for the normalized bytes. This causes sources that have two CC formats to produce flawed output. There exist real-world samples which contain both A53 and SCTE-20 captions in the same MPEG-2 stream, and that manifest this problem. Example of symptom: THANK YOU (expected) --> THTHANANK K YOYOUU (actual) The solution is to pick only the first CC substream observed with valid bytes, and ignore the other types. Additionally, provide an option for users to manually "force" a type in the event that this matters for a particular source. Signed-off-by: Marth64 --- libavcodec/mpeg12dec.c | 67 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 3 deletions(-) diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index 3a2f17e508..8961a290a3 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -62,6 +62,16 @@ #define A53_MAX_CC_COUNT 2000 +enum Mpeg2ClosedCaptionsFormat { + CC_FORMAT_AUTO, + CC_FORMAT_A53_PART4, + CC_FORMAT_SCTE20, + CC_FORMAT_DVD +}; +static const char mpeg2_cc_format_labels[4][12] = { + "Unknown", "A/53 Part 4", "SCTE-20", "DVD" +}; + typedef struct Mpeg1Context { MpegEncContext mpeg_enc_ctx; int mpeg_enc_ctx_allocated; /* true if decoding context allocated */ @@ -70,6 +80,7 @@ typedef struct Mpeg1Context { AVStereo3D stereo3d; int has_stereo3d; AVBufferRef *a53_buf_ref; + enum Mpeg2ClosedCaptionsFormat cc_format; uint8_t afd; int has_afd; int slice_count; @@ -1903,12 +1914,27 @@ static int vcr2_init_sequence(AVCodecContext *avctx) return 0; } +static void mpeg_set_cc_format(AVCodecContext *avctx, enum Mpeg2ClosedCaptionsFormat format) +{ + Mpeg1Context *s1 = avctx->priv_data; + + av_assert2(format != CC_FORMAT_AUTO); + + if (!s1->cc_format) { + s1->cc_format = format; + + av_log(avctx, AV_LOG_DEBUG, "CC: first seen substream is %s format\n", + mpeg2_cc_format_labels[format]); + } +} + static int mpeg_decode_a53_cc(AVCodecContext *avctx, const uint8_t *p, int buf_size) { Mpeg1Context *s1 = avctx->priv_data; - if (buf_size >= 6 && + if ((!s1->cc_format || s1->cc_format == CC_FORMAT_A53_PART4) && + buf_size >= 6 && p[0] == 'G' && p[1] == 'A' && p[2] == '9' && p[3] == '4' && p[4] == 3 && (p[5] & 0x40)) { /* extract A53 Part 4 CC data */ @@ -1927,9 +1953,11 @@ static int mpeg_decode_a53_cc(AVCodecContext *avctx, memcpy(s1->a53_buf_ref->data + old_size, p + 7, cc_count * UINT64_C(3)); avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS; + mpeg_set_cc_format(avctx, CC_FORMAT_A53_PART4); } return 1; - } else if (buf_size >= 2 && + } else if ((!s1->cc_format || s1->cc_format == CC_FORMAT_SCTE20) && + buf_size >= 2 && p[0] == 0x03 && (p[1]&0x7f) == 0x01) { /* extract SCTE-20 CC data */ GetBitContext gb; @@ -1973,10 +2001,13 @@ static int mpeg_decode_a53_cc(AVCodecContext *avctx, cap += 3; } } + avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS; + mpeg_set_cc_format(avctx, CC_FORMAT_SCTE20); } return 1; - } else if (buf_size >= 11 && + } else if ((!s1->cc_format || s1->cc_format == CC_FORMAT_DVD) && + buf_size >= 11 && p[0] == 'C' && p[1] == 'C' && p[2] == 0x01 && p[3] == 0xf8) { /* extract DVD CC data * @@ -2033,7 +2064,9 @@ static int mpeg_decode_a53_cc(AVCodecContext *avctx, p += 6; } } + avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS; + mpeg_set_cc_format(avctx, CC_FORMAT_DVD); } return 1; } @@ -2598,11 +2631,39 @@ const FFCodec ff_mpeg1video_decoder = { }, }; +#define M2V_OFFSET(x) offsetof(Mpeg1Context, x) +#define M2V_PARAM AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM + +static const AVOption mpeg2video_options[] = { + { "cc_format", "extract a specific Closed Captions format", + M2V_OFFSET(cc_format), AV_OPT_TYPE_INT, { .i64 = CC_FORMAT_AUTO }, + CC_FORMAT_AUTO, CC_FORMAT_DVD, M2V_PARAM, .unit = "cc_format" }, + + { "auto", "pick first seen CC substream", 0, AV_OPT_TYPE_CONST, + { .i64 = CC_FORMAT_AUTO }, .flags = M2V_PARAM, .unit = "cc_format" }, + { "a53", "pick A/53 Part 4 CC substream", 0, AV_OPT_TYPE_CONST, + { .i64 = CC_FORMAT_A53_PART4 }, .flags = M2V_PARAM, .unit = "cc_format" }, + { "scte20", "pick SCTE-20 CC substream", 0, AV_OPT_TYPE_CONST, + { .i64 = CC_FORMAT_SCTE20 }, .flags = M2V_PARAM, .unit = "cc_format" }, + { "dvd", "pick DVD CC substream", 0, AV_OPT_TYPE_CONST, + { .i64 = CC_FORMAT_DVD }, .flags = M2V_PARAM, .unit = "cc_format" }, + { NULL } +}; + +static const AVClass mpeg2video_class = { + .class_name = "MPEG-2 video", + .item_name = av_default_item_name, + .option = mpeg2video_options, + .version = LIBAVUTIL_VERSION_INT, + .category = AV_CLASS_CATEGORY_DECODER, +}; + const FFCodec ff_mpeg2video_decoder = { .p.name = "mpeg2video", CODEC_LONG_NAME("MPEG-2 video"), .p.type = AVMEDIA_TYPE_VIDEO, .p.id = AV_CODEC_ID_MPEG2VIDEO, + .p.priv_class = &mpeg2video_class, .priv_data_size = sizeof(Mpeg1Context), .init = mpeg_decode_init, .close = mpeg_decode_end, From patchwork Tue Mar 12 06:00:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marth64 X-Patchwork-Id: 46980 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:dc95:b0:1a1:738b:6bc0 with SMTP id ky21csp1662832pzb; Mon, 11 Mar 2024 23:00:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX5rtZrpLlTbV5rd/B/2aYFNMagrQLvgoMceGC7rQphLnr5LJ+Xg0SVF6ebriAO2/bE9spIFeVuBA/xii8uP5+GBFybfuBzkwSFKQ== X-Google-Smtp-Source: AGHT+IGCOfefXLcTexiMbFdJo8KVrxE+z1s/OOvwaPEq/ujWddSsaDnVmNZOf6h1mOzsoqmZkSm1 X-Received: by 2002:a50:8a8e:0:b0:566:c572:6fa0 with SMTP id j14-20020a508a8e000000b00566c5726fa0mr1778574edj.15.1710223235557; Mon, 11 Mar 2024 23:00:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710223235; cv=none; d=google.com; s=arc-20160816; b=k3vV4Onua9VKDPks9CEfLNij7yPzOTKJDAh35z98WBMG5TK7+48WkVJcr1/ynxUMYT K5jbUX8gUKL9FvDn4a3tdNE77s+x4UXcjnGWyS6pb3aFzM0edhUkf22ROXQnsy0eoryE lugy6v2CBTijXojfouaD/KddOaf2bSYy9M65FLoQnwFSoIssliY18x3nlwLtdfL9QtRe qMfnfDQYtJVsxssPioew8YXcziYcrtwa84bIhygx5iLXMUZiE/H/RzOwW1WumlXiskvg LDQ7Bd0IxBdICs7T2FBob3Esdbybc3aE3Z+B/OrR+K/KzXjhOEBYe3OjOOnro5+SqaSV rxrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc: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=eDU8I1X87SPWkDEfCsMZqjsB29rsItEXfjghPJOgcKM=; fh=PlWMzmI9LD2qGS7ipLrQl8z0iaQTLQLHzoGuXcBzpCg=; b=I2LWutM9cMm21I5F7fRkCf6Mi1OFCbS2WX1Yts9ldClyzSwOxJOKLQKC0BR+a8ZBuX brBrL37JysG1kT3hQajhgc25J7DCjKltdDsVacQH8GOwrYImKDrD31aYJHXsqIS2w6I7 1nfABXka2B9wVYvW6+1folzLqF1B00/PtVaHeCekEHqRHRQ2aABEBmL4sxdKp5gjvQoC 7zHchjlxlqx2OjWitTOFvHc8mhnkNzr5Duz1HhdoVVKEKxRBBXj1jPyDyC2KvDPhUPJz SzWQ7K0i8lfdD8WY0hjet2cYdMD9AxXnYFCa9wWZRGw8X3U9D1JNc5r4JiE4ydHIuRWl DjsA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@proxyid.net header.s=google header.b=eEsN2ysO; 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 x11-20020a05640226cb00b005657c432df5si3118863edd.16.2024.03.11.23.00.35; Mon, 11 Mar 2024 23:00:35 -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=@proxyid.net header.s=google header.b=eEsN2ysO; 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 D753268D0E9; Tue, 12 Mar 2024 08:00:19 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-yw1-f228.google.com (mail-yw1-f228.google.com [209.85.128.228]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4D25868C27C for ; Tue, 12 Mar 2024 08:00:12 +0200 (EET) Received: by mail-yw1-f228.google.com with SMTP id 00721157ae682-60a0a1bd04eso39268537b3.1 for ; Mon, 11 Mar 2024 23:00:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proxyid.net; s=google; t=1710223211; x=1710828011; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7bJeswerqRJpdhAzL80nuRNdJcUiSqZ64ZOdsR7nTVs=; b=eEsN2ysOnCfBEhnYmkRs2nRkky9tDbxXzMWlGqdtbKxTPmkSW8381vuTi6uFBnusx+ SRKmcu9F2r/UhdHzST2MMi8r2kzs80w8jor55k/7OF/lPDXUUJlz4JcvR7USLkupl3rG nSyB4u0X+pwBZ59ChI7cRPXBitUZbNbWwJyI6RvnUVoklVZKBNP32QFvgEt05V80YgKs cQTP9l+2fGcwGle8nF7w/mMpTi6tzk61ClNnMkdU+rQeMXrQqYeo1G+5HciTf8VsY9Tc foDYBQso4OqmNMxlAgb7Vy8uL8IIGApaLAt6XS28jV46CzkVUGiVri0SK1beEpWyV3uy BvWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710223211; x=1710828011; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7bJeswerqRJpdhAzL80nuRNdJcUiSqZ64ZOdsR7nTVs=; b=vmvNCsDrL760IDn2HU9/qiOWDSS848IB6sKExEp6NFpN/2XjtQQ9EYcaQPtealqXPj b078aKJpyjUfXDuea0gnaTW8OlNuavyljTsy9pqqLwTnzL+nSRN46opXmA6MvUS45PFi VDfdvIgnL3vedVPxh1c67kh9C6JDe+EAIx3Jh8VAup01UtZ3htj/c9gmOM5cvM3QQoBk AGHkhW2L15ILM4P28152YjqGjuP0+h3tlfkuKqi2/bakEr2zqGwd4LX8DcNRnkMpYI1o XxzKf8WQRZ9o+q/lgzXo1b/4Upt8yFmI1Ic+u+cKmWKYAZVBl89DyjRDRHYSPWT0+LrH ZIiQ== X-Gm-Message-State: AOJu0YyyygcyImx+jnAyfty6S+nAFN8H3i5oHelk6che5LQw7/cj7z4P wnwHoJ01Fqau3vu4Z2RPtG982Kfia3PFXIWD6SUnR4sBhdFHhaleTKmuASD/WR6y2ZhOD4uWlN6 ZLOK2GPjWM9H7aYDyoRKZSI0lHtomsCPSnkdeKHK1 X-Received: by 2002:a5b:542:0:b0:dc6:c510:447a with SMTP id r2-20020a5b0542000000b00dc6c510447amr6453859ybp.58.1710223210771; Mon, 11 Mar 2024 23:00:10 -0700 (PDT) Received: from wsx-cc1-001.. (c-76-141-249-38.hsd1.il.comcast.net. [76.141.249.38]) by smtp-relay.gmail.com with ESMTPS id ds4-20020a056902248400b00dc6185d4494sm322329ybb.6.2024.03.11.23.00.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 23:00:10 -0700 (PDT) X-Relaying-Domain: proxyid.net From: Marth64 To: ffmpeg-devel@ffmpeg.org Date: Tue, 12 Mar 2024 01:00:01 -0500 Message-Id: <20240312060005.2111135-3-marth64@proxyid.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240312060005.2111135-1-marth64@proxyid.net> References: <20240312060005.2111135-1-marth64@proxyid.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 2/6] avcodec/ccaption_dec: don't print multiple \an and \pos tags 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 Cc: Marth64 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: ESbSFvFKvqvT Closed Captions decoder prints multiple \pos ASS tags per cue, and preceding the \pos tag is a fixed \an7 that fixes rendering position from the top left corner and enforces justification. Printing multiple \an and \pos tags in this way is invalid behavior, because only the first \pos tag in a cue is honored by ASS anyway. Don't write multiple \an and \pos tags. Also, update tests accordingly. Signed-off-by: Marth64 --- libavcodec/ccaption_dec.c | 8 +- tests/ref/fate/sub-cc | 2 +- tests/ref/fate/sub-cc-realtime | 8 +- tests/ref/fate/sub-cc-scte20 | 4 +- tests/ref/fate/sub-scc | 146 ++++++++++++++++----------------- 5 files changed, 86 insertions(+), 82 deletions(-) diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c index faf058ce97..9d4a93647c 100644 --- a/libavcodec/ccaption_dec.c +++ b/libavcodec/ccaption_dec.c @@ -456,7 +456,7 @@ static void roll_up(CCaptionSubContext *ctx) static int capture_screen(CCaptionSubContext *ctx) { - int i, j, tab = 0; + int i, j, tab = 0, seen_row = 0; struct Screen *screen = ctx->screen + ctx->active_screen; enum cc_font prev_font = CCFONT_REGULAR; enum cc_color_code prev_color = CCCOL_WHITE; @@ -496,7 +496,11 @@ static int capture_screen(CCaptionSubContext *ctx) x = ASS_DEFAULT_PLAYRESX * (0.1 + 0.0250 * j); y = ASS_DEFAULT_PLAYRESY * (0.1 + 0.0533 * i); - av_bprintf(&ctx->buffer[bidx], "{\\an7}{\\pos(%d,%d)}", x, y); + + if (!seen_row) { + av_bprintf(&ctx->buffer[bidx], "{\\an7}{\\pos(%d,%d)}", x, y); + seen_row = 1; + } for (; j < SCREEN_COLUMNS; j++) { const char *e_tag = "", *s_tag = "", *c_tag = "", *b_tag = ""; diff --git a/tests/ref/fate/sub-cc b/tests/ref/fate/sub-cc index f5216b3de2..d4ab974c2f 100644 --- a/tests/ref/fate/sub-cc +++ b/tests/ref/fate/sub-cc @@ -13,4 +13,4 @@ Style: Default,Monospace,16,&Hffffff,&Hffffff,&H0,&H0,0,0,0,0,100,100,0,0,3,1,0, [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:00.83,0:00:02.97,Default,,0,0,0,,{\an7}{\pos(38,44)}({\i1} inaudible radio chatter{\i0} ) -Dialogue: 0,0:00:02.97,0:00:04.34,Default,,0,0,0,,{\an7}{\pos(38,28)}({\i1} inaudible radio chatter{\i0} )\N{\an7}{\pos(38,44)}>> Safety remains our number one +Dialogue: 0,0:00:02.97,0:00:04.34,Default,,0,0,0,,{\an7}{\pos(38,28)}({\i1} inaudible radio chatter{\i0} )\N>> Safety remains our number one diff --git a/tests/ref/fate/sub-cc-realtime b/tests/ref/fate/sub-cc-realtime index bda890bfe5..da06307221 100644 --- a/tests/ref/fate/sub-cc-realtime +++ b/tests/ref/fate/sub-cc-realtime @@ -16,7 +16,7 @@ Dialogue: 0,0:00:00.97,9:59:59.99,Default,,0,0,0,,{\an7}{\pos(38,44)}( Dialogue: 0,0:00:01.17,9:59:59.99,Default,,0,0,0,,{\an7}{\pos(38,44)}({\i1} inaudibl Dialogue: 0,0:00:01.37,9:59:59.99,Default,,0,0,0,,{\an7}{\pos(38,44)}({\i1} inaudible radio chat Dialogue: 0,0:00:01.57,9:59:59.99,Default,,0,0,0,,{\an7}{\pos(38,44)}({\i1} inaudible radio chatter{\i0} ) -Dialogue: 0,0:00:03.10,9:59:59.99,Default,,0,0,0,,{\an7}{\pos(38,28)}({\i1} inaudible radio chatter{\i0} )\N{\an7}{\pos(38,44)}>> -Dialogue: 0,0:00:03.30,9:59:59.99,Default,,0,0,0,,{\an7}{\pos(38,28)}({\i1} inaudible radio chatter{\i0} )\N{\an7}{\pos(38,44)}>> Safety rema -Dialogue: 0,0:00:03.50,9:59:59.99,Default,,0,0,0,,{\an7}{\pos(38,28)}({\i1} inaudible radio chatter{\i0} )\N{\an7}{\pos(38,44)}>> Safety remains our numb -Dialogue: 0,0:00:03.70,9:59:59.99,Default,,0,0,0,,{\an7}{\pos(38,28)}({\i1} inaudible radio chatter{\i0} )\N{\an7}{\pos(38,44)}>> Safety remains our number one +Dialogue: 0,0:00:03.10,9:59:59.99,Default,,0,0,0,,{\an7}{\pos(38,28)}({\i1} inaudible radio chatter{\i0} )\N>> +Dialogue: 0,0:00:03.30,9:59:59.99,Default,,0,0,0,,{\an7}{\pos(38,28)}({\i1} inaudible radio chatter{\i0} )\N>> Safety rema +Dialogue: 0,0:00:03.50,9:59:59.99,Default,,0,0,0,,{\an7}{\pos(38,28)}({\i1} inaudible radio chatter{\i0} )\N>> Safety remains our numb +Dialogue: 0,0:00:03.70,9:59:59.99,Default,,0,0,0,,{\an7}{\pos(38,28)}({\i1} inaudible radio chatter{\i0} )\N>> Safety remains our number one diff --git a/tests/ref/fate/sub-cc-scte20 b/tests/ref/fate/sub-cc-scte20 index 49715301de..09fa3fb330 100644 --- a/tests/ref/fate/sub-cc-scte20 +++ b/tests/ref/fate/sub-cc-scte20 @@ -13,5 +13,5 @@ Style: Default,Monospace,16,&Hffffff,&Hffffff,&H0,&H0,0,0,0,0,100,100,0,0,3,1,0, [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:00.00,0:00:01.44,Default,,0,0,0,,{\an7}{\pos(48,182)}BESIDES THE -Dialogue: 0,0:00:01.43,0:00:03.93,Default,,0,0,0,,{\an7}{\pos(38,166)}\hBESIDES THE \N{\an7}{\pos(38,197)}SPENDING AND THIS, IS THAT CAR -Dialogue: 0,0:00:03.94,0:00:06.31,Default,,0,0,0,,{\an7}{\pos(38,182)}SPENDING AND THIS, IS THAT CAR \N{\an7}{\pos(38,197)}MANUFACTURERS ARE ABOUT AS +Dialogue: 0,0:00:01.43,0:00:03.93,Default,,0,0,0,,{\an7}{\pos(38,166)}\hBESIDES THE \NSPENDING AND THIS, IS THAT CAR +Dialogue: 0,0:00:03.94,0:00:06.31,Default,,0,0,0,,{\an7}{\pos(38,182)}SPENDING AND THIS, IS THAT CAR \NMANUFACTURERS ARE ABOUT AS diff --git a/tests/ref/fate/sub-scc b/tests/ref/fate/sub-scc index a9ff3676be..d29d6ff485 100644 --- a/tests/ref/fate/sub-scc +++ b/tests/ref/fate/sub-scc @@ -12,95 +12,95 @@ Style: Default,Monospace,16,&Hffffff,&Hffffff,&H0,&H0,0,0,0,0,100,100,0,0,3,1,0, [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text -Dialogue: 0,0:00:-2.-47,0:00:00.70,Default,,0,0,0,,{\an7}{\pos(76,228)}WE HAVE FOUND A WITCH !\N{\an7}{\pos(76,243)}MAY WE BURN HER ? -Dialogue: 0,0:00:00.69,0:00:03.29,Default,,0,0,0,,{\an7}{\pos(115,228)}[ Crowd ]\N{\an7}{\pos(115,243)}BURN HER ! BURN HER ! -Dialogue: 0,0:00:03.30,0:00:07.07,Default,,0,0,0,,{\an7}{\pos(38,197)}HOW DO YOU KNOW\N{\an7}{\pos(38,213)}SHE IS A WITCH ?\N{\an7}{\pos(153,243)}SHE LOOKS LIKE ONE ! -Dialogue: 0,0:00:07.07,0:00:09.27,Default,,0,0,0,,{\an7}{\pos(192,228)}[ Shouting\N{\an7}{\pos(192,243)}\h\hAffirmations ] +Dialogue: 0,0:00:-2.-47,0:00:00.70,Default,,0,0,0,,{\an7}{\pos(76,228)}WE HAVE FOUND A WITCH !\NMAY WE BURN HER ? +Dialogue: 0,0:00:00.69,0:00:03.29,Default,,0,0,0,,{\an7}{\pos(115,228)}[ Crowd ]\NBURN HER ! BURN HER ! +Dialogue: 0,0:00:03.30,0:00:07.07,Default,,0,0,0,,{\an7}{\pos(38,197)}HOW DO YOU KNOW\NSHE IS A WITCH ?\NSHE LOOKS LIKE ONE ! +Dialogue: 0,0:00:07.07,0:00:09.27,Default,,0,0,0,,{\an7}{\pos(192,228)}[ Shouting\N\h\hAffirmations ] Dialogue: 0,0:00:09.26,0:00:11.06,Default,,0,0,0,,{\an7}{\pos(38,243)}BRING HER FORWARD. -Dialogue: 0,0:00:11.07,0:00:14.27,Default,,0,0,0,,{\an7}{\pos(115,228)}I’M NOT A WITCH.\N{\an7}{\pos(115,243)}\hI’M{\i1} NOT{\i0} A WITCH. -Dialogue: 0,0:00:14.26,0:00:16.03,Default,,0,0,0,,{\an7}{\pos(38,228)}BUT YOU ARE DRESSED\N{\an7}{\pos(38,243)}AS ONE. -Dialogue: 0,0:00:16.03,0:00:19.03,Default,,0,0,0,,{\an7}{\pos(76,197)}THEY DRESSED ME UP\N{\an7}{\pos(76,213)}LIKE THIS.\N{\an7}{\pos(76,243)}\h\h\h\h\h\h\h\hNO ! WE DIDN’T ! -Dialogue: 0,0:00:19.03,0:00:22.95,Default,,0,0,0,,{\an7}{\pos(115,228)}AND THIS ISN’T MY NOSE.\N{\an7}{\pos(115,243)}IT’S A FALSE ONE. -Dialogue: 0,0:00:25.30,0:00:28.43,Default,,0,0,0,,{\an7}{\pos(76,197)}WELL ?\N{\an7}{\pos(76,228)}\h\h\h\h\h\h\h\hWELL, WE DID\N{\an7}{\pos(76,243)}\h\h\h\h\h\h\h\hDO THE NOSE. -Dialogue: 0,0:00:28.43,0:00:30.07,Default,,0,0,0,,{\an7}{\pos(76,197)}THE NOSE ?\N{\an7}{\pos(76,243)}\h\h\h\h\h\h\h\hAND THE HAT. -Dialogue: 0,0:00:30.07,0:00:35.50,Default,,0,0,0,,{\an7}{\pos(115,197)}BUT SHE IS A WITCH.\N{\an7}{\pos(115,228)}YEAH ! BURN HER !\N{\an7}{\pos(115,243)}BURN HER ! BURN HER ! -Dialogue: 0,0:00:35.50,0:00:38.47,Default,,0,0,0,,{\an7}{\pos(76,213)}- DID YOU DRESS HER UP\N{\an7}{\pos(76,228)}\h\hLIKE THIS ?\N{\an7}{\pos(76,243)}- NO ! -Dialogue: 0,0:00:38.46,0:00:39.86,Default,,0,0,0,,{\an7}{\pos(192,197)}\h\h\h\h\h\h\h\hNO !\N{\an7}{\pos(192,213)}NO !\N{\an7}{\pos(192,243)}\h\h\h\hNO ! -Dialogue: 0,0:00:39.86,0:00:41.63,Default,,0,0,0,,{\an7}{\pos(153,228)}YES. YES.\N{\an7}{\pos(153,243)}YEAH, A BIT. -Dialogue: 0,0:00:41.63,0:00:44.83,Default,,0,0,0,,{\an7}{\pos(153,197)}\h\h\h\h\h\h\h\hA BIT.\N{\an7}{\pos(153,213)}\h\h\h\h\h\h\h\h\hA BIT.\N{\an7}{\pos(153,243)}SHE HAS GOT A WART. -Dialogue: 0,0:00:44.83,0:00:47.04,Default,,0,0,0,,{\an7}{\pos(38,228)}WHAT MAKES YOU THINK\N{\an7}{\pos(38,243)}SHE IS A WITCH ? -Dialogue: 0,0:00:47.03,0:00:49.53,Default,,0,0,0,,{\an7}{\pos(115,228)}WELL, SHE TURNED ME\N{\an7}{\pos(115,243)}INTO A NEWT ! +Dialogue: 0,0:00:11.07,0:00:14.27,Default,,0,0,0,,{\an7}{\pos(115,228)}I’M NOT A WITCH.\N\hI’M{\i1} NOT{\i0} A WITCH. +Dialogue: 0,0:00:14.26,0:00:16.03,Default,,0,0,0,,{\an7}{\pos(38,228)}BUT YOU ARE DRESSED\NAS ONE. +Dialogue: 0,0:00:16.03,0:00:19.03,Default,,0,0,0,,{\an7}{\pos(76,197)}THEY DRESSED ME UP\NLIKE THIS.\N\h\h\h\h\h\h\h\hNO ! WE DIDN’T ! +Dialogue: 0,0:00:19.03,0:00:22.95,Default,,0,0,0,,{\an7}{\pos(115,228)}AND THIS ISN’T MY NOSE.\NIT’S A FALSE ONE. +Dialogue: 0,0:00:25.30,0:00:28.43,Default,,0,0,0,,{\an7}{\pos(76,197)}WELL ?\N\h\h\h\h\h\h\h\hWELL, WE DID\N\h\h\h\h\h\h\h\hDO THE NOSE. +Dialogue: 0,0:00:28.43,0:00:30.07,Default,,0,0,0,,{\an7}{\pos(76,197)}THE NOSE ?\N\h\h\h\h\h\h\h\hAND THE HAT. +Dialogue: 0,0:00:30.07,0:00:35.50,Default,,0,0,0,,{\an7}{\pos(115,197)}BUT SHE IS A WITCH.\NYEAH ! BURN HER !\NBURN HER ! BURN HER ! +Dialogue: 0,0:00:35.50,0:00:38.47,Default,,0,0,0,,{\an7}{\pos(76,213)}- DID YOU DRESS HER UP\N\h\hLIKE THIS ?\N- NO ! +Dialogue: 0,0:00:38.46,0:00:39.86,Default,,0,0,0,,{\an7}{\pos(192,197)}\h\h\h\h\h\h\h\hNO !\NNO !\N\h\h\h\hNO ! +Dialogue: 0,0:00:39.86,0:00:41.63,Default,,0,0,0,,{\an7}{\pos(153,228)}YES. YES.\NYEAH, A BIT. +Dialogue: 0,0:00:41.63,0:00:44.83,Default,,0,0,0,,{\an7}{\pos(153,197)}\h\h\h\h\h\h\h\hA BIT.\N\h\h\h\h\h\h\h\h\hA BIT.\NSHE HAS GOT A WART. +Dialogue: 0,0:00:44.83,0:00:47.04,Default,,0,0,0,,{\an7}{\pos(38,228)}WHAT MAKES YOU THINK\NSHE IS A WITCH ? +Dialogue: 0,0:00:47.03,0:00:49.53,Default,,0,0,0,,{\an7}{\pos(115,228)}WELL, SHE TURNED ME\NINTO A NEWT ! Dialogue: 0,0:00:49.53,0:00:52.30,Default,,0,0,0,,{\an7}{\pos(76,243)}A NEWT ? Dialogue: 0,0:00:55.46,0:00:57.39,Default,,0,0,0,,{\an7}{\pos(115,243)}I GOT BETTER. Dialogue: 0,0:00:57.40,0:00:58.90,Default,,0,0,0,,{\an7}{\pos(153,243)}BURN HER ANYWAY ! -Dialogue: 0,0:00:58.89,0:01:01.03,Default,,0,0,0,,{\an7}{\pos(76,197)}BURN HER !\N{\an7}{\pos(76,228)}\h\h\h\h\h\h\h\hBURN HER !\N{\an7}{\pos(76,243)}\h\h\h\h\h\h\h\hCRACKLE, CRACKLE ! -Dialogue: 0,0:01:01.03,0:01:04.00,Default,,0,0,0,,{\an7}{\pos(38,197)}\h\h\h\h[ Shouting\N{\an7}{\pos(38,213)}\h\h\h\h\h\hContinues ]\N{\an7}{\pos(38,243)}QUIET. QUIET. -Dialogue: 0,0:01:04.00,0:01:05.43,Default,,0,0,0,,{\an7}{\pos(38,228)}QUIET !\N{\an7}{\pos(48,243)}QUIET ! -Dialogue: 0,0:01:05.43,0:01:09.13,Default,,0,0,0,,{\an7}{\pos(38,228)}THERE ARE WAYS OF TELLING\N{\an7}{\pos(38,243)}WHETHER SHE IS A WITCH. -Dialogue: 0,0:01:09.13,0:01:10.96,Default,,0,0,0,,{\an7}{\pos(38,228)}ARE THERE ?\N{\an7}{\pos(38,243)}WHAT ARE THEY ? -Dialogue: 0,0:01:10.96,0:01:13.30,Default,,0,0,0,,{\an7}{\pos(38,197)}TELL US !\N{\an7}{\pos(153,213)}TELL US !\N{\an7}{\pos(153,243)}\h\h\h\hDO THEY HURT ? -Dialogue: 0,0:01:13.30,0:01:16.23,Default,,0,0,0,,{\an7}{\pos(38,228)}TELL ME,\N{\an7}{\pos(38,243)}WHAT DO YOU DO WITH WITCHES ? -Dialogue: 0,0:01:16.23,0:01:19.20,Default,,0,0,0,,{\an7}{\pos(76,213)}\h\h\h\h\h\h\h\h\h\h\h\hBURN THEM !\N{\an7}{\pos(76,228)}\h\h\h\h\h\h\h\h\h\h\h\h\hBURN THEM UP !\N{\an7}{\pos(76,243)}BURN ! -Dialogue: 0,0:01:19.20,0:01:22.33,Default,,0,0,0,,{\an7}{\pos(38,228)}AND WHAT DO YOU BURN,\N{\an7}{\pos(38,243)}APART FROM WITCHES ? -Dialogue: 0,0:01:22.33,0:01:24.59,Default,,0,0,0,,{\an7}{\pos(38,197)}MORE WITCHES !\N{\an7}{\pos(153,243)}SHH ! +Dialogue: 0,0:00:58.89,0:01:01.03,Default,,0,0,0,,{\an7}{\pos(76,197)}BURN HER !\N\h\h\h\h\h\h\h\hBURN HER !\N\h\h\h\h\h\h\h\hCRACKLE, CRACKLE ! +Dialogue: 0,0:01:01.03,0:01:04.00,Default,,0,0,0,,{\an7}{\pos(38,197)}\h\h\h\h[ Shouting\N\h\h\h\h\h\hContinues ]\NQUIET. QUIET. +Dialogue: 0,0:01:04.00,0:01:05.43,Default,,0,0,0,,{\an7}{\pos(38,228)}QUIET !\NQUIET ! +Dialogue: 0,0:01:05.43,0:01:09.13,Default,,0,0,0,,{\an7}{\pos(38,228)}THERE ARE WAYS OF TELLING\NWHETHER SHE IS A WITCH. +Dialogue: 0,0:01:09.13,0:01:10.96,Default,,0,0,0,,{\an7}{\pos(38,228)}ARE THERE ?\NWHAT ARE THEY ? +Dialogue: 0,0:01:10.96,0:01:13.30,Default,,0,0,0,,{\an7}{\pos(38,197)}TELL US !\NTELL US !\N\h\h\h\hDO THEY HURT ? +Dialogue: 0,0:01:13.30,0:01:16.23,Default,,0,0,0,,{\an7}{\pos(38,228)}TELL ME,\NWHAT DO YOU DO WITH WITCHES ? +Dialogue: 0,0:01:16.23,0:01:19.20,Default,,0,0,0,,{\an7}{\pos(76,213)}\h\h\h\h\h\h\h\h\h\h\h\hBURN THEM !\N\h\h\h\h\h\h\h\h\h\h\h\h\hBURN THEM UP !\NBURN ! +Dialogue: 0,0:01:19.20,0:01:22.33,Default,,0,0,0,,{\an7}{\pos(38,228)}AND WHAT DO YOU BURN,\NAPART FROM WITCHES ? +Dialogue: 0,0:01:22.33,0:01:24.59,Default,,0,0,0,,{\an7}{\pos(38,197)}MORE WITCHES !\NSHH ! Dialogue: 0,0:01:24.59,0:01:25.62,Default,,0,0,0,,{\an7}{\pos(192,243)}WOOD ! -Dialogue: 0,0:01:25.63,0:01:29.33,Default,,0,0,0,,{\an7}{\pos(38,228)}SO,\N{\an7}{\pos(38,243)}WHY DO WITCHES BURN ? +Dialogue: 0,0:01:25.63,0:01:29.33,Default,,0,0,0,,{\an7}{\pos(38,228)}SO,\NWHY DO WITCHES BURN ? Dialogue: 0,0:01:32.69,0:01:35.03,Default,,0,0,0,,{\an7}{\pos(192,243)}B-- -Dialogue: 0,0:01:39.13,0:01:42.46,Default,,0,0,0,,{\an7}{\pos(76,213)}- ’CAUSE THEY’RE\N{\an7}{\pos(76,228)}\h\hMADE OF W-- WOOD ?\N{\an7}{\pos(76,243)}- GOOD ! -Dialogue: 0,0:01:42.46,0:01:44.00,Default,,0,0,0,,{\an7}{\pos(192,213)}OH, YEAH.\N{\an7}{\pos(192,243)}[ Murmuring ] -Dialogue: 0,0:01:44.00,0:01:48.50,Default,,0,0,0,,{\an7}{\pos(38,213)}SO, HOW DO WE TELL\N{\an7}{\pos(38,228)}WHETHER SHE\N{\an7}{\pos(38,243)}IS MADE OF WOOD ? -Dialogue: 0,0:01:48.50,0:01:50.10,Default,,0,0,0,,{\an7}{\pos(153,228)}BUILD A BRIDGE\N{\an7}{\pos(153,243)}OUT OF HER ! -Dialogue: 0,0:01:50.10,0:01:54.13,Default,,0,0,0,,{\an7}{\pos(38,228)}AH, BUT CAN YOU NOT ALSO\N{\an7}{\pos(38,243)}MAKE BRIDGES OUT OF STONE ? -Dialogue: 0,0:01:54.13,0:01:57.26,Default,,0,0,0,,{\an7}{\pos(76,197)}OH, YEAH.\N{\an7}{\pos(76,228)}\h\h\h\h\h\h\h\hOH, YEAH.\N{\an7}{\pos(76,243)}\h\h\h\h\h\h\h\hTRUE. UH-- -Dialogue: 0,0:01:57.26,0:01:59.72,Default,,0,0,0,,{\an7}{\pos(38,228)}{\i1}DOES WOOD\N{\an7}{\pos(38,243)}SINK IN WATER ? -Dialogue: 0,0:01:59.73,0:02:02.17,Default,,0,0,0,,{\an7}{\pos(76,197)}NO, NO.\N{\an7}{\pos(76,228)}\h\h\h\h\h\h\h\hNO, IT FLOATS !\N{\an7}{\pos(76,243)}\h\h\h\h\h\h\h\hIT FLOATS ! -Dialogue: 0,0:02:02.17,0:02:07.04,Default,,0,0,0,,{\an7}{\pos(76,197)}THROW HER INTO THE POND !\N{\an7}{\pos(76,243)}\h\h\h\h\h\h\h\h[ All Shouting ] -Dialogue: 0,0:02:07.36,0:02:10.49,Default,,0,0,0,,{\an7}{\pos(38,228)}WHAT ALSO FLOATS\N{\an7}{\pos(38,243)}IN WATER ? -Dialogue: 0,0:02:10.50,0:02:12.14,Default,,0,0,0,,{\an7}{\pos(76,197)}BREAD !\N{\an7}{\pos(76,243)}\h\h\h\h\h\h\h\h\h\h\h\hAPPLES ! +Dialogue: 0,0:01:39.13,0:01:42.46,Default,,0,0,0,,{\an7}{\pos(76,213)}- ’CAUSE THEY’RE\N\h\hMADE OF W-- WOOD ?\N- GOOD ! +Dialogue: 0,0:01:42.46,0:01:44.00,Default,,0,0,0,,{\an7}{\pos(192,213)}OH, YEAH.\N[ Murmuring ] +Dialogue: 0,0:01:44.00,0:01:48.50,Default,,0,0,0,,{\an7}{\pos(38,213)}SO, HOW DO WE TELL\NWHETHER SHE\NIS MADE OF WOOD ? +Dialogue: 0,0:01:48.50,0:01:50.10,Default,,0,0,0,,{\an7}{\pos(153,228)}BUILD A BRIDGE\NOUT OF HER ! +Dialogue: 0,0:01:50.10,0:01:54.13,Default,,0,0,0,,{\an7}{\pos(38,228)}AH, BUT CAN YOU NOT ALSO\NMAKE BRIDGES OUT OF STONE ? +Dialogue: 0,0:01:54.13,0:01:57.26,Default,,0,0,0,,{\an7}{\pos(76,197)}OH, YEAH.\N\h\h\h\h\h\h\h\hOH, YEAH.\N\h\h\h\h\h\h\h\hTRUE. UH-- +Dialogue: 0,0:01:57.26,0:01:59.72,Default,,0,0,0,,{\an7}{\pos(38,228)}{\i1}DOES WOOD\NSINK IN WATER ? +Dialogue: 0,0:01:59.73,0:02:02.17,Default,,0,0,0,,{\an7}{\pos(76,197)}NO, NO.\N\h\h\h\h\h\h\h\hNO, IT FLOATS !\N\h\h\h\h\h\h\h\hIT FLOATS ! +Dialogue: 0,0:02:02.17,0:02:07.04,Default,,0,0,0,,{\an7}{\pos(76,197)}THROW HER INTO THE POND !\N\h\h\h\h\h\h\h\h[ All Shouting ] +Dialogue: 0,0:02:07.36,0:02:10.49,Default,,0,0,0,,{\an7}{\pos(38,228)}WHAT ALSO FLOATS\NIN WATER ? +Dialogue: 0,0:02:10.50,0:02:12.14,Default,,0,0,0,,{\an7}{\pos(76,197)}BREAD !\N\h\h\h\h\h\h\h\h\h\h\h\hAPPLES ! Dialogue: 0,0:02:12.13,0:02:13.23,Default,,0,0,0,,{\an7}{\pos(76,243)}UH, VERY SMALL ROCKS. -Dialogue: 0,0:02:13.23,0:02:16.49,Default,,0,0,0,,{\an7}{\pos(86,228)}{\i1}- CIDER ! CHERRIES !\N{\an7}{\pos(86,243)}{\i0}- UH, GRA-- GRAVY ! MUD ! -Dialogue: 0,0:02:16.50,0:02:18.76,Default,,0,0,0,,{\an7}{\pos(86,228)}- CHURCHES ! CHURCHES !\N{\an7}{\pos(86,243)}{\i1}- LEAD ! LEAD ! -Dialogue: 0,0:02:18.76,0:02:22.30,Default,,0,0,0,,{\an7}{\pos(76,228)}- A DUCK !\N{\an7}{\pos(76,243)}- [ Crowd Gasps, Murmurs ] +Dialogue: 0,0:02:13.23,0:02:16.49,Default,,0,0,0,,{\an7}{\pos(86,228)}{\i1}- CIDER ! CHERRIES !\N{\i0}- UH, GRA-- GRAVY ! MUD ! +Dialogue: 0,0:02:16.50,0:02:18.76,Default,,0,0,0,,{\an7}{\pos(86,228)}- CHURCHES ! CHURCHES !\N{\i1}- LEAD ! LEAD ! +Dialogue: 0,0:02:18.76,0:02:22.30,Default,,0,0,0,,{\an7}{\pos(76,228)}- A DUCK !\N- [ Crowd Gasps, Murmurs ] Dialogue: 0,0:02:22.30,0:02:24.63,Default,,0,0,0,,{\an7}{\pos(115,243)}EXACTLY ! Dialogue: 0,0:02:25.36,0:02:27.59,Default,,0,0,0,,{\an7}{\pos(76,243)}SO, LOGICALLY-- Dialogue: 0,0:02:27.59,0:02:29.76,Default,,0,0,0,,{\an7}{\pos(192,243)}IF... SHE... -Dialogue: 0,0:02:29.76,0:02:33.56,Default,,0,0,0,,{\an7}{\pos(192,213)}WEIGHS...\N{\an7}{\pos(192,228)}THE SAME\N{\an7}{\pos(192,243)}AS A DUCK... +Dialogue: 0,0:02:29.76,0:02:33.56,Default,,0,0,0,,{\an7}{\pos(192,213)}WEIGHS...\NTHE SAME\NAS A DUCK... Dialogue: 0,0:02:34.40,0:02:36.50,Default,,0,0,0,,{\an7}{\pos(153,243)}SHE’S MADE OF WOOD ! Dialogue: 0,0:02:36.50,0:02:38.47,Default,,0,0,0,,{\an7}{\pos(38,243)}AND THEREFORE ? -Dialogue: 0,0:02:39.50,0:02:42.17,Default,,0,0,0,,{\an7}{\pos(38,228)}- A WITCH !\N{\an7}{\pos(38,243)}{\i1}- [ All ] A WITCH ! A WITCH ! +Dialogue: 0,0:02:39.50,0:02:42.17,Default,,0,0,0,,{\an7}{\pos(38,228)}- A WITCH !\N{\i1}- [ All ] A WITCH ! A WITCH ! Dialogue: 0,0:02:42.17,0:02:44.07,Default,,0,0,0,,{\an7}{\pos(76,243)}[ Shouting Continues ] -Dialogue: 0,0:02:44.07,0:02:45.76,Default,,0,0,0,,{\an7}{\pos(192,213)}HERE’S A DUCK !\N{\an7}{\pos(192,243)}[ Quacking ] -Dialogue: 0,0:02:45.76,0:02:49.79,Default,,0,0,0,,{\an7}{\pos(76,213)}VERY GOOD.\N{\an7}{\pos(76,228)}WE SHALL USE\N{\an7}{\pos(76,243)}MY LARGEST SCALES. +Dialogue: 0,0:02:44.07,0:02:45.76,Default,,0,0,0,,{\an7}{\pos(192,213)}HERE’S A DUCK !\N[ Quacking ] +Dialogue: 0,0:02:45.76,0:02:49.79,Default,,0,0,0,,{\an7}{\pos(76,213)}VERY GOOD.\NWE SHALL USE\NMY LARGEST SCALES. Dialogue: 0,0:02:49.79,0:02:52.72,Default,,0,0,0,,{\an7}{\pos(76,243)}[ Shouting Continues ] -Dialogue: 0,0:02:52.73,0:02:55.17,Default,,0,0,0,,{\an7}{\pos(115,228)}BURN !\N{\an7}{\pos(115,243)}\hBURN THE WITCH ! -Dialogue: 0,0:02:55.17,0:02:57.63,Default,,0,0,0,,{\an7}{\pos(153,228)}BURN HER !\N{\an7}{\pos(153,243)}\hBURN THE WITCH ! -Dialogue: 0,0:02:57.63,0:03:01.63,Default,,0,0,0,,{\an7}{\pos(115,228)}BURN HER !\N{\an7}{\pos(115,243)}\hBURN HER ! BURN HER ! -Dialogue: 0,0:03:01.63,0:03:04.14,Default,,0,0,0,,{\an7}{\pos(115,228)}BURN HER !\N{\an7}{\pos(115,243)}\hBURN HER ! -Dialogue: 0,0:03:04.13,0:03:06.59,Default,,0,0,0,,{\an7}{\pos(230,228)}BURN HER !\N{\an7}{\pos(230,243)}\hBURN HER ! +Dialogue: 0,0:02:52.73,0:02:55.17,Default,,0,0,0,,{\an7}{\pos(115,228)}BURN !\N\hBURN THE WITCH ! +Dialogue: 0,0:02:55.17,0:02:57.63,Default,,0,0,0,,{\an7}{\pos(153,228)}BURN HER !\N\hBURN THE WITCH ! +Dialogue: 0,0:02:57.63,0:03:01.63,Default,,0,0,0,,{\an7}{\pos(115,228)}BURN HER !\N\hBURN HER ! BURN HER ! +Dialogue: 0,0:03:01.63,0:03:04.14,Default,,0,0,0,,{\an7}{\pos(115,228)}BURN HER !\N\hBURN HER ! +Dialogue: 0,0:03:04.13,0:03:06.59,Default,,0,0,0,,{\an7}{\pos(230,228)}BURN HER !\N\hBURN HER ! Dialogue: 0,0:03:06.59,0:03:08.00,Default,,0,0,0,,{\an7}{\pos(201,243)}{\i1}[ Man Grunts ] -Dialogue: 0,0:03:08.00,0:03:14.30,Default,,0,0,0,,{\an7}{\pos(38,228)}{\i1}RIGHT !\N{\an7}{\pos(38,243)}REMOVE THE SUPPORTS ! -Dialogue: 0,0:03:17.07,0:03:19.17,Default,,0,0,0,,{\an7}{\pos(38,197)}A WITCH !\N{\an7}{\pos(230,243)}A WITCH ! +Dialogue: 0,0:03:08.00,0:03:14.30,Default,,0,0,0,,{\an7}{\pos(38,228)}{\i1}RIGHT !\NREMOVE THE SUPPORTS ! +Dialogue: 0,0:03:17.07,0:03:19.17,Default,,0,0,0,,{\an7}{\pos(38,197)}A WITCH !\NA WITCH ! Dialogue: 0,0:03:19.17,0:03:20.04,Default,,0,0,0,,{\an7}{\pos(76,243)}IT’S A FAIR COP. -Dialogue: 0,0:03:20.03,0:03:25.29,Default,,0,0,0,,{\an7}{\pos(38,213)}- BURN HER !\N{\an7}{\pos(38,228)}- [ Crowd Continues Shouting ]\N{\an7}{\pos(57,243)}BURN HER ! BURN HER ! -Dialogue: 0,0:03:28.86,0:03:32.73,Default,,0,0,0,,{\an7}{\pos(38,213)}WHO ARE YOU,\N{\an7}{\pos(38,228)}WHO ARE SO WISE\N{\an7}{\pos(38,243)}IN THE WAYS OF SCIENCE ? -Dialogue: 0,0:03:32.73,0:03:35.76,Default,,0,0,0,,{\an7}{\pos(153,228)}I AM ARTHUR,\N{\an7}{\pos(153,243)}KING OF THE BRITONS. +Dialogue: 0,0:03:20.03,0:03:25.29,Default,,0,0,0,,{\an7}{\pos(38,213)}- BURN HER !\N- [ Crowd Continues Shouting ]\NBURN HER ! BURN HER ! +Dialogue: 0,0:03:28.86,0:03:32.73,Default,,0,0,0,,{\an7}{\pos(38,213)}WHO ARE YOU,\NWHO ARE SO WISE\NIN THE WAYS OF SCIENCE ? +Dialogue: 0,0:03:32.73,0:03:35.76,Default,,0,0,0,,{\an7}{\pos(153,228)}I AM ARTHUR,\NKING OF THE BRITONS. Dialogue: 0,0:03:35.76,0:03:36.96,Default,,0,0,0,,{\an7}{\pos(76,243)}MY LIEGE ! -Dialogue: 0,0:03:36.96,0:03:40.37,Default,,0,0,0,,{\an7}{\pos(115,213)}GOOD SIR KNIGHT,\N{\an7}{\pos(115,228)}WILL YOU COME WITH ME\N{\an7}{\pos(115,243)}TO CAMELOT... -Dialogue: 0,0:03:40.36,0:03:43.39,Default,,0,0,0,,{\an7}{\pos(153,228)}AND JOIN US\N{\an7}{\pos(153,243)}AT THE ROUND TABLE ? -Dialogue: 0,0:03:43.40,0:03:45.53,Default,,0,0,0,,{\an7}{\pos(38,228)}MY LIEGE,\N{\an7}{\pos(38,243)}I WOULD BE HONORED ! -Dialogue: 0,0:03:45.53,0:03:48.70,Default,,0,0,0,,{\an7}{\pos(38,197)}\h\h\h\h\h\h\h\h\h\h\h\hWHAT IS YOUR NAME ?\N{\an7}{\pos(38,243)}BEDEVERE, MY LIEGE. -Dialogue: 0,0:03:48.69,0:03:52.49,Default,,0,0,0,,{\an7}{\pos(163,228)}THEN I DUB YOU\N{\an7}{\pos(163,243)}{\i1}SIR{\i0} BEDEVERE, -Dialogue: 0,0:03:52.50,0:03:54.86,Default,,0,0,0,,{\an7}{\pos(153,228)}KNIGHT\N{\an7}{\pos(153,243)}OF THE ROUND TABLE. -Dialogue: 0,0:03:54.86,0:03:56.76,Default,,0,0,0,,{\an7}{\pos(38,228)}{\i1}[ Narrator ]\N{\an7}{\pos(38,243)}THE WISE SIR BEDEVERE... -Dialogue: 0,0:03:56.76,0:03:59.69,Default,,0,0,0,,{\an7}{\pos(38,228)}{\i1}WAS THE FIRST TO JOIN\N{\an7}{\pos(38,243)}KING ARTHUR’S KNIGHTS. -Dialogue: 0,0:03:59.69,0:04:03.26,Default,,0,0,0,,{\an7}{\pos(38,228)}{\i1}BUT OTHER ILLUSTRIOUS NAMES\N{\an7}{\pos(38,243)}WERE SOON TO FOLLOW: +Dialogue: 0,0:03:36.96,0:03:40.37,Default,,0,0,0,,{\an7}{\pos(115,213)}GOOD SIR KNIGHT,\NWILL YOU COME WITH ME\NTO CAMELOT... +Dialogue: 0,0:03:40.36,0:03:43.39,Default,,0,0,0,,{\an7}{\pos(153,228)}AND JOIN US\NAT THE ROUND TABLE ? +Dialogue: 0,0:03:43.40,0:03:45.53,Default,,0,0,0,,{\an7}{\pos(38,228)}MY LIEGE,\NI WOULD BE HONORED ! +Dialogue: 0,0:03:45.53,0:03:48.70,Default,,0,0,0,,{\an7}{\pos(38,197)}\h\h\h\h\h\h\h\h\h\h\h\hWHAT IS YOUR NAME ?\NBEDEVERE, MY LIEGE. +Dialogue: 0,0:03:48.69,0:03:52.49,Default,,0,0,0,,{\an7}{\pos(163,228)}THEN I DUB YOU\N{\i1}SIR{\i0} BEDEVERE, +Dialogue: 0,0:03:52.50,0:03:54.86,Default,,0,0,0,,{\an7}{\pos(153,228)}KNIGHT\NOF THE ROUND TABLE. +Dialogue: 0,0:03:54.86,0:03:56.76,Default,,0,0,0,,{\an7}{\pos(38,228)}{\i1}[ Narrator ]\NTHE WISE SIR BEDEVERE... +Dialogue: 0,0:03:56.76,0:03:59.69,Default,,0,0,0,,{\an7}{\pos(38,228)}{\i1}WAS THE FIRST TO JOIN\NKING ARTHUR’S KNIGHTS. +Dialogue: 0,0:03:59.69,0:04:03.26,Default,,0,0,0,,{\an7}{\pos(38,228)}{\i1}BUT OTHER ILLUSTRIOUS NAMES\NWERE SOON TO FOLLOW: Dialogue: 0,0:04:03.26,0:04:06.03,Default,,0,0,0,,{\an7}{\pos(38,243)}{\i1}SIR LAUNCELOT THE BRAVE; Dialogue: 0,0:04:06.03,0:04:07.95,Default,,0,0,0,,{\an7}{\pos(38,243)}{\i1}SIR GALAHAD THE PURE; -Dialogue: 0,0:04:07.96,0:04:11.27,Default,,0,0,0,,{\an7}{\pos(38,213)}{\i1}AND SIR ROBIN\N{\an7}{\pos(38,228)}THE NOT-QUITE-SO-BRAVE-\N{\an7}{\pos(38,243)}AS-SIR-LAUNCELOT, -Dialogue: 0,0:04:11.26,0:04:13.92,Default,,0,0,0,,{\an7}{\pos(38,228)}{\i1}WHO HAD NEARLY FOUGHT\N{\an7}{\pos(38,243)}THE DRAGON OF ANGNOR, -Dialogue: 0,0:04:13.92,0:04:16.89,Default,,0,0,0,,{\an7}{\pos(38,213)}{\i1}WHO HAD NEARLY\N{\an7}{\pos(38,228)}STOOD UP TO THE VICIOUS\N{\an7}{\pos(38,243)}CHICKEN OF BRISTOL... -Dialogue: 0,0:04:16.89,0:04:20.73,Default,,0,0,0,,{\an7}{\pos(38,213)}{\i1}AND WHO HAD\N{\an7}{\pos(38,228)}PERSONALLY WET HIMSELF\N{\an7}{\pos(38,243)}AT THE BATTLE OF BADON HILL; -Dialogue: 0,0:04:20.73,0:04:25.43,Default,,0,0,0,,{\an7}{\pos(38,228)}{\i1}AND THE APTLY NAMED\N{\an7}{\pos(38,243)}SIR NOT-APPEARING-IN-THIS-FILM. -Dialogue: 0,0:04:25.59,0:04:29.03,Default,,0,0,0,,{\an7}{\pos(38,228)}{\i1}TOGETHER THEY FORMED A BAND\N{\an7}{\pos(38,243)}WHOSE NAMES AND DEEDS... -Dialogue: 0,0:04:29.03,0:04:31.72,Default,,0,0,0,,{\an7}{\pos(38,228)}{\i1}WERE TO BE RETOLD\N{\an7}{\pos(38,243)}THROUGHOUT THE CENTURIES. -Dialogue: 0,0:04:31.73,0:04:33.86,Default,,0,0,0,,{\an7}{\pos(38,228)}{\i1}THE KNIGHTS\N{\an7}{\pos(38,243)}OF THE ROUND TABLE. +Dialogue: 0,0:04:07.96,0:04:11.27,Default,,0,0,0,,{\an7}{\pos(38,213)}{\i1}AND SIR ROBIN\NTHE NOT-QUITE-SO-BRAVE-\NAS-SIR-LAUNCELOT, +Dialogue: 0,0:04:11.26,0:04:13.92,Default,,0,0,0,,{\an7}{\pos(38,228)}{\i1}WHO HAD NEARLY FOUGHT\NTHE DRAGON OF ANGNOR, +Dialogue: 0,0:04:13.92,0:04:16.89,Default,,0,0,0,,{\an7}{\pos(38,213)}{\i1}WHO HAD NEARLY\NSTOOD UP TO THE VICIOUS\NCHICKEN OF BRISTOL... +Dialogue: 0,0:04:16.89,0:04:20.73,Default,,0,0,0,,{\an7}{\pos(38,213)}{\i1}AND WHO HAD\NPERSONALLY WET HIMSELF\NAT THE BATTLE OF BADON HILL; +Dialogue: 0,0:04:20.73,0:04:25.43,Default,,0,0,0,,{\an7}{\pos(38,228)}{\i1}AND THE APTLY NAMED\NSIR NOT-APPEARING-IN-THIS-FILM. +Dialogue: 0,0:04:25.59,0:04:29.03,Default,,0,0,0,,{\an7}{\pos(38,228)}{\i1}TOGETHER THEY FORMED A BAND\NWHOSE NAMES AND DEEDS... +Dialogue: 0,0:04:29.03,0:04:31.72,Default,,0,0,0,,{\an7}{\pos(38,228)}{\i1}WERE TO BE RETOLD\NTHROUGHOUT THE CENTURIES. +Dialogue: 0,0:04:31.73,0:04:33.86,Default,,0,0,0,,{\an7}{\pos(38,228)}{\i1}THE KNIGHTS\NOF THE ROUND TABLE. From patchwork Tue Mar 12 06:00:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marth64 X-Patchwork-Id: 46981 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:dc95:b0:1a1:738b:6bc0 with SMTP id ky21csp1663034pzb; Mon, 11 Mar 2024 23:00:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU+EALpogTIUn2nx8rMtNZJex4N/ORvXDcM0Cv8wMWpGaljrxLKEbnKV8EsO0uiaCUKPyPZ++3TnH5GU9QgJCDwZTgxoar+mizc5g== X-Google-Smtp-Source: AGHT+IHPirt6IWXyn+ibMfK8KN52zsjubksGh734EVfEoAxtpFX414HRUDXHCuZrLmPugjilkhn0 X-Received: by 2002:a17:906:284e:b0:a45:f860:f270 with SMTP id s14-20020a170906284e00b00a45f860f270mr495468ejc.41.1710223254008; Mon, 11 Mar 2024 23:00:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710223253; cv=none; d=google.com; s=arc-20160816; b=QGujKn8rZlvfK+AgYlBQXbwBEvbL4UwIi2R/afzguoOYgA3d7bKDUe4E19aCOyRafk GTysE91pFT1jilWMbGA2HAG7NKwow8wxYFH1qZYEeA/0RoEj8xs3l0mTAi6Z8zQGXX0u raN88cK5iT6X8kG2J9rzi/AfJCDyIwZSMHcP0vHzIKbQ2Qi8vDnc3oT/8cisF8unWbKc raUaWRqGCNZAGm26Olt4W9bb5zyf4IIPDLdMI38WCLZb8leicliDKRPjVzFLL90XvP6h kHUoPOJWdfuBWN9QpDT+83y3PfM2ae/72wThbKS3US3qCNYOpPoWfgdMidDBInlG1QVl 4b0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc: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=5Fsil5+/iOuAZ/EPv2ulSBOajJbKb0R3NxGlLuJ3N20=; fh=PlWMzmI9LD2qGS7ipLrQl8z0iaQTLQLHzoGuXcBzpCg=; b=MaJpHop5bByqiiZ+Xx9K0Kj/n5FGkObFIQK5XRnG5Ru1yWvUuZEwMTi9Mj2Y1nNWcC J2EossucU3t1fiZhx/riJwFPtI+LwvUY+pRw4VZLNcdd5wBPf4xbFPmbS8QFl5U8Ys8u TVlgOOAXZqGE+98eWWQsqaOik8BccqJgyz7uuWq2wuVdMeHUVsso4cW/seSqIgtGgl4o nEedBmsorNUjgL0sZdTL+O+NFRO6yej7yUXv/w6NXhOn4sSivqcFf5JU/6Vp4HoqZ7EF kuOoeHlATrljruMj9db6BMvBswsRJzioavHYCnd+6rbBM5DjziH0n4SXhkq46nrd9k7Z nQHQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@proxyid.net header.s=google header.b=LN5AO2hA; 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 w21-20020a170906d21500b00a43381a2187si3186259ejz.852.2024.03.11.23.00.53; Mon, 11 Mar 2024 23:00:53 -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=@proxyid.net header.s=google header.b=LN5AO2hA; 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 2FCAC68D118; Tue, 12 Mar 2024 08:00:22 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-yw1-f227.google.com (mail-yw1-f227.google.com [209.85.128.227]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7630968C2BD for ; Tue, 12 Mar 2024 08:00:12 +0200 (EET) Received: by mail-yw1-f227.google.com with SMTP id 00721157ae682-60a3c48e70fso17795697b3.1 for ; Mon, 11 Mar 2024 23:00:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proxyid.net; s=google; t=1710223211; x=1710828011; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nDGz8EzYRx8cdiEl8bIvqBosnnrjAgszPSPAguKJN88=; b=LN5AO2hA+lvl3QZ6j1A1xoFFUKJ4Jo+m7t/HI7rP8l3cpoatpuVu9aKs1UIIzvw3Lr zqF0/BT3CTUwyYFxcAfjszvFRqop2KAGfGy6+mPfwQe8Hb7NNajOWu/j6u0brnGmchan W48oitm36tADO0D3k4fOkedbZ9ne7U0pi5WB7cBI1svrzG4GCvAFU/VE7C4VpRUFR9L+ q8j9irCNC/WHhhIXiyrkHcvIGQG6Y7cB/fUGfUNEcGCWa0vlf+kDbZ1sTSSa8UK8sEQF +liB2f97oDOXBKmOD/KE0h3rHeip0DFNEjoL2RP/iTH7h8Q5YbA0daV/hQJtY5s3vOYi 7djw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710223211; x=1710828011; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nDGz8EzYRx8cdiEl8bIvqBosnnrjAgszPSPAguKJN88=; b=Y9A9CssYg2gDn3Ow3RHUEGViuCWsH4t9avBoX/niOZdt+O5xta0Ju0NkPd2RHpU6t8 Qg712v5UDJMUqWDi/xvatDkVzOiWukNZv40NnN4TiBRlt6yEbOhfSD9QxVuHs5UMkWx0 /GUwxFpHdtRoEJXEXr6kHCtbkgHtD2QINnRmNS0sE1ykA7BHRPvU/4n8CK6YSWGefOmF yCCJBTXpMcfvogGi238bTRx/0UfmGx3XUBU7WIskUztxeJGTxNZONwLuF8+CUzCyGMWR mkhPGqNBBiIakPHgqBVtahvz9VidagSMBlhInmvZ8hUTP2E3TkmLuPLI922m4Db9IC+O 82nA== X-Gm-Message-State: AOJu0YxnU+rutLyaHKM+JB7ZulKs2gyRx7D1MH3A7nmq0OMwevVa3bre OQZalBFNQTU3vPtPCi0PmA3uw6ydWaDfwNdOojbSmwCg3uYCNS0zvomgNpG5oFP7GQ3GfhAORdy Ytvu7mjToT0WkijRD9zfr7BvD65h3b7LxnE2GTzIQ X-Received: by 2002:a25:ea05:0:b0:dcd:24b6:1ae7 with SMTP id p5-20020a25ea05000000b00dcd24b61ae7mr5169481ybd.63.1710223211164; Mon, 11 Mar 2024 23:00:11 -0700 (PDT) Received: from wsx-cc1-001.. (c-76-141-249-38.hsd1.il.comcast.net. [76.141.249.38]) by smtp-relay.gmail.com with ESMTPS id ds4-20020a056902248400b00dc6185d4494sm322329ybb.6.2024.03.11.23.00.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 23:00:11 -0700 (PDT) X-Relaying-Domain: proxyid.net From: Marth64 To: ffmpeg-devel@ffmpeg.org Date: Tue, 12 Mar 2024 01:00:02 -0500 Message-Id: <20240312060005.2111135-4-marth64@proxyid.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240312060005.2111135-1-marth64@proxyid.net> References: <20240312060005.2111135-1-marth64@proxyid.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 3/6] avcodec/ccaption_dec: ignore leading non-breaking spaces 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 Cc: Marth64 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: lUpkq1NaTFCN In Closed Captions (US), the non-breaking space (0xA0) can be used to align text horizontally from the left when used as a leading character. However, CC decoder does not ignore it as a leading character like it does an ordinary space, so a blank padding is rendered on the black CC box. This is not the intended viewing experience. Ignore the leading non-breaking spaces, thus creating the intended transparency which aligns the text. Since all characters are fixed-width in CC, it can be handled the same way as we currently treat leading ordinary spaces. Also, as a nit, lowercase the NBSP's hex code in the entry table to match casing of the other hex codes. Signed-off-by: Marth64 --- libavcodec/ccaption_dec.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c index 9d4a93647c..25b0f2e064 100644 --- a/libavcodec/ccaption_dec.c +++ b/libavcodec/ccaption_dec.c @@ -91,7 +91,7 @@ enum cc_charset { ENTRY(0x36, "\u00a3") \ ENTRY(0x37, "\u266a") \ ENTRY(0x38, "\u00e0") \ - ENTRY(0x39, "\u00A0") \ + ENTRY(0x39, "\u00a0") \ ENTRY(0x3a, "\u00e8") \ ENTRY(0x3b, "\u00e2") \ ENTRY(0x3c, "\u00ea") \ @@ -471,7 +471,8 @@ static int capture_screen(CCaptionSubContext *ctx) const char *row = screen->characters[i]; const char *charset = screen->charsets[i]; j = 0; - while (row[j] == ' ' && charset[j] == CCSET_BASIC_AMERICAN) + while ((row[j] == ' ' && charset[j] == CCSET_BASIC_AMERICAN) || + (row[j] == 0x39 && charset[j] == CCSET_SPECIAL_AMERICAN)) j++; if (!tab || j < tab) tab = j; @@ -491,7 +492,9 @@ static int capture_screen(CCaptionSubContext *ctx) j = 0; /* skip leading space */ - while (row[j] == ' ' && charset[j] == CCSET_BASIC_AMERICAN && j < tab) + while (j < tab && + (row[j] == ' ' && charset[j] == CCSET_BASIC_AMERICAN) || + (row[j] == 0x39 && charset[j] == CCSET_SPECIAL_AMERICAN)) j++; x = ASS_DEFAULT_PLAYRESX * (0.1 + 0.0250 * j); From patchwork Tue Mar 12 06:00:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marth64 X-Patchwork-Id: 46982 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:dc95:b0:1a1:738b:6bc0 with SMTP id ky21csp1663105pzb; Mon, 11 Mar 2024 23:01:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU+mIScSmXdrYzeU0r6w1xzVqANLu7tsnP6Zj/viLo5CJQvjyrRy+9TrGwUSPZkFOg6sm+WtjRCd0S5XVMnTKs6dxzcyyrO4TAx1w== X-Google-Smtp-Source: AGHT+IEnFgdAbIZN/bUcTwvFsEMGMLQKtEkKNvvAgzD7qahuY5tbPQMwwXGpil96RI0hI/Yq+ZR8 X-Received: by 2002:a50:9e44:0:b0:568:1b9f:d697 with SMTP id z62-20020a509e44000000b005681b9fd697mr6377857ede.17.1710223264147; Mon, 11 Mar 2024 23:01:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710223264; cv=none; d=google.com; s=arc-20160816; b=mhCLp2aKTDrZVnZMEncKGatP+hEQZV5WBOG17uc5BkSxcdWeoeLVJYjvPh3UgKNIWk NyC+3oSUAyxPhXBixxddxxaVesvEjmCl/o3FWT4DG3OPALgcMp95BDES8m7pCSqXme4j fSz3HDVOypmWwOGCqpGD87vDGoH7u9Jd0GPcCoqM9Kihh7nBQ3O3szYeVHfxPCjpFw/Z ujlIim1N7k4ImFY+mf64GJRJUJvDxW753FbH2dUntAZ5nrSX2uffrTMY+AKJG0R/i5sl DHGOLBD4gCNk8WMd2L5saYfzHNKDzn7kTx8jRTMRSuOlkdY2JuY7Rlv+DplztESBN9F+ zZnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc: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=n9DERDOp2B2B3SD5ZaeMfVyI1gPIG+17oFfYO67cpo0=; fh=PlWMzmI9LD2qGS7ipLrQl8z0iaQTLQLHzoGuXcBzpCg=; b=wG2s99+DH8UhKJ1ibLpAI8bE6dpfvU7XuA88bJ0BPRYMbwBKSUZVxz3CsZnr0kMNnv nv4R0JXAtRj9ER41DybfeZ2cfQXvyQIJTz2KW7GAG3XneYHwhMBV/bnmYb4O8p+JBcOZ QcnQz5VOfj5cOaj5DeZbe+u/6K5oMH7GTHoYJlO+ARGnK9kytOZCsbVYkSWadnp2rpvr JctVL3eQrLVMZaL7y4mFcYKrOyMNteT90jiW5190tnoSa2mrDg74BPyHeMAKjdKjW6X5 5o5WXm+Cx0BEUeJsk6jWnnOk8iF46gNC8sfM8ygTmDTmy4GI7efG27IM4fvug+nyExDD o3Yg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@proxyid.net header.s=google header.b=Aiw37h8v; 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 ek15-20020a056402370f00b005686c72fa5asi667070edb.564.2024.03.11.23.01.03; Mon, 11 Mar 2024 23:01:04 -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=@proxyid.net header.s=google header.b=Aiw37h8v; 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 E9F3868D139; Tue, 12 Mar 2024 08:00:23 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-yb1-f226.google.com (mail-yb1-f226.google.com [209.85.219.226]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DDE3F68C0A2 for ; Tue, 12 Mar 2024 08:00:12 +0200 (EET) Received: by mail-yb1-f226.google.com with SMTP id 3f1490d57ef6-dd02fb9a31cso3565444276.3 for ; Mon, 11 Mar 2024 23:00:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proxyid.net; s=google; t=1710223211; x=1710828011; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=F9IhYVFkeA+I/c4b/96JIEoR+UzKLcE47pZc563eAKE=; b=Aiw37h8vha6S8rhyf7PuP3QdRXvEUnfDLMUn+ria3rTsx6V9l4J8rcc2BK4JgceYMf mXuShoQYvK+utmhdvmUq208tl4sz/DcNQUZRBaB6sdPaheNYQaLBo9xojzqO6oAeMzrV grgdsNHOai0QGF1Di+HPJzJyCiTaL0ioHiK4CU02GklzR0Wq9dEpZxPElDo6nX1eA38I qw7vD5YwFRk/TJSUi20xMefOOSSBlA9T9F3+rQJ8sdXTW86sU7p3FeqiWiuD5RJCNUoh AB2yuqTA9qDLno+8oBv+Ob4hNEyWWlKS4ENx+A9zaSU5p2UvNsn1Gb1BBtkFmEYfq5l3 MZOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710223211; x=1710828011; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=F9IhYVFkeA+I/c4b/96JIEoR+UzKLcE47pZc563eAKE=; b=q0M/KOSwsiRgwfOLVHhv9qI4TNr7vfrnGQx+OVQKcHvajGYJQFJUkBPiQ6crDFa87T qDpzr7PwxfN5YpsFb2tRjSpoiP95PuPTiSHZELMvL+pWrtyaBuQ4eFIRm0zEu/7EYD0g APAERsV1CFcXA0vXY/plEkODD8lkxs6RTnBZSzoomeTrYk9lSIItMYsEukayVxVShCw3 Wtp1Qr6Acb8Vv2hP17IFE+XHwHsrU7OZHy7ItjSuV+ihJPBC3gqjEC9mm28GXSCkiUD2 f57yk0IReuG3NvupoNSL4K8ejv8hmPb+1V4Vny8Lw1Q6WqcFmZR6gU9CF1ZIbsCfsJcm Z9vQ== X-Gm-Message-State: AOJu0YyhJPlaD/RLMmJl4pgk03VmIcVVqkM1Qzsy4jF+Vh/9P9QlXRaz TOwM5WFgyxZM+zmMGS1aWZHvyce4/f/hn6fAfq1HDF7XOya1sRel+/kvEVlWFCvjBzolZkLjNmU WgqotTYntd+eH+YNSojb9R+ecCrdUo1I5ZpGhKS+e X-Received: by 2002:a25:ad5c:0:b0:dcc:5aa1:7ac3 with SMTP id l28-20020a25ad5c000000b00dcc5aa17ac3mr5746915ybe.2.1710223211554; Mon, 11 Mar 2024 23:00:11 -0700 (PDT) Received: from wsx-cc1-001.. (c-76-141-249-38.hsd1.il.comcast.net. [76.141.249.38]) by smtp-relay.gmail.com with ESMTPS id ds4-20020a056902248400b00dc6185d4494sm322329ybb.6.2024.03.11.23.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 23:00:11 -0700 (PDT) X-Relaying-Domain: proxyid.net From: Marth64 To: ffmpeg-devel@ffmpeg.org Date: Tue, 12 Mar 2024 01:00:03 -0500 Message-Id: <20240312060005.2111135-5-marth64@proxyid.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240312060005.2111135-1-marth64@proxyid.net> References: <20240312060005.2111135-1-marth64@proxyid.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 4/6] avcodec/rcwtenc: canonize name and refresh documentation 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 Cc: Marth64 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: fm0lrnIGak2w The formal title of the muxer according to the specification is "RCWT (Raw Captions With Time)", so canonize this in the long name of the codec and docs. In the documentation section, point #2 was wrong: ccextractor extracts the Closed Captions data and stores normalized bits similarly to this muxer. Signed-off-by: Marth64 --- libavformat/rcwtenc.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/libavformat/rcwtenc.c b/libavformat/rcwtenc.c index a6060ba7c4..ed72de81ef 100644 --- a/libavformat/rcwtenc.c +++ b/libavformat/rcwtenc.c @@ -1,6 +1,5 @@ /* - * Raw Captions With Time (RCWT) muxer - * Author: Marth64 + * RCWT (Raw Captions With Time) muxer * * This file is part of FFmpeg. * @@ -20,16 +19,16 @@ */ /* - * Raw Captions With Time (RCWT) is a format native to ccextractor, a commonly - * used open source tool for processing 608/708 closed caption (CC) sources. + * RCWT (Raw Captions With Time) is a format native to ccextractor, a commonly + * used open source tool for processing 608/708 Closed Captions (CC) sources. * It can be used to archive the original, raw CC bitstream and to produce * a source file for later CC processing or conversion. As a result, * it also allows for interopability with ccextractor for processing CC data * extracted via ffmpeg. The format is simple to parse and can be used * to retain all lines and variants of CC. * - * This muxer implements the specification as of 2024-01-05, which has - * been stable and unchanged for 10 years as of this writing. + * This muxer implements the specification as of March 2024, which has + * been stable and unchanged since April 2014. * * This muxer will have some nuances from the way that ccextractor muxes RCWT. * No compatibility issues when processing the output with ccextractor @@ -40,13 +39,7 @@ * (1) This muxer will identify as "FF" as the writing program identifier, so * as to be honest about the output's origin. * - * (2) ffmpeg's MPEG-1/2, H264, HEVC, etc. decoders extract closed captioning - * data differently than ccextractor from embedded SEI/user data. - * For example, DVD captioning bytes will be translated to ATSC A53 format. - * This allows ffmpeg to handle 608/708 in a consistant way downstream. - * This is a lossless conversion and the meaningful data is retained. - * - * (3) This muxer will not alter the extracted data except to remove invalid + * (2) This muxer will not alter the extracted data except to remove invalid * packets in between valid CC blocks. On the other hand, ccextractor * will by default remove mid-stream padding, and add padding at the end * of the stream (in order to convey the end time of the source video). @@ -172,7 +165,7 @@ static int rcwt_write_trailer(AVFormatContext *avf) const FFOutputFormat ff_rcwt_muxer = { .p.name = "rcwt", - .p.long_name = NULL_IF_CONFIG_SMALL("Raw Captions With Time"), + .p.long_name = NULL_IF_CONFIG_SMALL("RCWT (Raw Captions With Time)"), .p.extensions = "bin", .p.flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS | AVFMT_TS_NONSTRICT, .p.subtitle_codec = AV_CODEC_ID_EIA_608, From patchwork Tue Mar 12 06:00:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marth64 X-Patchwork-Id: 46983 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:dc95:b0:1a1:738b:6bc0 with SMTP id ky21csp1663188pzb; Mon, 11 Mar 2024 23:01:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXAO24Al6XfmPHSNNf8dE7fQhdbbMLTcEzqjwLzsSK8Puf6bbUoxO/KQdNmPNl1tKaczcaFoEdSVI2oMiQ+CozY73N9TKa7BOT5NA== X-Google-Smtp-Source: AGHT+IFAkR+I22o6XnJLOA4vgKEAcNFtUOBcNwAe3rKIhwelh32X8GMG9Y1diY/cXiWznkjttJzq X-Received: by 2002:a2e:240b:0:b0:2d4:1fe1:b8d3 with SMTP id k11-20020a2e240b000000b002d41fe1b8d3mr474396ljk.50.1710223272696; Mon, 11 Mar 2024 23:01:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710223272; cv=none; d=google.com; s=arc-20160816; b=HIzcCqF8rVLlq2uz2QNayeDsV2Y/ZCtbR6gxagIwx4ZIh/LpZJkIpRXlfLgHXn4+dJ pV/dRhQO3lk1uJGZyfLbkOB4SFODno0fqbq9eD5XtU3jzfwiAGQepCiNFv3pKTbS92BA +19gTWgcmH/NA/E7kC6KBHx4MZnBYZf+qNuymbBnz6Wh7JVFE7VjdhiicI5ObkyfFaL/ BUMLk7nZWbR4yLIT0ex8WmNzsSgmf6J0qIgVmtj9biF5aHLO2FwomMOaCfwq8huNFtZN 2+o+cE/Od6gLYB+Agw146eCRFmSkGSlKdF+ZfLZXIyCUqfzQu9DwAX0PiQVJSft0u7LH rVog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc: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=Oh+jFKMHewiP7iguCRfY7/ossmf4Yoa1T2wzmENpND8=; fh=PlWMzmI9LD2qGS7ipLrQl8z0iaQTLQLHzoGuXcBzpCg=; b=FOjcO/vDuhJGbd6ITiooYUamZ/HvvKKr3bAkEMA68qW1W8ilQMcAs8Xeu/9BsSOm/j 7qgiDL9YiUyLKLLrvnef5vS9RA2SROb+6WUvfnPBRLuE5aBtT2ZEIa3C27HKwqGV1eUG 3103f5J6Xt0Hl0T6H2CZOjhyFegyeovZYaKGdlIjpubE7Go1oXlc6uFoA9e2ZykuBn1+ oxPEZYMR3y974cncKKj7HF+QaciZNZUfkLnZpksNKGYtNTRYm5TuAhsfqXBGQzcM5GNn ei6LiYcGOp/V13RYHTyy27stkReyzhZLW/uTldM9fn+IF1mFytGGBwu8FV87untyrhbO dVrw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@proxyid.net header.s=google header.b=eoSN5D+L; 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 dg17-20020a0564021d1100b005675073609bsi3319691edb.196.2024.03.11.23.01.12; Mon, 11 Mar 2024 23:01:12 -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=@proxyid.net header.s=google header.b=eoSN5D+L; 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 48A4B68D13D; Tue, 12 Mar 2024 08:00:25 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-yw1-f225.google.com (mail-yw1-f225.google.com [209.85.128.225]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3C42A68C6A9 for ; Tue, 12 Mar 2024 08:00:13 +0200 (EET) Received: by mail-yw1-f225.google.com with SMTP id 00721157ae682-609fd5fbe50so47549667b3.0 for ; Mon, 11 Mar 2024 23:00:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proxyid.net; s=google; t=1710223212; x=1710828012; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5Bb9f1sG3Ln52XswA5V9bNssFvWS5L3V2B2I70H7klM=; b=eoSN5D+LsJYWufFskkNnRcrTbqMJrUFxbHCa5bo9qabFlDayoNM99mDktOh42SbZ4W 1Sdyv8HykXgbNXmach6U/UKq1hOjDTdSwkD1eW7x+dIFxkfsuyQW2TvCXcKOVXhdBrwx 9h4gkQOa/9lNO2qqYT4afThzKgzGkPArK920Vq2UKztoNeZB9NrXRw58dMGtgmM3Ja1E wP6aSaNvnc6i3JDwEmCIgLwOChx6HqssLMpuvr/PLN9zhDwjMWRyN2bQWtSasL2+wzrR 1EUXIlZGU/fMgh9PYuoOkp952kEn4uUnB2U3/rLU7ZInsGaY53+1h4dyo5PZd5Znx8ti 0tVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710223212; x=1710828012; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5Bb9f1sG3Ln52XswA5V9bNssFvWS5L3V2B2I70H7klM=; b=N6vfIsdvMdajNDQruYNJ+lsDzDqHBqCuqPJ6OcMKAR2UVdUnII6E1nlmnDBWRRvHjb MP/sUYJoeSt2WC7StncHVs6cd1rUkBPmYS58xZzLZLXv8U2H7kv3DdA9KpP2uAae7TKv R6OpM4Goxi+TvdJeszQzTrTqVt0ePlaIxHFrSHWc91+XIxEj2M1f/v4gMxNMnWLfLRnv iNp7vONKmv2YRiLQfXVJ/nRIP8Oa1pfK3wOvC1GYyg8aoEb2WI0CJx59POI6k8qfYVN7 bbqyEMbHtrTUuCUy7z1vsjRah0vBWcrM0cAkOhZuKnq3+EO+9Z3a/u9UYuXYPpk8QJdt CVsg== X-Gm-Message-State: AOJu0YyB1WhSyoYNNHrLQA1D4U7AVHhgYW+EgnnSKJ6H5zfAmFF6A8QC ow87DiO5qqMP9p2nLkuyj4Ru2k3Z3dzIBTG7u00klCGoSGYx9XFyuE5pUY9ShH1UJ63vSL4NL7y /JsbEL/Phfg7m9B/BQaNGBdeP5UkKRMphX6bvdN8t X-Received: by 2002:a25:b46:0:b0:dcc:1062:47c0 with SMTP id 67-20020a250b46000000b00dcc106247c0mr2414154ybl.56.1710223211930; Mon, 11 Mar 2024 23:00:11 -0700 (PDT) Received: from wsx-cc1-001.. (c-76-141-249-38.hsd1.il.comcast.net. [76.141.249.38]) by smtp-relay.gmail.com with ESMTPS id ds4-20020a056902248400b00dc6185d4494sm322329ybb.6.2024.03.11.23.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 23:00:11 -0700 (PDT) X-Relaying-Domain: proxyid.net From: Marth64 To: ffmpeg-devel@ffmpeg.org Date: Tue, 12 Mar 2024 01:00:04 -0500 Message-Id: <20240312060005.2111135-6-marth64@proxyid.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240312060005.2111135-1-marth64@proxyid.net> References: <20240312060005.2111135-1-marth64@proxyid.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 5/6] avformat/rcwtdec: add RCWT Closed Captions demuxer 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 Cc: Marth64 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: D6S8TwO2p2ZC Raw Captions With Time (RCWT) is a format native to ccextractor, a commonly used open source tool for processing 608/708 Closed Captions (CC) sources. RCWT can be used to archive the original CC bitstream. The muxer was added in January 2024. In this commit, add the demuxer. One can now demux RCWT files for rendering in ccaption_dec or interoperate with ccextractor (which produces RCWT). Using the muxer/demuxer combination, the CC bits can be kept for further processing or rendering with either tool. This can be an effective approach to backup original CC presentations. Prior to this, the next best solution was FFmpeg's SCC muxer, but SCC itself is not compatible with ccextractor (which is a de facto OSS CC processing tool) and it is a proprietary format. Tests will follow. Signed-off-by: Marth64 --- libavformat/Makefile | 1 + libavformat/allformats.c | 1 + libavformat/rcwtdec.c | 158 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 160 insertions(+) create mode 100644 libavformat/rcwtdec.c diff --git a/libavformat/Makefile b/libavformat/Makefile index 8811a0ffc9..2092ca9f38 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -493,6 +493,7 @@ OBJS-$(CONFIG_QOA_DEMUXER) += qoadec.o OBJS-$(CONFIG_R3D_DEMUXER) += r3d.o OBJS-$(CONFIG_RAWVIDEO_DEMUXER) += rawvideodec.o OBJS-$(CONFIG_RAWVIDEO_MUXER) += rawenc.o +OBJS-$(CONFIG_RCWT_DEMUXER) += rcwtdec.o subtitles.o OBJS-$(CONFIG_RCWT_MUXER) += rcwtenc.o subtitles.o OBJS-$(CONFIG_REALTEXT_DEMUXER) += realtextdec.o subtitles.o OBJS-$(CONFIG_REDSPARK_DEMUXER) += redspark.o diff --git a/libavformat/allformats.c b/libavformat/allformats.c index 0a0e76138f..b89a49b6ec 100644 --- a/libavformat/allformats.c +++ b/libavformat/allformats.c @@ -391,6 +391,7 @@ extern const FFInputFormat ff_qoa_demuxer; extern const FFInputFormat ff_r3d_demuxer; extern const FFInputFormat ff_rawvideo_demuxer; extern const FFOutputFormat ff_rawvideo_muxer; +extern const FFInputFormat ff_rcwt_demuxer; extern const FFOutputFormat ff_rcwt_muxer; extern const FFInputFormat ff_realtext_demuxer; extern const FFInputFormat ff_redspark_demuxer; diff --git a/libavformat/rcwtdec.c b/libavformat/rcwtdec.c new file mode 100644 index 0000000000..f553f13366 --- /dev/null +++ b/libavformat/rcwtdec.c @@ -0,0 +1,158 @@ +/* + * RCWT (Raw Captions With Time) demuxer + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * RCWT (Raw Captions With Time) is a format native to ccextractor, a commonly + * used open source tool for processing 608/708 Closed Captions (CC) sources. + * It can be used to archive the original, raw CC bitstream and to produce + * a source file for later CC processing or conversion. As a result, + * it also allows for interopability with ccextractor for processing CC data + * extracted via ffmpeg. The format is simple to parse and can be used + * to retain all lines and variants of CC. + * + * This demuxer implements the specification as of March 2024, which has + * been stable and unchanged since April 2014. + * + * A free specification of RCWT can be found here: + * @url{https://github.com/CCExtractor/ccextractor/blob/master/docs/BINARY_FILE_FORMAT.TXT} + */ + +#include "avformat.h" +#include "demux.h" +#include "internal.h" +#include "subtitles.h" +#include "libavutil/avstring.h" +#include "libavutil/intreadwrite.h" + +#define RCWT_CLUSTER_MAX_BLOCKS 65535 +#define RCWT_BLOCK_SIZE 3 +#define RCWT_HEADER_SIZE 11 + +typedef struct RCWTContext { + FFDemuxSubtitlesQueue q; +} RCWTContext; + +static int rcwt_read_header(AVFormatContext *avf) +{ + RCWTContext *rcwt = avf->priv_data; + + AVPacket *sub = NULL; + AVStream *st; + uint8_t header[RCWT_HEADER_SIZE] = {0}; + int nb_bytes = 0; + + int64_t cluster_pts = AV_NOPTS_VALUE; + int cluster_nb_blocks = 0; + int cluster_size = 0; + uint8_t *cluster_buf; + + /* validate the header */ + nb_bytes = avio_read(avf->pb, header, RCWT_HEADER_SIZE); + if (nb_bytes != RCWT_HEADER_SIZE || AV_RB16(header) != 0xCCCC || header[2] != 0xED) { + av_log(avf, AV_LOG_ERROR, "Input is not an RCWT file\n"); + return AVERROR_INVALIDDATA; + } + + if ((header[3] != 0xCC && header[3] != 0xFF) || header[4] != 0x00) { + av_log(avf, AV_LOG_ERROR, "Input writing application is not supported, only " + "0xCC00 (ccextractor) or 0xFF00 (FFmpeg) are compatible\n"); + return AVERROR_INVALIDDATA; + } + + if (AV_RB16(header + 6) != 0x0001) { + av_log(avf, AV_LOG_ERROR, "Input RCWT version is not compatible " + "(only version 0.001 is known)\n"); + return AVERROR_INVALIDDATA; + } + + if (header[3] == 0xFF && header[5] != 0x60) { + av_log(avf, AV_LOG_ERROR, "Input was written by a different version of FFmpeg " + "and unsupported, consider upgrading\n"); + return AVERROR_INVALIDDATA; + } + + /* setup AVStream */ + st = avformat_new_stream(avf, NULL); + if (!st) + return AVERROR(ENOMEM); + + st->codecpar->codec_type = AVMEDIA_TYPE_SUBTITLE; + st->codecpar->codec_id = AV_CODEC_ID_EIA_608; + + avpriv_set_pts_info(st, 64, 1, 1000); + + /* demux */ + while (!avio_feof(avf->pb)) { + cluster_pts = avio_rl64(avf->pb); + cluster_nb_blocks = avio_rl16(avf->pb); + if (cluster_nb_blocks == 0) + continue; + + cluster_size = cluster_nb_blocks * RCWT_BLOCK_SIZE; + cluster_buf = av_calloc(cluster_nb_blocks, RCWT_BLOCK_SIZE); + if (!cluster_buf) + return AVERROR(ENOMEM); + + nb_bytes = avio_read(avf->pb, cluster_buf, cluster_size); + if (nb_bytes != cluster_size) { + av_freep(&cluster_buf); + av_log(avf, AV_LOG_ERROR, "Input cluster has invalid size " + "(expected=%d actual=%d pos=%ld)\n", + cluster_size, nb_bytes, avio_tell(avf->pb)); + return AVERROR_INVALIDDATA; + } + + sub = ff_subtitles_queue_insert(&rcwt->q, cluster_buf, cluster_size, 0); + if (!sub) { + av_freep(&cluster_buf); + return AVERROR(ENOMEM); + } + + sub->pos = avio_tell(avf->pb); + sub->pts = cluster_pts; + + av_freep(&cluster_buf); + cluster_buf = NULL; + } + + ff_subtitles_queue_finalize(avf, &rcwt->q); + + return 0; +} + +static int rcwt_probe(const AVProbeData *p) +{ + return p->buf_size > RCWT_HEADER_SIZE && + AV_RB16(p->buf) == 0xCCCC && AV_RB8(p->buf + 2) == 0xED ? 50 : 0; +} + +const FFInputFormat ff_rcwt_demuxer = { + .p.name = "rcwt", + .p.long_name = NULL_IF_CONFIG_SMALL("RCWT (Raw Captions With Time)"), + .p.extensions = "bin", + .p.flags = AVFMT_TS_DISCONT, + .priv_data_size = sizeof(RCWTContext), + .flags_internal = FF_FMT_INIT_CLEANUP, + .read_probe = rcwt_probe, + .read_header = rcwt_read_header, + .read_packet = ff_subtitles_read_packet, + .read_seek2 = ff_subtitles_read_seek, + .read_close = ff_subtitles_read_close +}; From patchwork Tue Mar 12 06:00:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marth64 X-Patchwork-Id: 46984 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:dc95:b0:1a1:738b:6bc0 with SMTP id ky21csp1663293pzb; Mon, 11 Mar 2024 23:01:23 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX/J7j//FUTfZhaRcEWZ42OmtTmoaAXM4Ld684m7AO2uD3kdg3qOTFWjPz0H5Grhm6sipdKY71sSX8fKmfhJjlJPkL7shF12A3tDA== X-Google-Smtp-Source: AGHT+IGiW36zWjhySTzNtruThoWvwBEoLKljL35E63/bVzyRZgcJeAhi4omAwxibX3NFKeEmOfVV X-Received: by 2002:a17:907:a0d6:b0:a45:5a30:a3f2 with SMTP id hw22-20020a170907a0d600b00a455a30a3f2mr6017153ejc.52.1710223283475; Mon, 11 Mar 2024 23:01:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710223283; cv=none; d=google.com; s=arc-20160816; b=0x/YTIgbFbiKoR7/oWad1FvFx5Lxprsa4UatYk11jYOTSRVETEdRK21N3Riipz19kw KJ4umI4VavMSJs7j9fZMszJgE5pTbYZhz5O9qzVmGPPnZ9LaGy5ODKZEd1ShtL2EeEVY Ren3CX12Nu9dU+3U7Z253cJU9wQoniOdfS3oQQK3222QEWNgMX3+sfC2LUhW5H9YH1Vk K2oLUZ5xwacbgtuxxCEgY2ZFVYAJlkds6ffyJw/RMSuHZqUBvwJBi/BAZGX2ctXWaoYy q2EfTtGEI4fQ65tl/0CCr/9TnouicUKKUKf1U9FcHDcdXD+pFOYgMC6WIIvHMRKcID5X Nw/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc: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=x3BH9fZqdOwiAgbo6OdWK6gFqHOez5+j4s3Pg1/niOY=; fh=PlWMzmI9LD2qGS7ipLrQl8z0iaQTLQLHzoGuXcBzpCg=; b=trog+F6V6FSKIW4T+VX/dUXyRbJirv0dkgLJaCDwgWI8h/c4dSY+pYfyWAxcKmhl5D JnRuDN1xPc/0WMS9v7NqHk8SJrhCkerflh+Xvd1Fn413DTXMxO4/cZYlNtqNAKiMPAYh +Y8cZ74fev+kGTKvp1vh7lWANPt+cVlPOB4ky/ma07ceA7ewsVX2eseQczwdiaD5EBhy hFGPbg25dYkORliObZ0HBlHh/nrGBeR7SWcmkmYPQ3jWDRwpNxj8G3oB8MdFPqCEDAj2 NghBnrabAkiVkrC51/wNwJqyrslYIqbeOhdFh0GpglCfQAdgVShEf6ImD4yMRfmygdgB 6vIw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@proxyid.net header.s=google header.b=XIwyYVRD; 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 dn10-20020a17090794ca00b00a43fe0538ecsi3460180ejc.516.2024.03.11.23.01.23; Mon, 11 Mar 2024 23:01:23 -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=@proxyid.net header.s=google header.b=XIwyYVRD; 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 5D1E268D14B; Tue, 12 Mar 2024 08:00:26 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-yw1-f228.google.com (mail-yw1-f228.google.com [209.85.128.228]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 718E668D025 for ; Tue, 12 Mar 2024 08:00:13 +0200 (EET) Received: by mail-yw1-f228.google.com with SMTP id 00721157ae682-609f4d8551eso39288497b3.1 for ; Mon, 11 Mar 2024 23:00:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proxyid.net; s=google; t=1710223212; x=1710828012; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=I1DPD6CVpMo89BzTS9aVTjiRi+HEVPqgMRnTvMxZEec=; b=XIwyYVRDCz+H58t+eIS+blFZXuAjLjg0987pidnOpe4HO+4D6V+0CeaTbqxzP3xLis VyqGCVxV8h5RUT2Bbf2y4rM63ntbP4xBvaIDXi1g3HXupjdbvKbQ1qdmS96X06tOaolo Dn1PAguh5P9pXAx04Z10QGLCMDBN1WPrleQjZUdLnH5wwqrM/o17uaBTvHsPM1OD+All MgPfjhLRvaOu30Kt3LApYBWZbjq6Os0lPsrue4dVaD4pNqZROC3JWYtYl3ci4I9NKuzN bKXupRZ5lX1Lz6SUA//ugebpwnz0fRnlBzjh8P4I+fuLpnad6Hn0AKxLX5ualHYMPubn hnLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710223212; x=1710828012; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I1DPD6CVpMo89BzTS9aVTjiRi+HEVPqgMRnTvMxZEec=; b=Lbb+tTly/B7gcYazMLDZmESbrXY9rjkRs3TYfA07OU8GepWTriJd/C5DB+z2gRV1iH 60ArIBnyjpIqwhNfruFbWJbYlwiVETBUnZaOxPcg7hE4upmNBXyK3s9CH0+yz2eNP7XJ lEQWFiXO2pN5xfcje29AhJ9rj7AeuMtCQzWKl1yy4Qs6/k2hfAmw4MRz0r/DGPW8Iqq/ wEtAQjo+VLHPfAi7wzcD9OSmb4tDx1Ie617kZcckuyhodQ48jPvH85HE6UFxj7UZxEtx Z/f4Dyq3y18lUYLi7RzA1/3hmMa/3z1unRiIRrtaR0fQ3JYewsbOBCnt+ec3hxQk5VA7 f7Hw== X-Gm-Message-State: AOJu0Yw+PaO7PT/1cPMLOW5VPSQ+h0ByX5dgpJTDbtIQHD3NvPD2JYVT QmROBXx+9JY68U98MPaM1+xFMXNhv1FMKmKYo+fIJytD3fYGtnIGGbxo2ZB/Kk5iUiJV19dDWvu i6oiTyn4xHKzxUfjlLzcq99YIpYkk+KzIjPDP9LZP X-Received: by 2002:a25:2e4a:0:b0:dc6:f0ac:6b53 with SMTP id b10-20020a252e4a000000b00dc6f0ac6b53mr5169418ybn.15.1710223212290; Mon, 11 Mar 2024 23:00:12 -0700 (PDT) Received: from wsx-cc1-001.. (c-76-141-249-38.hsd1.il.comcast.net. [76.141.249.38]) by smtp-relay.gmail.com with ESMTPS id ds4-20020a056902248400b00dc6185d4494sm322329ybb.6.2024.03.11.23.00.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 23:00:12 -0700 (PDT) X-Relaying-Domain: proxyid.net From: Marth64 To: ffmpeg-devel@ffmpeg.org Date: Tue, 12 Mar 2024 01:00:05 -0500 Message-Id: <20240312060005.2111135-7-marth64@proxyid.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240312060005.2111135-1-marth64@proxyid.net> References: <20240312060005.2111135-1-marth64@proxyid.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 6/6] avformat/sccdec: remove unused bprint.h include 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 Cc: Marth64 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: IxDRv7ZBNoFt Signed-off-by: Marth64 --- libavformat/sccdec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavformat/sccdec.c b/libavformat/sccdec.c index 5f2f95d80e..f6d5f29a0a 100644 --- a/libavformat/sccdec.c +++ b/libavformat/sccdec.c @@ -24,7 +24,6 @@ #include "internal.h" #include "subtitles.h" #include "libavutil/avstring.h" -#include "libavutil/bprint.h" #include "libavutil/intreadwrite.h" typedef struct SCCContext {