From patchwork Tue Sep 6 09:22:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Chen, Wenbin" X-Patchwork-Id: 37689 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp3135450pzh; Tue, 6 Sep 2022 02:25:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR56v9xD5M4yk58gmc6Jr2tWetpTEtjNaSC7fHfswElVXU8ZHdDC3kSp4CitJI78K7akSbDX X-Received: by 2002:a17:907:d91:b0:741:771f:1d11 with SMTP id go17-20020a1709070d9100b00741771f1d11mr30332858ejc.588.1662456310495; Tue, 06 Sep 2022 02:25:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662456310; cv=none; d=google.com; s=arc-20160816; b=TE4umB4sHVW2UuP/mSF3B31UdvEChQyhSzrJ2Y8cw2AXd46hfT5uvsIFkO8PRaH93Z zpZ3hR44/IMpNbl02D9+kRcF3+m9wvxbe1K+oAgWOWbxkq3kmUsoFotS5HRpgnHrnD6h 6e+UlI+h2o1pm1+StlZZwaA0Qt/hbiAR44T+MPfR5hN52kpVzsLuFtMzTxseYGMaBVBq 6Cu7HZ5tn/doJE1PSu1+IBj24CcmVbJr9rZtf514IYR6Xf538hlpaKBNRGHKVv7Od2HI aCoT4gILGHI97KGHkgKZ443o04lK07m0uNdULYCQxKE7XC8j1rrlCUlM+yUb6LGgdEeB Ekfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=EJrXNg81uXb7FWCbtbGNkQt6C80ZqV0DF8Cg79KyhBs=; b=xVcDIeAI8hR1Odt9UzeGSEOcYtC0l+NykaKxj7YrQWlcjOuQWZH7sA1+NmfGPxRsRW 59rLAsi1bbh696az6nWJZMX+Grn4qtbxlD3QK4SZHjE9GkbE7Fcn+mnpGHiUbgy09dWc eJjtO5tGGbOkwUvSyS8ppnbeN0IxrOFidS828Fm4VjKLr74wJzOL4VE9gumssh6Sw4fZ c40w80UzcumyvBe7Mf8qSplgvge8LDU4w2bLQ81H4iPobfDVB/r1ejZS6e1Xw0NzlA6M ZTwd8WSqxdPyD44yvIaO46ZhzfJs1dqCP8DxmvYKUGMELcszKWsnm9ATF5q/cz05XPo6 Foww== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=j94kph0T; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id y11-20020a056402358b00b0043df9ca3ff8si859529edc.50.2022.09.06.02.25.09; Tue, 06 Sep 2022 02:25:10 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=j94kph0T; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B771168BAAD; Tue, 6 Sep 2022 12:25:05 +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 933CF68AD28 for ; Tue, 6 Sep 2022 12:24:58 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662456303; x=1693992303; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=kJBnSvDCTBRdglRY5u8D3L/dSNJ6JEATPnWGtvm2nGY=; b=j94kph0TxyqqauD/sHZEJ1ULPO9OIdWprq7NPy+KNy09J6lG8dYqHC+R 0BpQd6NKnd2KXPUraSkKsaFSZ9h78I1tLme4YhglrNxeT0I1rSqNwcGwD JOihngTQhAWCT7BKxmdhLiv/DbzyLcHRILmFgAYDLBs5yxG5Px//eF87o 49D9Q8MqAZqlBVuNbcGjzpJu/UssIgV3xzR/ISjss61BJModSdpOSqyIK yBT5RSCue3hLSCYKtd2ATXf1iOAXojGZH6TT3aFwCI3bkmpxCl0bfXAJV FUi2bqeEvRzg851x/+H2OWSqekd1Du4H7NaaCYDmGLVZG/wFLUjJAyqyU g==; X-IronPort-AV: E=McAfee;i="6500,9779,10461"; a="322720545" X-IronPort-AV: E=Sophos;i="5.93,293,1654585200"; d="scan'208";a="322720545" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2022 02:24:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,293,1654585200"; d="scan'208";a="565028238" Received: from wenbin-z390-aorus-ultra.sh.intel.com ([10.239.35.4]) by orsmga003.jf.intel.com with ESMTP; 06 Sep 2022 02:24:55 -0700 From: Wenbin Chen To: ffmpeg-devel@ffmpeg.org Date: Tue, 6 Sep 2022 17:22:52 +0800 Message-Id: <20220906092258.994742-1-wenbin.chen@intel.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 1/7] libavcodec/qsvenc: skip parameter resetting on mjpeg_qsv 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: BYqiZv+Q/kzI mjpeg_qsv don't support dynamic resetting, so skip it. Signed-off-by: Wenbin Chen --- libavcodec/qsvenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 7ac5390f10..842cfb845e 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -1680,7 +1680,7 @@ static int update_parameters(AVCodecContext *avctx, QSVEncContext *q, { int needReset = 0, ret = 0; - if (!frame) + if (!frame || avctx->codec_id == AV_CODEC_ID_MJPEG) return 0; needReset = update_qp(avctx, q);