From patchwork Sat Aug 1 11:22:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 21421 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id BFA9F44B0E2 for ; Sat, 1 Aug 2020 14:30:17 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A1B0F68B9A0; Sat, 1 Aug 2020 14:30:17 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-oi1-f193.google.com (mail-oi1-f193.google.com [209.85.167.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 71AAB68B78C for ; Sat, 1 Aug 2020 14:30:11 +0300 (EEST) Received: by mail-oi1-f193.google.com with SMTP id v13so12476063oiv.13 for ; Sat, 01 Aug 2020 04:30:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=vyUkX56DVmvNhrwNYx1ZglrkVGfRw3M6M0vHNWGaDtQ=; b=rmaHLOxEYWjHGj0HkLZabytbJlZS+PCFnuyp6zgG0cGaB3UdoVW5c3IZmC7VF7KVBX 5ziXLTVIYhlekDSo76QBnECpLBYGNwZMAWfek4e5Pw7R5mmDXgyYHRU7PwFIk9KyElj0 P7k4VC5mh1IBS0DiLLXWyUudiBLfM9C5rXrb86bm1cvs2mnYbzAdGDzQlhXR9G84im7i v/4k/6nzW5YkqtMaVJgDk8IrlczM39AcxPtQQVq4vM6w72EPxXqpI/MDCHz/ViVDoam0 UV6uQJ0l7xWs/WdvWTNpvQuu0oH+7ClYDS10lFUINiBZK4x3J6NxDQaDKG4+Du7vM8u4 NRYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=vyUkX56DVmvNhrwNYx1ZglrkVGfRw3M6M0vHNWGaDtQ=; b=fdBncSuw69vnM+ZIUa8aN/VPSpNOmLsWazF8EEO6X3uS41prXzGizwu3tFn+c7j6ya 8f9g39zYJunYuL2NceCpxSe46yDkZ59tQ8PbRWqMl1a12+2QobnGz7QGyAf6fg5H+gLi vBLKsweyu81ZKPk9Sq6Vpxo1yel7yD8jn07hjG2WLyM7epMfOPQ4Gc2vicjpksg45MKB XKWYl+RKl+T0hZBgduIEyCz9RpZopYNMLyao8KWSHD9sSCsChlLxU3C/FjtjDH9R5ECy KxYTQBENsHz2hTGiPhHYEOiH5jvJIiPNKGP//My1o/z1xzh9EHa1F0fCNVmsbwB5b2k+ 4wRg== X-Gm-Message-State: AOAM533kJLbtjFoRC5s5XyqXN1hSv0sPihcM2Wb8vaLtTDT4OE4WIAac l+cbNN8/jHH/gtpx5AaovBUzUbOP X-Google-Smtp-Source: ABdhPJzhVDn4JnQYqiHPsCDKki75Xbta4XGMLNWZFMgvlvvm+TIXNsJgfgtSlthLGaJw1IVX9ZdrLA== X-Received: by 2002:a17:90a:eb18:: with SMTP id j24mr8331340pjz.76.1596280984787; Sat, 01 Aug 2020 04:23:04 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id 21sm13046925pfa.4.2020.08.01.04.23.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Aug 2020 04:23:04 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Sat, 1 Aug 2020 19:22:39 +0800 Message-Id: <1596280963-15526-1-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 Subject: [FFmpeg-devel] [PATCH 1/5] avcodec/libsvtav1: fix copy and paste error X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" From: Limin Wang Signed-off-by: Limin Wang --- libavcodec/libsvtav1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c index 40942c6..d34c6b3 100644 --- a/libavcodec/libsvtav1.c +++ b/libavcodec/libsvtav1.c @@ -85,7 +85,7 @@ static const struct { { EB_ErrorBadParameter, AVERROR(EINVAL), "bad parameter" }, { EB_ErrorDestroyThreadFailed, AVERROR_EXTERNAL, "failed to destroy thread" }, { EB_ErrorSemaphoreUnresponsive, AVERROR_EXTERNAL, "semaphore unresponsive" }, - { EB_ErrorDestroySemaphoreFailed, AVERROR_EXTERNAL, "semaphore unresponsive" }, + { EB_ErrorDestroySemaphoreFailed, AVERROR_EXTERNAL, "failed to destroy semaphore"}, { EB_ErrorCreateMutexFailed, AVERROR_EXTERNAL, "failed to create mutex" }, { EB_ErrorMutexUnresponsive, AVERROR_EXTERNAL, "mutex unresponsive" }, { EB_ErrorDestroyMutexFailed, AVERROR_EXTERNAL, "failed to destroy mutex" }, From patchwork Sat Aug 1 11:22:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 21424 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 8AE1444B973 for ; Sat, 1 Aug 2020 14:45:43 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6D15B68B9AB; Sat, 1 Aug 2020 14:45:43 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-vs1-f68.google.com (mail-vs1-f68.google.com [209.85.217.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8432768B8F9 for ; Sat, 1 Aug 2020 14:45:37 +0300 (EEST) Received: by mail-vs1-f68.google.com with SMTP id y8so10740387vsq.8 for ; Sat, 01 Aug 2020 04:45:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VUbyf9fUdnK9KXINNnkHK9kvG8Z+2v3LQdDG7NI1yn8=; b=iowBp39u78jIXDXWUCfieeCkJZwWDPQ4UGEdbN+vkpz5MAO3d0h/1UnRsNjsyO6AVR 1iQHdKOj+2aUsLnu0HgUCWi5S/N/YqaWLX8vF+M0BXHVwQVvuFu05jWi1iBK8bKbn+ah irT4+pn+TfL0netXXpMggoWprrYQ1CpAdUShvuDcmmbYbb8aVs8caolsqW3J7C8Rqnw/ IFdg6xkkr5WrL5vjM7pGwwTWmdvbqw3ZS33aFv2lT0GqxO0uxJ/8/eOLmo8q91zwrg4v MFVCkZreTKDp1alsAE/DB0pEDYoZGruq1Ix0AuEGecp8pp19Knr10y+I3wzI9YeQIQCt wmYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VUbyf9fUdnK9KXINNnkHK9kvG8Z+2v3LQdDG7NI1yn8=; b=DsyLaui0t8dyhT/lP+EUkcwiRwLrJxL1aG9EGXvhQ82kpYN6tT10dzOw9ci0pLg1j1 DQXU//+c6+LJmM/O0O43Q1mJYbdBP52bGnNFM4nNV3Pes2oQlOwmRJf4+x40NC6Nefp4 DHKPU9QnIdpIidRr0cr7n6DZ8LgctHocl8BLEYKGmlk74wlomxAr9wDXVHl+WUVt3zTs BXrtWQBg06n5fVVhWFt3YzbAS1UzTYmzInX/AnGugvJMgVPCDUcLowg/8DHoq6N3Atd9 WVf6G+eu5vp0sZpdHQpYyHftF8g/hzLQYXyZxkUhYSUAT3L+epEe3E7YTUoCsacDzIil Pg3g== X-Gm-Message-State: AOAM5335vRhwJuxgI+4QyzXFVktih9QQxCjDAxYUizanfPXu4Shy43Hz Z3Dt8jURlD4RKHgmtOyYQjbNtnCA X-Google-Smtp-Source: ABdhPJyHcDZGqZwF23u0SpjdSEb59B1sJ75fMoCPBe8gDVpUbV1cRORXH+cjMHZuIh1Aa+QofJ7IXA== X-Received: by 2002:a17:902:6b45:: with SMTP id g5mr7425169plt.42.1596280986304; Sat, 01 Aug 2020 04:23:06 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id 21sm13046925pfa.4.2020.08.01.04.23.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Aug 2020 04:23:05 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Sat, 1 Aug 2020 19:22:40 +0800 Message-Id: <1596280963-15526-2-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1596280963-15526-1-git-send-email-lance.lmwang@gmail.com> References: <1596280963-15526-1-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH 2/5] avcodec/libsvtav1: remove unneeded svt_av1_enc_deinit_handle() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" From: Limin Wang Signed-off-by: Limin Wang --- libavcodec/libsvtav1.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c index d34c6b3..eb6043b 100644 --- a/libavcodec/libsvtav1.c +++ b/libavcodec/libsvtav1.c @@ -273,23 +273,17 @@ static av_cold int eb_enc_init(AVCodecContext *avctx) ret = config_enc_params(&svt_enc->enc_params, avctx); if (ret < 0) { - svt_av1_enc_deinit_handle(svt_enc->svt_handle); - svt_enc->svt_handle = NULL; av_log(avctx, AV_LOG_ERROR, "Error configuring encoder parameters\n"); return ret; } svt_ret = svt_av1_enc_set_parameter(svt_enc->svt_handle, &svt_enc->enc_params); if (svt_ret != EB_ErrorNone) { - svt_av1_enc_deinit_handle(svt_enc->svt_handle); - svt_enc->svt_handle = NULL; return svt_print_error(avctx, svt_ret, "Error setting encoder parameters"); } svt_ret = svt_av1_enc_init(svt_enc->svt_handle); if (svt_ret != EB_ErrorNone) { - svt_av1_enc_deinit_handle(svt_enc->svt_handle); - svt_enc->svt_handle = NULL; return svt_print_error(avctx, svt_ret, "Error initializing encoder"); } From patchwork Sat Aug 1 11:22:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 21420 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id AAAE6449E6B for ; Sat, 1 Aug 2020 14:29:41 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7D42468B952; Sat, 1 Aug 2020 14:29:41 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9E76368B8AA for ; Sat, 1 Aug 2020 14:29:34 +0300 (EEST) Received: by mail-pl1-f194.google.com with SMTP id g19so5983410plq.0 for ; Sat, 01 Aug 2020 04:29:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DvnORY+jyzhm/rdxyLQtXx1JSaUvipaSClL/XfRNd2Y=; b=NuJ1jaDWvONvbREAgl1UzCGhZlpIK0Dv2v17jCKfIWxSY7e3I84ukjWrZs+1Gs5aOq Vznu1K6RDO2FbjWbta3SB0RuZpZa5yKRfHIXbChPYK/8DjS8c7oKkmQh2If7JIZ09ODp mZyj8ci9jQA+Eu12hhLofTqgTE9XfQk/MChHan6+AD32mHZUILmkZ7DAp+669P+JB6GE 0iUXkl8+kwCExy9u6Ozo1lYIWsvem2bEJEmr+ocUgA5Ffy/08jFdZ0/QlaHjd+iD1BFI psUk1o8WqGAPmQ19jJtRSwhY9/QnzbCK3G4lAD0JjvYB702NJNniBJ00tZhcROrpkf8V jcHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DvnORY+jyzhm/rdxyLQtXx1JSaUvipaSClL/XfRNd2Y=; b=IrMq9gJwxtDVBD6fhe+s+DIRy7RpvdupRt5SfCYm0yBiJRMdK1BeANaN5Q4/wYdWqB n4lP37VY1O8Uoi2wtZxXqJDJ2oChpaCIhNOP1/eu530aLWdJt1Ga+G5RgxyrKN2P8xES Idt78iF0Lxr9t1OtW+ZiyEEZ9LWpuA8ItdTIwV8+j/tJUcvLVjbhJ1/laeCYPUb0ny0n iaPqjMrEooKDcPBLJxEZCsjAzi6NQqLr/VzojBx+Is4eFlGDUS6FEgdqnozyGuBQoYzc wI+KACm6h5fcVw3dNkGi8KDLpYQrYVzRF1B9zL69rpeCoPqhMvyRDIji0FSdxz80lyYn ZFkQ== X-Gm-Message-State: AOAM5338P867yZw0Iblpay1ku1ZS/uW6WefoX/CPxH/i3vJvWNTSN8M0 TIZ5400vYxaIWxnnvWzUwEkoRN1+ X-Google-Smtp-Source: ABdhPJxpQe1yUQuKXJWa7iEJwsAvoJeCkmFrqn8kf4dtekJ1K5OZcMVyNpZTFKxEJZEfUvTNn7aoEg== X-Received: by 2002:a17:902:a610:: with SMTP id u16mr5461266plq.197.1596280987779; Sat, 01 Aug 2020 04:23:07 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id 21sm13046925pfa.4.2020.08.01.04.23.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Aug 2020 04:23:07 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Sat, 1 Aug 2020 19:22:41 +0800 Message-Id: <1596280963-15526-3-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1596280963-15526-1-git-send-email-lance.lmwang@gmail.com> References: <1596280963-15526-1-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH 3/5] avcodec/libsvtav1: remove the unsupported color format and profile X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" From: Limin Wang If you enable YUV422 or YUV444, SVT-AV1 library will report "only support 420 now" error, so it's better to remove the unsupported code. Signed-off-by: Limin Wang --- libavcodec/libsvtav1.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c index eb6043b..3e3b907 100644 --- a/libavcodec/libsvtav1.c +++ b/libavcodec/libsvtav1.c @@ -160,10 +160,6 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, if (desc->log2_chroma_w == 1 && desc->log2_chroma_h == 1) param->encoder_color_format = EB_YUV420; - else if (desc->log2_chroma_w == 1 && desc->log2_chroma_h == 0) - param->encoder_color_format = EB_YUV422; - else if (!desc->log2_chroma_w && !desc->log2_chroma_h) - param->encoder_color_format = EB_YUV444; else { av_log(avctx, AV_LOG_ERROR , "Unsupported pixel format\n"); return AVERROR(EINVAL); @@ -175,15 +171,6 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, if (avctx->level != FF_LEVEL_UNKNOWN) param->level = avctx->level; - if ((param->encoder_color_format == EB_YUV422 || param->encoder_bit_depth > 10) - && param->profile != FF_PROFILE_AV1_PROFESSIONAL ) { - av_log(avctx, AV_LOG_WARNING, "Forcing Professional profile\n"); - param->profile = FF_PROFILE_AV1_PROFESSIONAL; - } else if (param->encoder_color_format == EB_YUV444 && param->profile != FF_PROFILE_AV1_HIGH) { - av_log(avctx, AV_LOG_WARNING, "Forcing High profile\n"); - param->profile = FF_PROFILE_AV1_HIGH; - } - // Update param from options param->hierarchical_levels = svt_enc->hierarchical_level; param->enc_mode = svt_enc->enc_mode; From patchwork Sat Aug 1 11:22:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 21425 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 7B95B44A990 for ; Sat, 1 Aug 2020 15:15:03 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5609468B9C6; Sat, 1 Aug 2020 15:15:03 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0FA5768B9BB for ; Sat, 1 Aug 2020 15:14:57 +0300 (EEST) Received: by mail-io1-f65.google.com with SMTP id s189so26989665iod.2 for ; Sat, 01 Aug 2020 05:14:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=a/Yeh3g0Dob/gE3rY8f9ou4+wr+RWFkozt3E0w6QAno=; b=hkC+lcej1PZEa/JRIb4Bu/99dJwgA/hJDwzakkxP7gOGBg5vx9Xk+CZYFlAZGa1lOt UIDBnw98bnub0cUkOETqT+5Zv6Un4eze2rGaIPNMXf/UFjBQMzpjzJvXYhL8RKm/Y7SF kRXpsoOtdLMkueus95+BMMj/wGFsDszxp7euIDkIX8NYG8JGB5qKf97/RSpYX/fHkOmT Cr7OAKRQgMAylMbmdv2x2op8CT2sTocgu5JIC9+sRTlDu0nYXgjjCtrORKW02kZ9YuS/ WTJ+m8X1ZPD5lhnv3e8VpbAABRqlIjzYqLJY8CVKFt8whOZSs4P8Bbarm2V8DOWOtWyG 812w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=a/Yeh3g0Dob/gE3rY8f9ou4+wr+RWFkozt3E0w6QAno=; b=NsQEa2F7iP14fBAPss6A6ma1WTdwZ0k9jLc+5Plzl6ko5Pjkst+9rMNN9Zf2mP4eHM 7WcBOIQN3A4yCQDrs10i58uhQ3qwrBJVIJ/S8Ec0a1SPLNQ8yMXEu5DQgsL18mnWgApY Hd659+i8G2xqw/PuZQccYsnsvaMXzx5JGSwIEJ+LMj+h2K9jwML4B2sDtFH8OHRKJIMq 1uo1WyDqPLpcntE5DUWFyvNM9igp/ksvPDnXZacOCUJVLLVhl4HaUBsvD7PcShBixFQk 9LIoCm+5QPhU1+VunHAoy3YLPcbukFEwrDY2lVB6D6YnCFrs+tNXKTFdPgjNWGKBxHW8 d05w== X-Gm-Message-State: AOAM530RK/z2foN6FlJu5XFL27WYS3VyDKkpUZaVnd5cYZuAipUlia5I 67UK3DTLaxxUG/DRjELdTykpWas8 X-Google-Smtp-Source: ABdhPJxngWR3u4El47YIUb2EhoP1PE87X/amPiOEDEqYUq8QqXYMl1LjtwCRn7CMgXbh3nF3E2hr9g== X-Received: by 2002:a63:395:: with SMTP id 143mr7608581pgd.57.1596280989275; Sat, 01 Aug 2020 04:23:09 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id 21sm13046925pfa.4.2020.08.01.04.23.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Aug 2020 04:23:08 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Sat, 1 Aug 2020 19:22:42 +0800 Message-Id: <1596280963-15526-4-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1596280963-15526-1-git-send-email-lance.lmwang@gmail.com> References: <1596280963-15526-1-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH 4/5] avcodec/libsvtav1: support cores and socket options for svt av1 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" From: Limin Wang Signed-off-by: Limin Wang --- doc/encoders.texi | 9 +++++++++ libavcodec/libsvtav1.c | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/doc/encoders.texi b/doc/encoders.texi index 2f5457f..da0b68d 100644 --- a/doc/encoders.texi +++ b/doc/encoders.texi @@ -1747,6 +1747,15 @@ Set log2 of the number of rows of tiles to use (0-6). @item tile_columns Set log2 of the number of columns of tiles to use (0-4). +@item cores +Set the number of logical processor which encoder threads run on. Default is: 0 +which is unset. If cores and socket are not set, threads are managed by OS thread +scheduler. + +@item socket +Set which target socket to run on. For multiple socket systems, this can specify which +socket the encoder runs on. Default is: -1 which is unset. + @end table @section libkvazaar diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c index 3e3b907..78e0ee5 100644 --- a/libavcodec/libsvtav1.c +++ b/libavcodec/libsvtav1.c @@ -71,6 +71,9 @@ typedef struct SvtContext { int tile_columns; int tile_rows; + + int cores; + int socket; } SvtContext; static const struct { @@ -204,6 +207,10 @@ static int config_enc_params(EbSvtAv1EncConfiguration *param, param->tile_columns = svt_enc->tile_columns; param->tile_rows = svt_enc->tile_rows; + if (svt_enc->cores > 0) + param->logical_processors = svt_enc->cores; + if (svt_enc->socket >= 0) + param->target_socket = svt_enc->socket; return 0; } @@ -519,6 +526,8 @@ static const AVOption options[] = { { "tile_columns", "Log2 of number of tile columns to use", OFFSET(tile_columns), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 4, VE}, { "tile_rows", "Log2 of number of tile rows to use", OFFSET(tile_rows), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 6, VE}, + { "cores", "Number of logical cores, 0: unset", OFFSET(cores), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, VE}, + { "socket", "Target socket to run on. -1: unset", OFFSET(socket), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, VE}, {NULL}, }; From patchwork Sat Aug 1 11:22:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 21423 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 351ED44B75C for ; Sat, 1 Aug 2020 14:44:41 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0B32768B9A0; Sat, 1 Aug 2020 14:44:41 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-oi1-f193.google.com (mail-oi1-f193.google.com [209.85.167.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C174E68B7A9 for ; Sat, 1 Aug 2020 14:44:34 +0300 (EEST) Received: by mail-oi1-f193.google.com with SMTP id h3so5536820oie.11 for ; Sat, 01 Aug 2020 04:44:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1jGaOvZ2cH7AdxjPxpvO2qM164TZm651fuFnJL3HYCY=; b=Kbz18k712gGYIj/qqA3JgLvRJNUoicES5z6t+t9q9n2bRFWgWsKSk0H8Hz5hm00wx5 3LDIObT9iUlFOhMv1OOACZjBJC5unmcuwmJOk3CZtuFeBfKXKZRslMJs42/p3XQqqZ18 kfDFsbnCNTnyEvUhmSv9peD7a9lnE7QCZ5rVkCdSPezDs4CpFOgf2Tsfo8Zs0fJzGjCc 22iqWMvDdg6qHhgsaT0A69GfoqjK1nuVMsGh3jtGHk4ETXCkX50D4Rp8bQy81ICTn1/S lqyCr2Yf6ZsnvAXX54XYlElGYsCkAbcRNjmPp5NuY6YozY/fVdCGDdXHqavjx8GZgJCB yXLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1jGaOvZ2cH7AdxjPxpvO2qM164TZm651fuFnJL3HYCY=; b=g4avT/GKyu9Jp9CI2cSRV/2aXrzfguWY8EJM3+eCoX/H/NsEQVEVdmHgAKzN6hkK3L Uwo4kjJ/7dywQldgPHX9kEqNkkYWXFa3FYIbiyzqEn4qDTiWepiFgyVbZ+RrKDY6Usyq jkoYzNbyo9N0hAp/QWtgv8SCcwMtsr5RIAzAUoGBd47/stgPXlIenYsozDsXM7Ru/97K eu5uU3buWX8gVhixBM5U2nq7+ZH5gSSO5pweM0ddj9VPdIRj+2lDhn8e8qClnt5wDjnO n9GQzUPR7EsTI5r1BBjZlWy3Bu48zTDVOe0DsNcGwIXHTCJ6eJjNLLwzD/KuuqGG9OEn 85pw== X-Gm-Message-State: AOAM530gwJYOqPNVLj8sXhe/2amQLPX6oS5jeKt4hk67uiQFQen8zvQQ jTDxyN0miB/2nhIhXGnd40ETr+in X-Google-Smtp-Source: ABdhPJxujWpwAxuw/Ww9YbVWWdsQ1zSmUQtefIva1z90NiMvmmrT2TlVBbEmExqaxtAaLKtIU/Mkjg== X-Received: by 2002:a17:90a:3627:: with SMTP id s36mr8723072pjb.70.1596280990782; Sat, 01 Aug 2020 04:23:10 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id 21sm13046925pfa.4.2020.08.01.04.23.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Aug 2020 04:23:10 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Sat, 1 Aug 2020 19:22:43 +0800 Message-Id: <1596280963-15526-5-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1596280963-15526-1-git-send-email-lance.lmwang@gmail.com> References: <1596280963-15526-1-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH 5/5] avcodec/libsvtav1: remove the auto thread flag X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" From: Limin Wang Please use the cores and socket for the setting of multi-thread. Signed-off-by: Limin Wang --- libavcodec/libsvtav1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c index 78e0ee5..dfb361a 100644 --- a/libavcodec/libsvtav1.c +++ b/libavcodec/libsvtav1.c @@ -556,7 +556,7 @@ AVCodec ff_libsvtav1_encoder = { .init = eb_enc_init, .receive_packet = eb_receive_packet, .close = eb_enc_close, - .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AUTO_THREADS, + .capabilities = AV_CODEC_CAP_DELAY, .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P10, AV_PIX_FMT_NONE },