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 DBF86443F3 for ; Tue, 10 Jan 2023 03:06:39 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0F11668BBFC; Tue, 10 Jan 2023 05:06:36 +0200 (EET) Received: from mail-ot1-f48.google.com (mail-ot1-f48.google.com [209.85.210.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7C7A768B1A1 for ; Tue, 10 Jan 2023 05:06:29 +0200 (EET) Received: by mail-ot1-f48.google.com with SMTP id p17-20020a9d6951000000b00678306ceb94so6278391oto.5 for ; Mon, 09 Jan 2023 19:06:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=pS5VNKP68jVHmwvozjImyCylBdNnWUDBrBEwkXJ1mAM=; b=d5ZNzmMcJkZ4xzRuwDA/BtTs/dJulv924zbE4uNzxA0BxZsY6KnG1wu3OryIPCGm65 U/e680gzzEhBnBC2JrC07YihxoH3xdnFX8X0iSSS7T5XeKeeIumWcz5ra3686z4pLjWw EPzvGqe1Wj4XMJtn6zwsmNWDwPtXhD7ZbTprBcGWHslqrCmaFipL3x1CIAidhqFtyddo WoEC8mN7SjD/xLC/1Li62Ch3vnkoRorBnhDpACSHInKdGLRFvzI8Q4Cbm+JziYPd1sQQ 6uXGI5verzeXucclqUb0Ri3gDNV8N/rnCot1Xx+cSr6sVX96raaBRyU1drtwxPiAPXFT deQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pS5VNKP68jVHmwvozjImyCylBdNnWUDBrBEwkXJ1mAM=; b=MUleBIkrLBl7bDLteCouBmFKvSIp9yYJyKiDvXhiLn6fzpvKGb7pctqFOGo+eeiE9o lXKsmxh+evybyYlS7ihlTIjmNXxdi6BWwamu5BG7XluAZyHbSGTW+aPwUsaJGOObuNFV kU9Qz3PDT7VZ+wYjobk3UTL3Gpm3eESEyu405piE/gRR0gUPitKJNcFrLhlJETCjYbHy F5QM5OyMfLNrUwz4RKUD8SpKejqE8VEJ69qGD52dW6M2fMgTRbbIlFg36ETm8+uwZicS /Yf6RRg436Os1eSHzZR+DwI32bn53Ok/Hbj3cUHbXzwlR3MhD0mQoHr8sP3Ye+GI6wbk tkYQ== X-Gm-Message-State: AFqh2kq+BpONxbIOWg7pAP89DFYFP30bc42Es/62Kk2h1F3dOCI8BRIJ mF5peaK1N4y9Zjp+kkrhNLH7GeLdfQVGOZcJ1d7L8od9cwrFTFI7apo= X-Google-Smtp-Source: AMrXdXu6LlHlprQ8jphJ+R53R1uUy8Qact2n74SN/DBm1fh5hqInkUfBlVI5aNvLHa8wfVtsfoag2JPJioWhL27kES4= X-Received: by 2002:a05:6830:567:b0:661:dd09:fcc4 with SMTP id f7-20020a056830056700b00661dd09fcc4mr3892320otc.60.1673319987424; Mon, 09 Jan 2023 19:06:27 -0800 (PST) MIME-Version: 1.0 References: <20230105104151.2055-1-Dmitriy.Ovchinnikov@amd.com> In-Reply-To: <20230105104151.2055-1-Dmitriy.Ovchinnikov@amd.com> From: James Zern Date: Mon, 9 Jan 2023 19:06:16 -0800 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH v3] lavc/libvpx: remove thread limit 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: Dmitrii Ovchinnikov 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: On Thu, Jan 5, 2023 at 2:42 AM Dmitrii Ovchinnikov wrote: > > From: Dmitrii Ovchinnikov > > This change improves the performance and multicore > scalability of the vp9 codec for streaming single-pass encoded videos. The > current thread limit for ffmpeg codecs is 16 (MAX_AUTO_THREADS in > pthread_internal.h) due to a limitation in H.264 codec that prevents more > than 16 threads being used. > > Increasing the thread limit to 64 for vp9 improves > the performance for encoding 4K raw videos for streaming by up to 47% > compared to 16 threads, and from 20-30% for 32 threads, with the same quality > as measured by the VMAF score. > > Did not need to add a check for limit in libvpx as it is already present > in libvpx/vp9/vp9_cx_iface.c: > RANGE_CHECK_HI(cfg, g_threads, 64); > As demonstrated by following message when -threads is set to anything more than 64 > [libvpx-vp9 @ 0x30ed380] Additional information: g_threads out of range [..64] > The difference is that it will cause a failure rather than silently capping the value which might break some workflows. libaomenc caps at 64, so it may be best to match that implementation for now. I'll make that change before submitting unless there are other comments. With this change there will still be the misleading output from validate_thread_parameters() in pthread.c, though it's not a unique problem to libvpxenc: [libvpx-vp9 @ 0x5639aa4c0200] Application has requested 64 threads. Using a thread count greater than 16 is not recommended. _______________________________________________ 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".