[FFmpeg-devel] [PATCH 2/2] Provided support for MPEG-5 EVC (Essential Video Coding) codec

Dawid Kozinski/Robot SDK (PLT) /SRPOL/Staff Engineer/삼성전자 d.kozinski at samsung.com
Mon Aug 8 15:46:11 EEST 2022


I just uploaded new patches that were made based on your requests and suggestions.

-----Original Message-----
From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of Michael Niedermayer
Sent: Monday, August 1, 2022 9:31 PM
To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 2/2] Provided support for MPEG-5 EVC (Essential Video Coding) codec

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
#######
DONE
#######

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



More information about the ffmpeg-devel mailing list