From patchwork Mon Sep 21 11:16:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harry Mallon X-Patchwork-Id: 22551 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 CA49444A468 for ; Mon, 21 Sep 2020 14:24:19 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9AD2D68B652; Mon, 21 Sep 2020 14:24:19 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1970568B570 for ; Mon, 21 Sep 2020 14:24:13 +0300 (EEST) Received: by mail-wm1-f66.google.com with SMTP id q9so11754937wmj.2 for ; Mon, 21 Sep 2020 04:24:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codex.online; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=9zmTzeG1VRB0KuIy6swVr0KaRRIen7MoE4A5WPg2/zA=; b=UHLZ4ehgDPk188IqrbDkPzHj0P2oWePjfFSOpMMOEzcEKW15TnprahBBnJc4HWytMA CGh5ueijr19XbU5Mzi7ZA7gWgxHho8Vjw6Rbg7lD96Z1xK3WqO0mJj+lBZ0vJwS27n+H J///Grk0Kpq3BZFlUyVmqMQN0XHx2x33Vx9uA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=9zmTzeG1VRB0KuIy6swVr0KaRRIen7MoE4A5WPg2/zA=; b=QlMahK8Z4WxTZz5xDna1wzAVgEYmnfw0b0JCTlClTvfUGbZVCxVUUl1xJ5OkkoDXLK LF0V+M9aGRBU4W/6m1Nw2TuIceETiJNBi4C8LP+YLB4Rd9mtkQWjPjf37NdUQ5l9LLlx ukA83h9geGRdYnZNkC+8mE/CBZRjibCEtDUxFW+EBGFsfapRxm75aa7enRhON4k69b+C /RTpC0CZ8aUlXBpCdg4vBbESBlA7IOB14J8xEIX0h6ovuWIIbBC4T4xbROMuS8BhVtIf xfmsFvyjwBeTbnwCoaKxlxEqQdg5yaresbNxO3wBw8SDeXmc7kBpfppsyqzZ7v9ddvYT UExQ== X-Gm-Message-State: AOAM533rcY3lxwobT/n+GR8VLM0o2V6beqPPmJpWBbxohkjPyvL4AD+y vTf15fgJcxUFqfMkDMsZpf4zs923ysJcHw== X-Google-Smtp-Source: ABdhPJwBayPdBvZE+s9vJhquwba3DcSkaXYfxh20wuZtgWzIyOBruZV3YDu0E1RVUUDFPywdkrIwHw== X-Received: by 2002:a1c:9cd3:: with SMTP id f202mr29806787wme.148.1600687025410; Mon, 21 Sep 2020 04:17:05 -0700 (PDT) Received: from localhost ([66.159.216.147]) by smtp.gmail.com with ESMTPSA id e18sm22132092wra.36.2020.09.21.04.17.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Sep 2020 04:17:04 -0700 (PDT) From: Harry Mallon To: ffmpeg-devel@ffmpeg.org Date: Mon, 21 Sep 2020 12:16:58 +0100 Message-Id: <20200921111659.85445-1-harry.mallon@codex.online> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] avcodec/videotoolboxenc: Set profile (main/main10) on HEVC encode 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Harry Mallon --- libavcodec/videotoolboxenc.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c index e89cfaeed8..212f41b19a 100644 --- a/libavcodec/videotoolboxenc.c +++ b/libavcodec/videotoolboxenc.c @@ -1114,15 +1114,12 @@ static int vtenc_create_encoder(AVCodecContext *avctx, } } - if (vtctx->codec_id == AV_CODEC_ID_H264) { - // kVTCompressionPropertyKey_ProfileLevel is not available for HEVC - if (profile_level) { - status = VTSessionSetProperty(vtctx->session, - kVTCompressionPropertyKey_ProfileLevel, - profile_level); - if (status) { - av_log(avctx, AV_LOG_ERROR, "Error setting profile/level property: %d. Output will be encoded using a supported profile/level combination.\n", status); - } + if (profile_level) { + status = VTSessionSetProperty(vtctx->session, + kVTCompressionPropertyKey_ProfileLevel, + profile_level); + if (status) { + av_log(avctx, AV_LOG_ERROR, "Error setting profile/level property: %d. Output will be encoded using a supported profile/level combination.\n", status); } }