Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 2/2] Provided support for MPEG-5 EVC (Essential Video Coding) codec
Date: Mon, 1 Aug 2022 21:30:53 +0200
Message-ID: <20220801193053.GF2088045@pb2> (raw)
In-Reply-To: <002001d8a589$2272a170$6757e450$@samsung.com>


[-- Attachment #1.1: Type: text/plain, Size: 1730 bytes --]

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 = 0;
> +
> +    if(bits_size >= EVC_NAL_HEADER_SIZE) {
> +        unsigned char *p = (unsigned char *)bits;
> +        // forbidden_zero_bit
> +        if ((p[0] & 0x80) != 0) {
> +            av_log(NULL, AV_LOG_ERROR, "Cannot get bitstream information. Malformed bitstream.\n");
> +            return -1;
> +        }
> +
> +        // nal_unit_type
> +        unit_type_plus1 = (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 = 0;
> +
> +    if(bits_size >= EVC_NAL_UNIT_LENGTH_BYTE) {
> +
> +        int t = 0;
> +        unsigned char *p = (unsigned char *)bits;
> +
> +        for(int i=0; i<EVC_NAL_UNIT_LENGTH_BYTE; i++) {
> +            t = (t << 8) | p[i];
> +        }
> +
> +        nalu_len = t;
> +        if(nalu_len == 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

[...]
-- 
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 ..."

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
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".

  parent reply	other threads:[~2022-08-01 19:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220801092901eucas1p1f8d764e6269c88872566d616b74a6b99@eucas1p1.samsung.com>
2022-08-01  9:29 ` Dawid Kozinski
2022-08-01 14:04   ` James Almer
2022-08-03 13:13     ` Dawid Kozinski/Robot SDK (PLT) /SRPOL/Staff Engineer/삼성전자
2022-08-08 12:47     ` Dawid Kozinski/Robot SDK (PLT) /SRPOL/Staff Engineer/삼성전자
2022-08-01 19:30   ` Michael Niedermayer [this message]
2022-08-08 12:46     ` Dawid Kozinski/Robot SDK (PLT) /SRPOL/Staff Engineer/삼성전자
     [not found] <CGME20220808123046eucas1p29b765ce70a123ffc01f34fca460bfc7a@eucas1p2.samsung.com>
2022-08-08 12:30 ` Dawid Kozinski
     [not found] <CGME20220811123648eucas1p1336fd2c107be031a4a274057bf20084f@eucas1p1.samsung.com>
2022-08-11 12:36 ` Dawid Kozinski
2022-08-11 21:05   ` Michael Niedermayer
2022-08-12  6:57     ` Dawid Kozinski/Robot SDK (PLT) /SRPOL/Staff Engineer/삼성전자
2022-08-12  7:12     ` Dawid Kozinski/Robot SDK (PLT) /SRPOL/Staff Engineer/삼성전자
2022-08-12 15:49       ` Michael Niedermayer
2022-08-13  7:06         ` Dawid Kozinski/Robot SDK (PLT) /SRPOL/Staff Engineer/삼성전자
2022-08-13  7:10         ` Dawid Kozinski/Robot SDK (PLT) /SRPOL/Staff Engineer/삼성전자
2022-08-18  9:00         ` Dawid Kozinski/Robot SDK (PLT) /SRPOL/Staff Engineer/삼성전자
2022-08-12 10:24     ` Dawid Kozinski/Robot SDK (PLT) /SRPOL/Staff Engineer/삼성전자
     [not found] <CGME20220812101852eucas1p1b2e5b0614d34d75e7dd7d5c601d0a31c@eucas1p1.samsung.com>
2022-08-12 10:18 ` Dawid Kozinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220801193053.GF2088045@pb2 \
    --to=michael@niedermayer.cc \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git