From patchwork Wed Apr 29 03:00:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Fu, Linjie" X-Patchwork-Id: 19354 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 6C51E44B6E0 for ; Wed, 29 Apr 2020 06:02:43 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5838C68BE48; Wed, 29 Apr 2020 06:02:43 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E599468BE36 for ; Wed, 29 Apr 2020 06:02:35 +0300 (EEST) IronPort-SDR: KOGICxbC4bZ/dbcDAQh2sMiDNzxr160uIlvrpaTvRHLUdCk0Tdpsb6xHwphgV9DihNwRRCbUff xyPM3iN9k6EQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2020 20:02:34 -0700 IronPort-SDR: i2pYFCDfpNhGSNooidty/UzImm89RUkfzLHltKtJL23szN/AIJcDLhw5IH7OSrgWk/SEi7FRDG SS7rt0R6F/7Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,329,1583222400"; d="scan'208";a="276036476" Received: from icl-dev.sh.intel.com ([10.239.158.73]) by orsmga002.jf.intel.com with ESMTP; 28 Apr 2020 20:02:33 -0700 From: Linjie Fu To: ffmpeg-devel@ffmpeg.org Date: Wed, 29 Apr 2020 11:00:49 +0800 Message-Id: <1588129250-30726-4-git-send-email-linjie.fu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1588129250-30726-1-git-send-email-linjie.fu@intel.com> References: <1588129250-30726-1-git-send-email-linjie.fu@intel.com> Subject: [FFmpeg-devel] [PATCH v6 4/5] lavc/libopenh264enc: prompt slice number changing inside libopenh264 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: Linjie Fu MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Libopenh264enc would set the slice according to the number of cpu cores if uiSliceNum equals to 0 (auto) in SM_FIXEDSLCNUM_SLICE mode. Prompt a warning for user to catch this. Signed-off-by: Linjie Fu --- libavcodec/libopenh264enc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index dc3bd53..29269f9 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -244,6 +244,8 @@ FF_ENABLE_DEPRECATION_WARNINGS param.sSpatialLayers[0].sSliceCfg.uiSliceMode = s->slice_mode; param.sSpatialLayers[0].sSliceCfg.sSliceArgument.uiSliceNum = avctx->slices; #endif + if (avctx->slices == 0 && s->slice_mode == SM_FIXEDSLCNUM_SLICE) + av_log(avctx, AV_LOG_WARNING, "Slice count will be set automatically\n"); if (s->slice_mode == SM_SIZELIMITED_SLICE) { if (s->max_nal_size) {