From patchwork Fri Jun 7 13:01:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 49653 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:c209:0:b0:460:55fa:d5ed with SMTP id d9csp1010362vqo; Fri, 7 Jun 2024 06:06:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU2do+5V1CF8VPc/+aEj3zGif8K4Rgdn10ZggFnWzZsIQ7Ahk22zEnxynaqIkzKYmJ03uPFu4qS8BhDaTs58101Lrz/ha+sRJknhg== X-Google-Smtp-Source: AGHT+IHp5h7f5kL19nBja09iuJJ84nQDU+J8QA6jPgxdk8OIffIU2qtKxi1bZw7dP6vYdwXcZMkR X-Received: by 2002:a17:906:e949:b0:a62:2eca:4f12 with SMTP id a640c23a62f3a-a6cdb203fc6mr165574266b.59.1717765603317; Fri, 07 Jun 2024 06:06:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717765603; cv=none; d=google.com; s=arc-20160816; b=m5qx6Wo2JerfM6ZimtqO6WRVLY8HULgvBV4OSKM6TqIzehBZMM9fkgmoeV0x9z1dS8 hmdzv5CudF6X3Q0MBX3MGwO4tWqIyFuViz4YVoexH3xLHPpKPaTcc8buq6OZLrkXEskC qpeAcY4qF9ogE4Hbp6QQ5I2LMxEXK1THTp7UTDGfLw9eAJC/GHR/W+pAFfT7Uf9SSdZJ C1xDNLlw6n462p78e9F+1UXOGkdVNwSphOVdWVsWMHyYdUwxA2bbSLvZ7HggZUz6Uv6i yBEwyp43Gx4jbWMWZ7RXBrxdbIIIBo1V6rEAzrjhSlTQDAyDMWGkcbe6KnB4/KeAqSaS gcEg== 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:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=pFsI+1EMH9BPDipBw9ICs7BEWnXBVGRHDn2Ms+mTyII=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=DHnza9sY2wv6hexnbFuHD8mqvfVAIxa6/uRszgH5PDXRLeUKS9zyEOm3/mVC6sFIdE Hqd4MiVx8vjv4ERH4oH1JpksptoDMRZmTeqh+hLIgYAjDu8ItJpyy6lxgDpoyPtWjhYy O9sXtiOvOwnObF/+7g1F+0aMOTnXWPiXyi2OxP1NuZzvHHlX+pPXG0F0GtRU3gOTYhPB mqCuVDbS5IKAojAvBK8/GruMdj4T2OM2sGKblJ9pjz0KQEVLrGuaZvJeiGdAqHNr/mOQ TD/NOPAJPfT/aYQdaJw927G33v1PWJDxKpjf5SKIhYMj7BYEvJ8CzbdUdh2Rp0VMITDO Hd9Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@khirnov.net header.s=mail header.b=GmDT7oEk; 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 a640c23a62f3a-a6e27975456si52985466b.232.2024.06.07.06.06.42; Fri, 07 Jun 2024 06:06:43 -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=@khirnov.net header.s=mail header.b=GmDT7oEk; 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 BB7D868D807; Fri, 7 Jun 2024 16:04:10 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8693D68D78D for ; Fri, 7 Jun 2024 16:03:50 +0300 (EEST) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=GmDT7oEk; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 330694DA7 for ; Fri, 7 Jun 2024 15:03:50 +0200 (CEST) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id ZsRUdjTeMvbG for ; Fri, 7 Jun 2024 15:03:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1717765422; bh=omURZJUN95BoyjKrC0b+G9dEXlPbwIaLFXQrEPBsUx8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GmDT7oEkEnx+Dtsf8guOd1+iDekVZN3gqIyOqBcR8sss2nOjnOIo4D7JAytDn3n+L TH0aQ+TQZN6j0bMuymFMO1thcglKtaiY8E9atJGJbK9W9VqstkmlSbzUaw2j6IjSAk IIdFrltd+jyy/vtoAJdxfz/IlJrrnfRDCTj3v/N27r8x13kBnlk+Xw9ZaCUlQz88LV 8Dl8Qba8cfRj76mZ+SdJIsFq7AtMXsNiVW1QRGeSeYQMMrJlZ+yLiywjYSgaiyCp7W 1yQv2kX8FyhCqPHeR/bSAk9PbvE45Xy2R+5dAt1hzUOQB32rxDp3xfx7mm55dMTdAl VKiO+ad7CpmUg== Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id 7CCBE4E07 for ; Fri, 7 Jun 2024 15:03:42 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id F1F483A25E9 for ; Fri, 07 Jun 2024 15:03:35 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 7 Jun 2024 15:01:31 +0200 Message-ID: <20240607130135.9088-35-anton@khirnov.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240607130135.9088-1-anton@khirnov.net> References: <20240607130135.9088-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 35/39] lavc/hevcdec: drop a redundant multiple-frame-per-packet 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: S6V3SqGSqoqD --- libavcodec/hevc/hevcdec.c | 4 ---- libavcodec/hevc/hevcdec.h | 1 - 2 files changed, 5 deletions(-) diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c index a241e25196..b9aea45edb 100644 --- a/libavcodec/hevc/hevcdec.c +++ b/libavcodec/hevc/hevcdec.c @@ -3143,7 +3143,6 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal) goto fail; } - s->overlap ++; ret = hevc_frame_start(s); if (ret < 0) return ret; @@ -3204,7 +3203,6 @@ static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length) s->cur_frame = s->collocated_ref = NULL; s->last_eos = s->eos; s->eos = 0; - s->overlap = 0; s->slice_initialized = 0; /* split the input packet into NAL units, so we know the upper bound on the @@ -3271,8 +3269,6 @@ static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length) continue; ret = decode_nal_unit(s, nal); - if (ret >= 0 && s->overlap > 2) - ret = AVERROR_INVALIDDATA; if (ret < 0) { av_log(s->avctx, AV_LOG_WARNING, "Error parsing NAL unit #%d.\n", i); diff --git a/libavcodec/hevc/hevcdec.h b/libavcodec/hevc/hevcdec.h index e47a7107c8..f0443b3ab9 100644 --- a/libavcodec/hevc/hevcdec.h +++ b/libavcodec/hevc/hevcdec.h @@ -487,7 +487,6 @@ typedef struct HEVCContext { int last_eos; ///< last packet contains an EOS/EOB NAL int bs_width; int bs_height; - int overlap; int is_decoded; // NoRaslOutputFlag associated with the last IRAP frame