From patchwork Mon May 2 03:36:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Zhao X-Patchwork-Id: 35537 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:a885:b0:7f:4be2:bd17 with SMTP id ca5csp1611367pzb; Sun, 1 May 2022 20:37:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgrmzECscXINOSv0Bskyj5SHJriN0G6QPOe7mYcdPQkTSrHjUOuFzaoD1Y98tPK5ZWQch3 X-Received: by 2002:a05:6402:298c:b0:41d:6b63:aa67 with SMTP id eq12-20020a056402298c00b0041d6b63aa67mr11557803edb.42.1651462631581; Sun, 01 May 2022 20:37:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651462631; cv=none; d=google.com; s=arc-20160816; b=MXMHvlvuF0N36LNGfRTbHV+aGIPq5YJs3p7Ju7wCNUvdCw4mEteyAuUw2Vq+FRUKqd FNhj+cO6xFyqh/opF8M8UIaynU2giv+jFPvYdIvNRlhQasdMCSy1YxSAF7OMfZ1p7Ih/ 9QJIIlRALzOIGvSPUSVAwqA0Z9cdv4e1Zk5l2X7bVpU2T0vt8BTxJlHdtV2NlcaqFIxp /GgW/7gLsMvCFiuQR76ykVecNlm8Kb6fI78jFyXtHMv7OZSEUTwo4Ex7TLrLPOs6lylZ 8ifatsPJEqQmOufcBLQ77ifK30xYnAiKjAeFbzeGopW0qryaFbgoB1/yRQ7AcFFZgW8h yHEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=0b9YKBS6kEpqJD3iS8zcpyIjljXf36WuYhNjp/cfon8=; b=kcczfv2IfWoewUPP2C8KnGe4G8E3Z+NfY9CjmrOzgqvqhIKR2SHY5oVq0EasOwasmf wBHVHCL9eYdtaB1QY7/S8Qf+kurXkv6+99nCYPmG59pCwZouU+wMEoGO4hOe8i69MHDe Nbsb5Uxgz+SVUMfCIGefjFxhZAK2KY/RtIvht+fAQ+FteF/80veI3zWJBCn7xY7aXQAO cdkc14IKg0Imz64D6RX4Qsm3SC4d2Xht52CnMhGsAkcmA5Pnzdr4l4n1uNJjaj6x3cqs e0sPMMH/xK0ZoID33qF51um7SR5u8a9Nggn/FgD/hDNN8WetUs8ytiIsXhkLv/ltl1Zj E/bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=NJiLyREp; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id w22-20020aa7cb56000000b00425e2e653b6si12210963edt.440.2022.05.01.20.37.11; Sun, 01 May 2022 20:37:11 -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=@gmail.com header.s=20210112 header.b=NJiLyREp; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C30F368B1CA; Mon, 2 May 2022 06:36:57 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D00DB68B117 for ; Mon, 2 May 2022 06:36:49 +0300 (EEST) Received: by mail-wr1-f49.google.com with SMTP id t6so18028027wra.4 for ; Sun, 01 May 2022 20:36:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7Y8y7j4Ja6U4FrRzsrQKUmPcJCZqRuX3HaeLIiXWAdM=; b=NJiLyREpSGvYO53rgi9k7RxRu5Zm1VmRHwD8Y2du+BVM10yetZWw9zadkYRqulB2V6 k1z5Mkq2IkvFU2HlOex1v5Qi5VOvHDbRaJuW0e5qhXImKgODnXAPbAiN/mwsjMYtHa5t Vi7+s8kZCiveH9GPS+QLkvkbFF4BFh0SqlYIVnvVRJSxNckIRGQ98Q3YFiRiXGA5x5ND EXjuxN23HiR8CcpdShI+6bJUhbceV4FlL9FJq9w40349CaIS5bZhhk1W2CIFQOk9bJrw tGP4oPUa4DHkePbn8ML5caAHFbkG4qdj+Up4MGAcvasZWBaaWuh1QktI5W5tGP4ARHJL bRuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7Y8y7j4Ja6U4FrRzsrQKUmPcJCZqRuX3HaeLIiXWAdM=; b=LpIh8445umjNp/vByrrtBeLfKq3k2BOPmXEGoE/VpwqWrYjvaXiTQTp6bbNHq2n4hY 8+DjxY6lB8uvCp+nrtMd8FME1w2Z/rGgPhtC5enQ5/mHC0NCRbJlPysBfEBO1mzl3pm+ tywuDgTFtd3IRICH9465jCW1LNnH2ZQeZCDyKFKm7IRyUw+kzsb7Cq7fOfCwaeNS5EBA J+2HEkSssRmaHhhcPJ2mB9VQTRHV0MbOgFPlB+aasxRtxSMI9RY6zqDcSuEgmkzynH2l dG48s9MZcqb2KBGTH3n1w8Q4fW3O5pU3xeG+n6Vf5shp+5fs4ti2KMAkxJpdjRb+33Kg orYg== X-Gm-Message-State: AOAM5325WN8V9JQYq0LlUxMv6szZ8D8GdWNkriBznKXvTuyA2CDqqmE4 QW0mxr5M9HftmDybL3YMkAGH8FTsX98= X-Received: by 2002:a5d:40ca:0:b0:20a:cf97:f1b4 with SMTP id b10-20020a5d40ca000000b0020acf97f1b4mr7701471wrq.121.1651462608964; Sun, 01 May 2022 20:36:48 -0700 (PDT) Received: from localhost.localdomain ([49.51.162.193]) by smtp.gmail.com with ESMTPSA id h24-20020a05600c499800b003942a244ec8sm5150337wmp.13.2022.05.01.20.36.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 May 2022 20:36:48 -0700 (PDT) From: Jun Zhao To: ffmpeg-devel@ffmpeg.org Date: Mon, 2 May 2022 11:36:29 +0800 Message-Id: <20220502033630.70383-2-mypopydev@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220502033630.70383-1-mypopydev@gmail.com> References: <20220502033630.70383-1-mypopydev@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/3] lavc/cavsdec: Add profile check 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 Cc: Jun Zhao Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: NF0SblHC2q0g From: Jun Zhao Add profile check for cavs decoder, now cavs decoder only support JiZhun(0x20) profile Signed-off-by: Jun Zhao --- libavcodec/cavsdec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c index 7aaf3f2bcf..6c69c2c94e 100644 --- a/libavcodec/cavsdec.c +++ b/libavcodec/cavsdec.c @@ -1177,6 +1177,11 @@ static int decode_seq_header(AVSContext *h) int ret; h->profile = get_bits(&h->gb, 8); + if (h->profile != 0x20) { + avpriv_report_missing_feature(h->avctx, + "only supprt JiZhun profile"); + return AVERROR_PATCHWELCOME; + } h->level = get_bits(&h->gb, 8); skip_bits1(&h->gb); //progressive sequence