From patchwork Mon Nov 22 14:47:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 31526 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp7077046iob; Mon, 22 Nov 2021 06:47:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJy44Z34yVgTwtCjys6t5bC4qGx9ZExCzs+1RxO7aP7jqIBgJG0yD0fwucp7SvbNdrMdHxOr X-Received: by 2002:a17:907:a411:: with SMTP id sg17mr40433602ejc.84.1637592452607; Mon, 22 Nov 2021 06:47:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637592452; cv=none; d=google.com; s=arc-20160816; b=xKcXqRi9j52TtSqrntFqe+pEQIzuhUjAfbOh0GEa3gRbYbNjcNkJNfQll/08vvGscm 6HW+24xYtAVypzq8bdCiLPd6agj4OoFrZXV+tNRluJZu5NPVoArK/sRNoIvCu8vkZTsf lYHB9hD9Vy0EoR+tqt61BHlYSxG56DzWTY1bwYBhSnT+AbyvQ84uEHGrA6aLMo1HEG1u WclfeN8/7gSlG5kOS2jvI/YWvfC39WS1/bpc2kc0WJJ0YwbLwm3to/huOzcf9S0JrNEo tP3Ui0MWjv5c2crdgOO3WpeQbn+HC09q8cYl4SGYJvW1fUiB9IYcg98xEq32uByaTBny DAzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to; bh=WNjEJnyG3w3pCDezHPxD73T4iEsq+XykhZpjh2EZwbo=; b=AU28KuzIFxHq0X+yRZV8S7rBbCblod4rBXgvhL7J2nkBwY4rYwv1Bk/Fgi1XafZvkJ ZEM9fKVSvLjpZNuaPfiGFON1CMqBR6Vi4yoXwbDd/EG36A+I3NtJDmVp60/QdCSdHMdA 42WVzOFoSCaAdthi+ew2f3m/wNnfjV7XTpFuZnUAt8iw69KmpvZsce1GmcvXwNcvSrH2 40CWonqGdJ4FedAxCjDx1itdpxuSVepACNuAoTU5VWMl13qGAjDD6kvHQ6ovUbqoW/yZ iGJ8C3UVZV0hqY1qWtlX/2Efdg6vEYd+LEozbYOYJj+0RPhztex/scuXkhcfx8k/2jGw boAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=OmaEuvoo; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id c11si28182887ede.332.2021.11.22.06.47.31; Mon, 22 Nov 2021 06:47:32 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=OmaEuvoo; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2F8F768A21C; Mon, 22 Nov 2021 16:47:27 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 207D9680CAB for ; Mon, 22 Nov 2021 16:47:21 +0200 (EET) Received: by mail-pg1-f170.google.com with SMTP id 200so15502553pga.1 for ; Mon, 22 Nov 2021 06:47:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id; bh=2Z3Qmi7rCHbQhi34j7+ZsIM5aPRBt34Hv+TU5z/xByc=; b=OmaEuvooZcNn7DwdVfubyJt2cphVc7ecLgQaJZM5W0aibbRgbfa4atsNJUCcQCzVyX MrMPIGwERCo26L8I79C0kXEAyxX0eH5nwY97Aae5pF40LFYpt3cgZyYhP3mEER/eOMuQ 5CyI3tlXJU8m8IjvKq3JjwaaX1YUXfcOuxmdXOoU7lGs6KhChB+FvOPlDsoSHEWN4+pW DsaiazQnTTOvTPmR1Vcxyat+cZCtTUwTdNv8VpnhLGhuVlNjgZY8hqkUu9WHnWayYEyC 8XDSHSi35ayI0fk6bz90dYF374rAdDi/ovGpCg5hguN1VEFWVQqpYzXzpQ3pnDC2R6r3 DGzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=2Z3Qmi7rCHbQhi34j7+ZsIM5aPRBt34Hv+TU5z/xByc=; b=wqQZeQOFaopwXVrTvl7KFj42KPEEDAWkKK/kDwMfk9+bOGwa3WRIL4K9W0uMHmQUU3 9y3eT9BV0tB+rKjIciFVLbwTDUz9ohKNdSI17hmcwJ7AWj8AKEZfFOksxFfEKQBl9H23 uS0XfMDu0G22xx45P66ux9PJPwT2gWbeKFbWHoJirhSgeiHFPLqV2FjoRxXJq9+/MMNg VB8CMQixXUWawbCknGZocgqDlHzJdEc1irhk8tNiK+8cw2Y179QOrO1ktP6qOXDYM4ow RYBvyRQVQhjElUo8UN7mQaDFqiuOTBh7lfHfwVSA7jqy5Y6KrBiaWBWcIhy35xGxLcKp mlKQ== X-Gm-Message-State: AOAM530YBhOWpwi3D1LnwGrtLSYTJH+J/TL8eqGmMZ5E4OwNVfxqsi2E q0/xgZJHsjMcyAaxPzYYf+Dipc8Ikrk= X-Received: by 2002:a63:4244:: with SMTP id p65mr10297405pga.440.1637592439036; Mon, 22 Nov 2021 06:47:19 -0800 (PST) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id k1sm9549957pfu.31.2021.11.22.06.47.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Nov 2021 06:47:18 -0800 (PST) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Mon, 22 Nov 2021 22:47:13 +0800 Message-Id: <1637592434-16132-1-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 Subject: [FFmpeg-devel] [PATCH 1/2] avfilter/src_movie: add format_opts for the opened file 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: Limin Wang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 1aND9hHLyJaW From: Limin Wang Signed-off-by: Limin Wang --- doc/filters.texi | 5 +++++ libavfilter/src_movie.c | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/filters.texi b/doc/filters.texi index c3ccaf9..6c35788 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -28386,6 +28386,11 @@ timestamps. @item dec_threads Specifies the number of threads for decoding + +@item format_opts +Specify format options for the opened file. Format options can be specified +as a list of @var{key}=@var{value} pairs separated by ':'. For example, +some protocol you need to add protocol_whitelist for the opened file. @end table It allows overlaying a second video on top of the main input of diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c index 220a43c..5e52015 100644 --- a/libavfilter/src_movie.c +++ b/libavfilter/src_movie.c @@ -74,6 +74,7 @@ typedef struct MovieContext { int max_stream_index; /**< max stream # actually used for output */ MovieStream *st; /**< array of all streams, one per output */ int *out_index; /**< stream number -> output number map, or -1 */ + AVDictionary *format_opts; } MovieContext; #define OFFSET(x) offsetof(MovieContext, x) @@ -92,6 +93,7 @@ static const AVOption movie_options[]= { { "loop", "set loop count", OFFSET(loop_count), AV_OPT_TYPE_INT, {.i64 = 1}, 0, INT_MAX, FLAGS }, { "discontinuity", "set discontinuity threshold", OFFSET(discontinuity_threshold), AV_OPT_TYPE_DURATION, {.i64 = 0}, 0, INT64_MAX, FLAGS }, { "dec_threads", "set the number of threads for decoding", OFFSET(dec_threads), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, FLAGS }, + { "format_opts", "set format options for the opened file", OFFSET(format_opts), AV_OPT_TYPE_DICT, {.str = NULL}, 0, 0, FLAGS}, { NULL }, }; @@ -214,6 +216,7 @@ static av_cold int movie_common_init(AVFilterContext *ctx) int nb_streams = 1, ret, i; char default_streams[16], *stream_specs, *spec, *cursor; AVStream *st; + AVDictionary *options = NULL; if (!movie->file_name) { av_log(ctx, AV_LOG_ERROR, "No filename provided!\n"); @@ -243,11 +246,14 @@ static av_cold int movie_common_init(AVFilterContext *ctx) iformat = movie->format_name ? av_find_input_format(movie->format_name) : NULL; movie->format_ctx = NULL; - if ((ret = avformat_open_input(&movie->format_ctx, movie->file_name, iformat, NULL)) < 0) { + av_dict_copy(&options, movie->format_opts, 0); + if ((ret = avformat_open_input(&movie->format_ctx, movie->file_name, iformat, &options)) < 0) { av_log(ctx, AV_LOG_ERROR, "Failed to avformat_open_input '%s'\n", movie->file_name); return ret; } + av_dict_free(&options); + if ((ret = avformat_find_stream_info(movie->format_ctx, NULL)) < 0) av_log(ctx, AV_LOG_WARNING, "Failed to find stream info\n"); From patchwork Mon Nov 22 14:47:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 31525 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp7077413iob; Mon, 22 Nov 2021 06:47:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJyZD9fmzk3aozaYNiLwPQtvnVm9F7O02kIgAUYLYdd14tRjbFyEh9pzmdpMjhWOjabe5HZW X-Received: by 2002:a05:6402:514d:: with SMTP id n13mr68514134edd.380.1637592465191; Mon, 22 Nov 2021 06:47:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637592465; cv=none; d=google.com; s=arc-20160816; b=keewHzNehPV03ab2By6x7fWwRrD+UBBTIGGCcg5kEqtr8xRio42EEno0sey8k0qb6Y th65jXg22xl3pyalhSSw/mUu66XzE6vLtxjeSwVzZXsye95hXd3neDQ7ykkqxV3G4s7y fqbvH5n98NClGDUN3UOMDA91zv8VU/MP82lGQ6lICnqHTlQpstfHMz8RZsJdpXwH+XLj j6lLGIQpPQWVYKkCdQ4SCl6tNbE7YjsfAqNOUCw8mVMyjKjKZfJIc5iAika6Wzy/ONb2 ky2xFURUAuJEONn53jm5kf/Fo6BcmNi+AaPD/FUrL4BXMDo4YRPVTZNtf4WZFGiOm3V9 gwIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=iu+2yKOJNU2uhyojG5Cso/bduK5DfNAQKPW6SRRgCGs=; b=WJfQUlc097Y6wn3F/5MOOn12nG5dQED12RqP8GsYqr3/LP35eU4LrCx9125qOHKnWz BCX0KF1UaJc1pVIRugaR8ihvRU3KK6Flpdq3jutrfBVMBQ+g57712b07Qb9X/pJPk0a7 8i59Ld4qw5I5wOz3YLVEwTG7XGQ0wtjjgoIhmgy4oaUI2DiduFr/W32jo0DKSCNSLJwt 1jZ4EuWmItJwSYKOIpZ/EpMV/ljNa3VeX7fOBym7izx8esgpqcT9ZOsfLctBpvxuytwL +9cDUv0NTTTX73QVzteKkhOCSrO1knlSnmr1tR4YD2WJlFnkczKzTsW/Em37MplaLiMr KhMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b="RX/oUiTt"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id cw1si28402720ejc.46.2021.11.22.06.47.43; Mon, 22 Nov 2021 06:47:45 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b="RX/oUiTt"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 58C5E68A36E; Mon, 22 Nov 2021 16:47:29 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5840968A22C for ; Mon, 22 Nov 2021 16:47:22 +0200 (EET) Received: by mail-pg1-f173.google.com with SMTP id t4so8190295pgn.9 for ; Mon, 22 Nov 2021 06:47:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fWrV4qFfgvswlqkw4zsvVIGgUXoghkmpajzc2Uoaq30=; b=RX/oUiTtaHaNIf7tZIU5uDbO3E5muxdBUYN8lHwma/f/RpOabJ1TrGmV9g8ZX5oJ5c uQ9SYnFmBp3BKd1JvMzzA20UxZZz5auQDiRB/hKiHztev3Z+IthHQF9ggGCQ+tYDq81X tRsne0G3VfgVuQ8/IrqCMefBPKuln4v+uATZUME3qaF8o7kUdG0ISHQQAPh08kOufPff DANf7dgdmIXrKb9YG3ZMlvCNI+my4uX2z6YA7XGf6TD7QhFUwRDKMwM/aihKCpScQnYL I0xAFDDK5RIWf3tpRTbsdFwwdNaFvqKznFr56Jtn89j5ZXrEJdjt0uKWL2IzRbib6RGJ VpJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fWrV4qFfgvswlqkw4zsvVIGgUXoghkmpajzc2Uoaq30=; b=NFjHG8mKLWyzry2mm/pigtCQr3JYCvjLFBjM34Tkvx/6Ekr4bdy1yybT58kGOWNcID SnLA4MFGanpRb2g/2Hu0CmkDOBINbCBsjxhMPyPW4Oz5qJugmgpuCY5yZ+P6NxyIFRFE khAfoy9YyciIqqt0HU6W9J/CaWWMtDvDo9qU7trTSJiRLxR/XPD/YWu83s0ClYtqyLnL AVzy/e8TPQ+apSILC4lNRhy/GprjOrFGhfrJMYiv4s+a2/gWeSON11urOLy2QMDY2ph7 nqcSSoxhk8NdypH3dB+y3go5zjYkH9zjuu/lpk16/top5ytpfeRKP6xdVidzrhb9sW// SIhQ== X-Gm-Message-State: AOAM530Q6kU2eTYdtun097jbrLrBjpkPUwl42B720EoH/DNThHewJX4s ZxjfkDMxTR/DPoqKlT9+fKdnVw2OgFQ= X-Received: by 2002:a63:7d04:: with SMTP id y4mr33935629pgc.131.1637592440343; Mon, 22 Nov 2021 06:47:20 -0800 (PST) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id k1sm9549957pfu.31.2021.11.22.06.47.19 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Nov 2021 06:47:20 -0800 (PST) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Mon, 22 Nov 2021 22:47:14 +0800 Message-Id: <1637592434-16132-2-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1637592434-16132-1-git-send-email-lance.lmwang@gmail.com> References: <1637592434-16132-1-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/libaomenc: remove the redundant initialization 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: Limin Wang MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: gw4igP36L5vm From: Limin Wang For dst->have_sse will be assigned by ctx->have_sse soon(code line 23). Signed-off-by: Limin Wang --- libavcodec/libaomenc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c index 800fda0..963cc1b 100644 --- a/libavcodec/libaomenc.c +++ b/libavcodec/libaomenc.c @@ -948,7 +948,6 @@ static inline void cx_pktcpy(AOMContext *ctx, dst->sz = src->data.frame.sz; dst->buf = src->data.frame.buf; #ifdef AOM_FRAME_IS_INTRAONLY - dst->have_sse = 0; dst->frame_number = ++ctx->frame_number; dst->have_sse = ctx->have_sse; if (ctx->have_sse) {