From patchwork Mon Nov 12 14:18:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 11000 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 ED45144E00E for ; Mon, 12 Nov 2018 16:26:52 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 57A6C68A295; Mon, 12 Nov 2018 16:26:24 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 046FE68A285 for ; Mon, 12 Nov 2018 16:26:17 +0200 (EET) Received: by mail-wm1-f65.google.com with SMTP id 124-v6so8762552wmw.0 for ; Mon, 12 Nov 2018 06:26:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uMLjqpHU0IQXFV2THaSz2ooKVLeZ6L7YZld3Ixi8kwY=; b=fcH5zfHDHxvFC6uz+OQ68TiUNN0Txe2njR5AdOf7NUDvl9GZi23tA3k7dOp12Nt6/0 3UBoBWnOcpH2oTIT2aN4yfroqWbvVehRv7v5zFP8gAaXHIXNXe3FfLsE9L3YQ+Rvw3Z7 vIeIkzMpzziDh4/DMUjl2uxnEgxTeJuvGYyHTCs/1d14gurfaZKkHEfLXt9K2MQokqLu HjG205Q9KzUsZ6uCe4q3YgnsbPfhOtEl1mUC5dvuFyytF3QIJbpAZ86h6l38w9DGyWrP VrmVA81OhyvtXGMhWv+fsOLjNQWFObU4/V0hKJJPnNZbP0/wWDF3lboeDi8y4JG8sdx9 whbg== 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:mime-version:content-transfer-encoding; bh=uMLjqpHU0IQXFV2THaSz2ooKVLeZ6L7YZld3Ixi8kwY=; b=LXIzN5OZuRLZ+Qn7rjIreTyqY5Fi1eTcTuN98jiYBWXGFeT7prBSVeAtrq8M5LTu0k SO2m8gQnfJpiOLHcxWUC5dPOgz/rnK4NdTIKgq+96Kxiv/VWB7gfKHK6EXoKNVRT/u6z KngICvQ5Bv/Gx/A2d+KtzFQRZINhjYBSjcrk2nLZ82SV4qFFk3m6e1+U5Fmq/JuzXUPS z2ayqd/NMzLW+mB1e5+tFFyLCw+rUvujnxhlq8Kca6CdrY6qg9VGmX3veLjo0Hc5PvWM Ts/kAzbTiEYHVxO1f2GSYktMh2aWTXidaLnGwA4c1H4A1LnXsFSMqxxivv7E/3NmPwr2 wn/A== X-Gm-Message-State: AGRZ1gK9QU2BonEcLqyxoTxC6m7ifNvf/Pkt5HsZdqtXcoglyBLjimJb OQTK3onTrR9w7Q8DeiaE9KvwGu2k X-Google-Smtp-Source: AJdET5e9EQWraiwhGU3bC+rjQlipU5+ONkDqYWButcpk13a6QzqYSaPz+KGP0GZUXFoI+WH7mC2tjQ== X-Received: by 2002:a1c:2746:: with SMTP id n67-v6mr7747102wmn.116.1542032374935; Mon, 12 Nov 2018 06:19:34 -0800 (PST) Received: from localhost.localdomain (ipbcc08c44.dynamic.kabel-deutschland.de. [188.192.140.68]) by smtp.googlemail.com with ESMTPSA id 11-v6sm16981626wmk.26.2018.11.12.06.19.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Nov 2018 06:19:33 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 12 Nov 2018 15:18:13 +0100 Message-Id: <20181112141815.4472-3-andreas.rheinhardt@googlemail.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181112141815.4472-1-andreas.rheinhardt@googlemail.com> References: <20181112141815.4472-1-andreas.rheinhardt@googlemail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/4] h264_levels: Make get_level intra-profile friendly 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Currently ff_h264_get_level does not provide the correct level for any of the High Intra profiles. Now only High Intra profiles with level 1.1 get misdetected. Signed-off-by: Andreas Rheinhardt --- libavcodec/h264_levels.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/h264_levels.c b/libavcodec/h264_levels.c index 7a55116773..02efaa38dc 100644 --- a/libavcodec/h264_levels.c +++ b/libavcodec/h264_levels.c @@ -80,8 +80,8 @@ const H264LevelDescriptor *ff_h264_get_level(int level_idc, { int i; for (i = 0; i < FF_ARRAY_ELEMS(h264_levels); i++) { - if (h264_levels[i].level_idc == level_idc && - h264_levels[i].constraint_set3_flag == constraint_set3_flag) + if (h264_levels[i].level_idc == level_idc && + (constraint_set3_flag || !h264_levels[i].constraint_set3_flag)) return &h264_levels[i]; } return NULL;