From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id EB3C043849 for ; Mon, 1 Aug 2022 19:31:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 47F8A68B8F9; Mon, 1 Aug 2022 22:31:01 +0300 (EEST) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 55A5A68B6E2 for ; Mon, 1 Aug 2022 22:30:55 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 2A58340002 for ; Mon, 1 Aug 2022 19:30:53 +0000 (UTC) Date: Mon, 1 Aug 2022 21:30:53 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220801193053.GF2088045@pb2> References: <002001d8a589$2272a170$6757e450$@samsung.com> MIME-Version: 1.0 In-Reply-To: <002001d8a589$2272a170$6757e450$@samsung.com> Subject: Re: [FFmpeg-devel] [PATCH 2/2] Provided support for MPEG-5 EVC (Essential Video Coding) codec 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 Content-Type: multipart/mixed; boundary="===============5182366443846297937==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============5182366443846297937== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1+kiJ7gFzGEgD6MU" Content-Disposition: inline --1+kiJ7gFzGEgD6MU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 01, 2022 at 11:29:01AM +0200, Dawid Kozinski wrote: [...] > +static int get_nalu_type(const uint8_t *bits, int bits_size) > +{ > + int unit_type_plus1 =3D 0; > + > + if(bits_size >=3D EVC_NAL_HEADER_SIZE) { > + unsigned char *p =3D (unsigned char *)bits; > + // forbidden_zero_bit > + if ((p[0] & 0x80) !=3D 0) { > + av_log(NULL, AV_LOG_ERROR, "Cannot get bitstream information= =2E Malformed bitstream.\n"); > + return -1; > + } > + > + // nal_unit_type > + unit_type_plus1 =3D (p[0] >> 1) & 0x3F; > + } > + > + return unit_type_plus1 - 1; > +} > + > +static uint32_t read_nal_unit_length(const uint8_t *bits, int bits_size) > +{ > + uint32_t nalu_len =3D 0; > + > + if(bits_size >=3D EVC_NAL_UNIT_LENGTH_BYTE) { > + > + int t =3D 0; > + unsigned char *p =3D (unsigned char *)bits; > + > + for(int i=3D0; i + t =3D (t << 8) | p[i]; > + } > + > + nalu_len =3D t; > + if(nalu_len =3D=3D 0) { > + av_log(NULL, AV_LOG_ERROR, "Invalid bitstream size!\n"); These av_log() are a problem as they are in probing code probing code would be run on all kinds of input, most not EVC so "errors" are common while at the same time they are not real errors. That would make probing very noisy thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The real ebay dictionary, page 1 "Used only once" - "Some unspecified defect prevented a second use" "In good condition" - "Can be repaird by experienced expert" "As is" - "You wouldnt want it even if you were payed for it, if you knew .= =2E." --1+kiJ7gFzGEgD6MU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYugp6QAKCRBhHseHBAsP q24RAJ4kai9uhoygj9e4/32UqeNhtpjerQCeJREoQcxehn/0S3jClC6kfU/GRN0= =lV9H -----END PGP SIGNATURE----- --1+kiJ7gFzGEgD6MU-- --===============5182366443846297937== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --===============5182366443846297937==--