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 5423040635 for ; Sat, 26 Feb 2022 12:18:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5617D68AEBF; Sat, 26 Feb 2022 14:18:32 +0200 (EET) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2FC4668AE57 for ; Sat, 26 Feb 2022 14:18:26 +0200 (EET) Received: by mail-pj1-f54.google.com with SMTP id m13-20020a17090aab0d00b001bbe267d4d1so9329597pjq.0 for ; Sat, 26 Feb 2022 04:18:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=7C4GoWov0prL0nqrW8jEhJ/xDPUPUiuBRJnHI3o6nTA=; b=HYFnJt6mdUyGkN1uJVOCWSi/Gw4h6SnJFl5EoA3ry3N5CUYomTmsqp4ZuK70yMFVca ydz54XiOFoQCEkqbL2fVAeqiE8iVj/lykkdhuslmX7suEZwOEyE/6Xzty/Ji2QvCA4sE WvBYZPYD3odxmvtEtZNDFsDDLR43mx5uHKP9y+HGQxfr9yAKD1XBxl3p76tDfj5/sDSP J8hZfSVVUsWB5SXZLyok5MDlIHIjNr4Vi8UYs6E1vy1/+PlUVQldHl8NAqALUDb6qhgg j3es1zwNFPDQZqZTTg8jLkG7ns3Omy2LKUUAB6oHPE8+TmqzXa2G431NJUvCimPo1HSr 8j4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to; bh=7C4GoWov0prL0nqrW8jEhJ/xDPUPUiuBRJnHI3o6nTA=; b=J6xsfI1MHjHyd3FB85a8wN0wwB7gxb7wxHfK5lw/3sTSL5QTgZlEd7WcAwC6rX1ZDZ ZaHFWKRunZtVix08J5t8qFpUpxR64x68PSpiWKKJOiycD+EYmvStUeltvSnQ0hbuS3UE rq2Tpeqh0OokEQTlKIhvAM2C2ijpUAlfWAtbxKb4oCKWalLYSnsiVLjrL1AuyoeBRruM DQS1FZh8BZqKwzJHNlW+suvRskXIw49faNjjm2sDuLK/5xmxJ1AngG+U3BI/9cCBAbBX omDRYKQkKgYrR2BN0RNw64OX9aO5aILTpzBFMAJSgEc6OfOpsJELZNs9Fi+o9Rnf8yeS cG/g== X-Gm-Message-State: AOAM530tfijSULMI1jXxI/AE5+KyawBJRdHOwH//SZi54JTXnmSIzEUC MHsXiE4qTGH6irnKcYiFLqmb5DHxZFs= X-Google-Smtp-Source: ABdhPJziWbXWRzVf4b1pjUYYzbu/yjA3MulKquaA+GjbPk4HP6lInIBMZtqG5iVgzpgvqQD74OfV5g== X-Received: by 2002:a17:903:32c8:b0:150:1189:c862 with SMTP id i8-20020a17090332c800b001501189c862mr11958671plr.134.1645877902614; Sat, 26 Feb 2022 04:18:22 -0800 (PST) Received: from gmail.com ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id q12-20020a17090aa00c00b001bc6f1baaaesm11753105pjp.39.2022.02.26.04.18.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 26 Feb 2022 04:18:22 -0800 (PST) Date: Sat, 26 Feb 2022 20:18:18 +0800 From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Message-ID: <20220226121818.GA25088@gmail.com> Mail-Followup-To: ffmpeg-devel@ffmpeg.org References: <20220226071804.GA16790@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] AVS3: add support for AVS3 High profile - same syntax as AVS3 Main profile 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Sat, Feb 26, 2022 at 07:48:24AM +0000, Paul Higgs wrote: > > > -----Original Message----- > > From: ffmpeg-devel On Behalf Of > > lance.lmwang@gmail.com > > Sent: 26 February 2022 07:18 > > To: ffmpeg-devel@ffmpeg.org > > Subject: Re: [FFmpeg-devel] [PATCH] AVS3: add support for AVS3 High profile > > - same syntax as AVS3 Main profile > > > > On Sat, Feb 26, 2022 at 05:50:39AM +0000, Paul Higgs wrote: > > > This patch adds high level syntax support for parsing AVS3 High profile > > bitstreams. > > > Latest AVS3 specification including High profile is available at > > > http://www.avs.org.cn/AVS3_download/en_index.asp > > > > > > Signed-off-by: Paul Higgs > > > --- > > > libavcodec/avs3.h | 2 ++ > > > libavcodec/avs3_parser.c | 8 ++++---- > > > libavformat/avs3dec.c | 2 +- > > > 3 files changed, 7 insertions(+), 5 deletions(-) > > > > > > diff --git a/libavcodec/avs3.h b/libavcodec/avs3.h index > > > 4189d9b583..c8caa58b0a 100644 > > > --- a/libavcodec/avs3.h > > > +++ b/libavcodec/avs3.h > > > @@ -35,6 +35,8 @@ > > > #define AVS3_FIRST_SLICE_START_CODE 0x00 > > > #define AVS3_PROFILE_BASELINE_MAIN 0x20 > > > #define AVS3_PROFILE_BASELINE_MAIN10 0x22 > > > +#define AVS3_PROFILE_BASELINE_HIGH 0x30 > > > +#define AVS3_PROFILE_BASELINE_HIGH10 0x32 > > > > > > #define AVS3_ISPIC(x) ((x) == AVS3_INTRA_PIC_START_CODE || (x) == > > > AVS3_INTER_PIC_START_CODE) #define AVS3_ISUNIT(x) ((x) == > > > AVS3_SEQ_START_CODE || AVS3_ISPIC(x)) diff --git > > > a/libavcodec/avs3_parser.c b/libavcodec/avs3_parser.c index > > > d04d96a03a..483b38fe76 100644 > > > --- a/libavcodec/avs3_parser.c > > > +++ b/libavcodec/avs3_parser.c > > > @@ -91,11 +91,11 @@ static void > > parse_avs3_nal_units(AVCodecParserContext *s, const uint8_t *buf, > > > // sampe_precision(3) > > > skip_bits(&gb, 47); > > > > > > - if (profile == AVS3_PROFILE_BASELINE_MAIN10) { > > > - int sample_precision = get_bits(&gb, 3); > > > - if (sample_precision == 1) { > > > + if (profile == AVS3_PROFILE_BASELINE_MAIN10 || profile == > > AVS3_PROFILE_BASELINE_HIGH10) { > > > + int encoding_precision = get_bits(&gb, 3); > > > + if (encoding_precision == 1) { > > > > Please keep sample_precision name, it's unrelated cosmetic change in this > > patch. > > > Changed this because the three bits read in get_bits(&gb,3) are for the encoding precision. sample_precision syntax element was > Skipped previously then I think it's better to fix this in another patch instead of mixed changed. > > > avctx->pix_fmt = AV_PIX_FMT_YUV420P; > > > - } else if (sample_precision == 2) { > > > + } else if (encoding_precision == 2) { > > > avctx->pix_fmt = AV_PIX_FMT_YUV420P10LE; > > > } else { > > > avctx->pix_fmt = AV_PIX_FMT_NONE; diff --git > > > a/libavformat/avs3dec.c b/libavformat/avs3dec.c index > > > 2395df171b..335b5409f5 100644 > > > --- a/libavformat/avs3dec.c > > > +++ b/libavformat/avs3dec.c > > > @@ -47,7 +47,7 @@ static int avs3video_probe(const AVProbeData *p) > > > } > > > if (state == AVS3_SEQ_START_CODE) { > > > seq++; > > > - if (*ptr != AVS3_PROFILE_BASELINE_MAIN && *ptr != > > AVS3_PROFILE_BASELINE_MAIN10) > > > + if (*ptr != AVS3_PROFILE_BASELINE_MAIN && *ptr != > > > + AVS3_PROFILE_BASELINE_MAIN10 && *ptr != > > AVS3_PROFILE_BASELINE_HIGH > > > + && *ptr != AVS3_PROFILE_BASELINE_HIGH10) > > > > The line is too long. > Ok, will wrap before 80 characters > > > > > return 0; > > > } else if (AVS3_ISPIC(state)) { > > > pic++; > > > -- > > > 2.30.0.windows.2 > > > > > > _______________________________________________ > > > 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". > > > > -- > > Thanks, > > Limin Wang > > _______________________________________________ > > 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". > _______________________________________________ > 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". -- Thanks, Limin Wang _______________________________________________ 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".