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 E98F843CD0 for ; Thu, 6 Oct 2022 14:03:52 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 996E068BBBF; Thu, 6 Oct 2022 17:03:48 +0300 (EEST) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1661068B800 for ; Thu, 6 Oct 2022 17:03:42 +0300 (EEST) Received: by mail-pf1-f179.google.com with SMTP id i6so2159193pfb.2 for ; Thu, 06 Oct 2022 07:03:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date; bh=we1uCSCjoISV3wIJYVuUHnAS2Dd2xUUZTRHWqEXEL+E=; b=Xqovesc7PNPhHArCTN5ZfTRawtxD7VkiJ/qslBSJ49ccAnv3M9zsy7re0d6T8ui2R/ hRQXOVT8X8VFUdrT4Prmn5jRuAcEgw2KKcTjavl/F5znSTYQHas8svPok/NeuxqIaI+5 UPoK1lOpA/pWc+6pyyRfGOgTzWulCVpftlq5/3lajzCMRfW/rkcyhr2EQ/B+o1XMQ3fb RICvvsKWf/LJbip3ztEyBsVG8WNxDO7eZz0EF0klnYa5r5GoQbsR2Jxgtj+YPLMGDLkm WdmTeijOsv9o8tyfb2+FkNozG3yUaltad9UYLR+ojWHOTIrjtWV9EC5jOJjJWygB7IU+ dsFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date; bh=we1uCSCjoISV3wIJYVuUHnAS2Dd2xUUZTRHWqEXEL+E=; b=r7yVFbRztSewWepoeMDt08kUy3obd2MBikpjBmpjsKnRlegoEvmFTEJcCaXr0JUFKk t8t0k+jZxCsUrHhBw9hPgK8DVIlVP8HPIeT5iA6AZAYup6AHce2Dshg+j9/ljfMcaT4z ccCNlOzErpLF7mJGu8GfULhVdVbT5h5r62IS23uXucl9KBLiF6H1gdU6hx9EiicrXf74 GoOfH74+qLsdPqbywvZtPH3auS7WpyQaaJPvJ1M2nf7ImRvIV510r4QCBe7eGnIqijhQ CXr7pV2q8oDgTeAbuF2VJzGOJ3haV6/oAFf7qQkUIMQtOgTk571ctINxjFpAk9oKFgkP icVA== X-Gm-Message-State: ACrzQf2NiGmCGOSWJn77C7pAmL6cAvvdwHSChMH7mcHR0XLXy9H/A78j urC5ls5+MAn4q4Fwni7SMyfNNLwDylN8iblYEIZEso8TkaqMhPZLhTY= X-Google-Smtp-Source: AMsMyM6ccZLD+2zmfYao5l+3EGRTqHRIylM5hIL6qBTb06bZLV7odjSoghEwNimv++98RmIdg9eUD2X5L+W7uyFh6KQ= X-Received: by 2002:a63:6a48:0:b0:43a:18ce:4e08 with SMTP id f69-20020a636a48000000b0043a18ce4e08mr83878pgc.432.1665065019658; Thu, 06 Oct 2022 07:03:39 -0700 (PDT) MIME-Version: 1.0 References: <20221006134959.771-1-ovchinnikov.dmitrii@gmail.com> In-Reply-To: <20221006134959.771-1-ovchinnikov.dmitrii@gmail.com> From: Dmitrii Ovchinnikov Date: Thu, 6 Oct 2022 16:03:27 +0200 Message-ID: To: ffmpeg-devel@ffmpeg.org X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH V2] lavc/libvpx: increase thread limit to 64 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: Removed unnecessary comment as requested by Ronald S. Bultje. some more thoughts about the patch: This is my deduction from what I could find - There was a hard limit of 16 threads in libvpx as there was no benefit to adding more threads based upon the parallelism available in the the codec. This was based upon resolutions upto 3840x2160 (more details below). For 4k/8K videos this restriction does not allow enough parallelism to be exploited. Adding more threads improves performance for higher resolution videos. Details: Tiling and Threading Recommendations Tiling splits the video frame into multiple columns, which slightly reduces quality but speeds up encoding performance. Tiles must be at least 256 pixels wide, so there is a limit to how many tiles can be used. Depending upon the number of tiles and the resolution of the output frame, more CPU threads may be useful. There is limited value to multiple threads when the output frame size is very small. The following settings are recommended for tiling and threading at various resolutions. The number of threads is doubled as there is an option row-mt when set allows row-based multithreading within the tiles. Frame Size | Number of tile-columns | Number of threads 320x240 | 1 (-tile-columns 0) | 2 640x360 | 2 (-tile-columns 1) | 4 640x480 | 2 (-tile-columns 1) | 4 1280x720 | 4 (-tile-columns 2) | 8 1920x1080 | 4 (-tile-columns 2) | 8 2560x1440 | 8 (-tile-columns 3) | 16 3840x2160 | 8 (-tile-columns 3) | 16 In ffmpeg, the number of tiles is controlled with the -tile-columns parameter and the number of threads by -threads. For example, a 640x480 encode would use the command-line -tile-columns 2 -threads 4. _______________________________________________ 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".