From patchwork Wed Apr 15 04:53:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Fu, Linjie" X-Patchwork-Id: 18964 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 D3BB144B668 for ; Wed, 15 Apr 2020 08:01:55 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BF9A368B812; Wed, 15 Apr 2020 08:01:55 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B5D2368B9C6 for ; Wed, 15 Apr 2020 08:01:47 +0300 (EEST) IronPort-SDR: KOXtm11XGJaVVWD5VlkxEa9yZXlEJHocOCrV7O0krdehqp2CWPck44AC3uO0dq0RX3pbQ7tYwO I4Zi7mDHClqQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2020 22:01:44 -0700 IronPort-SDR: /5zovPcq7wTKFY89xXpkq9Lf6I6LVLVi7lWnTRtMFAaMPTxHryohyPN6LeOAh48dV3WzVzSnfj 18F0VEw/IbSg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,385,1580803200"; d="scan'208";a="288439548" Received: from icl-dev.sh.intel.com ([10.239.158.73]) by fmsmga002.fm.intel.com with ESMTP; 14 Apr 2020 22:01:43 -0700 From: Linjie Fu To: ffmpeg-devel@ffmpeg.org Date: Wed, 15 Apr 2020 12:53:42 +0800 Message-Id: <1586926427-20170-5-git-send-email-linjie.fu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1586926427-20170-1-git-send-email-linjie.fu@intel.com> References: <1586926427-20170-1-git-send-email-linjie.fu@intel.com> Subject: [FFmpeg-devel] [PATCH v4 4/9] 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 f994f95..e556f03 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -237,6 +237,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) {