From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id EDD5644687 for ; Tue, 20 Sep 2022 17:51:27 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5C62468BB64; Tue, 20 Sep 2022 20:50:49 +0300 (EEST) Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3E51968BB39 for ; Tue, 20 Sep 2022 20:50:41 +0300 (EEST) Received: by mail-qv1-f43.google.com with SMTP id i15so2574253qvp.5 for ; Tue, 20 Sep 2022 10:50:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rcombs.me; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date; bh=DAE1Bo+CjIjMRWQnttWH55LL5maanhJGg4HJVeBfmlM=; b=U1wwJWdDl4rSM84Eu5MvCV+bU+rwa8wWBuuBXK43i3i7t9A/szqnqse5jkLMoEOTgE 1ctTC5KKsoYjxm/RAv4OhNB32hqZdrRU0Zq4rZ97p08fEzZMuf7CCuIbWDxsS6KS5Dra XWURgkdqJ0Y+zzy7e/+zbMMUlCnGaznbzj8FYb4LuVdC4u6xKxvLSQ0lVtamHOqcUN6f lclqXNC5buMiwf8y+DfTz9Hj7dbe5cLSqxrzX4Ni3fYau/kNeJ6FG1xL11/3RorXYPqC dkGOJEhhsJJMQyU4I0/muhQCNG7+UpOW7C+spJdlIuHu9dAAMkbAYtU7/FC1a5adseo+ RsQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date; bh=DAE1Bo+CjIjMRWQnttWH55LL5maanhJGg4HJVeBfmlM=; b=EoHS2LiHUJTx8a5ju2PxXQR5F84MesVfFK3vHrvp2ww53GeryTEFVUG5OdKrBiAORu GCE4CQL2V4PpGBMtjPnCYAW+CXghsmfsvWiNWkUhpge4RLgNOIzcul0siG2FpsdhUb+W e8HcMTIWbo0fBq0C6PNaoNFiMlSFZrcZLNu6mC46eSwcaRFTapEo/ML1mO8zCSujlNxI SxEw3mVNPnQB+OUMa69iXzl2Y7TGvFdsrZ5mUUl8y2gFN+F68PDBPXMRWTVAY4ebe/53 6avwMFDHhF2YsJUjxv8idBQWhFxYG+4FCh6falNE6UaTmx8JWDgPZCZLkUjh5e/UYUDY LtGw== X-Gm-Message-State: ACrzQf10WrfNDQM50zkoRosZwgCK6c74g81euxSVPFwwK4Om/IaUBeYX 2e/N6Vo9Oz/PapbB2NTXMGMQ3I9sUBVI X-Google-Smtp-Source: AMsMyM5IkENM6CPLUrzIMGOn2sgevcr5DLHW4aPY8XMdtOCzHCM/Okt4YpECBcxBGmILNw344jX6hg== X-Received: by 2002:a05:6214:5298:b0:4ac:c9f9:9091 with SMTP id kj24-20020a056214529800b004acc9f99091mr20564661qvb.25.1663696239395; Tue, 20 Sep 2022 10:50:39 -0700 (PDT) Received: from rcombs-mbp.localdomain ([2601:243:2000:5ac:50a3:2f65:4798:4cad]) by smtp.gmail.com with ESMTPSA id o1-20020a05622a008100b003431446588fsm189017qtw.5.2022.09.20.10.50.38 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 20 Sep 2022 10:50:39 -0700 (PDT) From: rcombs To: ffmpeg-devel@ffmpeg.org Date: Tue, 20 Sep 2022 12:50:19 -0500 Message-Id: <20220920175021.60790-6-rcombs@rcombs.me> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220920175021.60790-1-rcombs@rcombs.me> References: <20220920175021.60790-1-rcombs@rcombs.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 5/7] ffplay: add filter_jobs arg 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: This is similar to filter_threads, but controls job count. --- doc/ffplay.texi | 5 +++++ fftools/ffplay.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/doc/ffplay.texi b/doc/ffplay.texi index 5dd860b846..abc857013f 100644 --- a/doc/ffplay.texi +++ b/doc/ffplay.texi @@ -196,6 +196,11 @@ will produce a thread pool with this many threads available for parallel processing. The default is 0 which means that the thread count will be determined by the number of available CPUs. +@item -filter_jobs @var{nb_jobs} +Defines how many distinct jobs a filter pipeline will break frames into. +The default is 0 which means that the thread count will be determined +by the CPU topology. + @end table @section While playing diff --git a/fftools/ffplay.c b/fftools/ffplay.c index bcc00afe31..bce1d20c49 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -355,6 +355,7 @@ static char *afilters = NULL; static int autorotate = 1; static int find_stream_info = 1; static int filter_nbthreads = 0; +static int filter_nbjobs = 0; /* current context */ static int is_full_screen; @@ -1963,6 +1964,7 @@ static int configure_audio_filters(VideoState *is, const char *afilters, int for if (!(is->agraph = avfilter_graph_alloc())) return AVERROR(ENOMEM); is->agraph->nb_threads = filter_nbthreads; + is->agraph->nb_jobs = filter_nbjobs; av_bprint_init(&bp, 0, AV_BPRINT_SIZE_AUTOMATIC); @@ -2168,6 +2170,7 @@ static int video_thread(void *arg) goto the_end; } graph->nb_threads = filter_nbthreads; + graph->nb_jobs = filter_nbjobs; if ((ret = configure_video_filters(graph, is, vfilters_list ? vfilters_list[is->vfilter_idx] : NULL, frame)) < 0) { SDL_Event event; event.type = FF_QUIT_EVENT; @@ -3615,6 +3618,7 @@ static const OptionDef options[] = { { "find_stream_info", OPT_BOOL | OPT_INPUT | OPT_EXPERT, { &find_stream_info }, "read and decode the streams to fill missing information with heuristics" }, { "filter_threads", HAS_ARG | OPT_INT | OPT_EXPERT, { &filter_nbthreads }, "number of filter threads per graph" }, + { "filter_jobs", HAS_ARG | OPT_INT | OPT_EXPERT, { &filter_nbjobs }, "number of filter jobs per graph" }, { NULL, }, }; -- 2.37.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".