Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] lavc/vvc: Correct sps_num_subpics_minus1 minimum
@ 2024-02-25 17:51 Frank Plowman
  2024-02-25 19:50 ` James Almer
  0 siblings, 1 reply; 4+ messages in thread
From: Frank Plowman @ 2024-02-25 17:51 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Frank Plowman

The spec says "the value of sps_num_subpics_minus1 shall be in the
range of 0 to MaxSlicesPerAu − 1, inclusive."

Signed-off-by: Frank Plowman <post@frankplowman.com>
---
 libavcodec/cbs_h266_syntax_template.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/cbs_h266_syntax_template.c b/libavcodec/cbs_h266_syntax_template.c
index 26ee7a420b..1d4d0c796f 100644
--- a/libavcodec/cbs_h266_syntax_template.c
+++ b/libavcodec/cbs_h266_syntax_template.c
@@ -1130,7 +1130,7 @@ static int FUNC(sps)(CodedBitstreamContext *ctx, RWContext *rw,
 
     flag(sps_subpic_info_present_flag);
     if (current->sps_subpic_info_present_flag) {
-        ue(sps_num_subpics_minus1, 1, VVC_MAX_SLICES - 1);
+        ue(sps_num_subpics_minus1, 0, VVC_MAX_SLICES - 1);
         if (current->sps_num_subpics_minus1 > 0) {
             flag(sps_independent_subpics_flag);
             flag(sps_subpic_same_size_flag);
-- 
2.43.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".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [FFmpeg-devel] [PATCH] lavc/vvc: Correct sps_num_subpics_minus1 minimum
  2024-02-25 17:51 [FFmpeg-devel] [PATCH] lavc/vvc: Correct sps_num_subpics_minus1 minimum Frank Plowman
@ 2024-02-25 19:50 ` James Almer
  2024-02-25 21:20   ` Frank Plowman
  0 siblings, 1 reply; 4+ messages in thread
From: James Almer @ 2024-02-25 19:50 UTC (permalink / raw)
  To: ffmpeg-devel

On 2/25/2024 2:51 PM, Frank Plowman wrote:
> The spec says "the value of sps_num_subpics_minus1 shall be in the
> range of 0 to MaxSlicesPerAu − 1, inclusive."
> 
> Signed-off-by: Frank Plowman <post@frankplowman.com>
> ---
>   libavcodec/cbs_h266_syntax_template.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/cbs_h266_syntax_template.c b/libavcodec/cbs_h266_syntax_template.c
> index 26ee7a420b..1d4d0c796f 100644
> --- a/libavcodec/cbs_h266_syntax_template.c
> +++ b/libavcodec/cbs_h266_syntax_template.c
> @@ -1130,7 +1130,7 @@ static int FUNC(sps)(CodedBitstreamContext *ctx, RWContext *rw,
>   
>       flag(sps_subpic_info_present_flag);
>       if (current->sps_subpic_info_present_flag) {
> -        ue(sps_num_subpics_minus1, 1, VVC_MAX_SLICES - 1);
> +        ue(sps_num_subpics_minus1, 0, VVC_MAX_SLICES - 1);

Strictly speaking, MaxSlicesPerAu varies depending on the stream's 
general_level_idc value, listed in table A.2 from Annex-A (in ITU-T 
H.266 V3).

Right now, VVC_MAX_SLICES is defined as 600 in vvc.h, but the max value 
in the spec is 1000, from level 6.3. I assume it was added in V3?

>           if (current->sps_num_subpics_minus1 > 0) {
>               flag(sps_independent_subpics_flag);
>               flag(sps_subpic_same_size_flag);
_______________________________________________
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".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [FFmpeg-devel] [PATCH] lavc/vvc: Correct sps_num_subpics_minus1 minimum
  2024-02-25 19:50 ` James Almer
@ 2024-02-25 21:20   ` Frank Plowman
  2024-02-27  6:08     ` Nuo Mi
  0 siblings, 1 reply; 4+ messages in thread
From: Frank Plowman @ 2024-02-25 21:20 UTC (permalink / raw)
  To: ffmpeg-devel

On 25/02/2024 19:50, James Almer wrote:
> On 2/25/2024 2:51 PM, Frank Plowman wrote:
>> The spec says "the value of sps_num_subpics_minus1 shall be in the
>> range of 0 to MaxSlicesPerAu − 1, inclusive."
>>
>> Signed-off-by: Frank Plowman <post@frankplowman.com>
>> ---
>>   libavcodec/cbs_h266_syntax_template.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavcodec/cbs_h266_syntax_template.c
>> b/libavcodec/cbs_h266_syntax_template.c
>> index 26ee7a420b..1d4d0c796f 100644
>> --- a/libavcodec/cbs_h266_syntax_template.c
>> +++ b/libavcodec/cbs_h266_syntax_template.c
>> @@ -1130,7 +1130,7 @@ static int FUNC(sps)(CodedBitstreamContext *ctx,
>> RWContext *rw,
>>         flag(sps_subpic_info_present_flag);
>>       if (current->sps_subpic_info_present_flag) {
>> -        ue(sps_num_subpics_minus1, 1, VVC_MAX_SLICES - 1);
>> +        ue(sps_num_subpics_minus1, 0, VVC_MAX_SLICES - 1);
> 
> Strictly speaking, MaxSlicesPerAu varies depending on the stream's
> general_level_idc value, listed in table A.2 from Annex-A (in ITU-T
> H.266 V3).
> 
> Right now, VVC_MAX_SLICES is defined as 600 in vvc.h, but the max value
> in the spec is 1000, from level 6.3. I assume it was added in V3?

Good catch.  It looks like level 6.3 has been in the spec since the
first version, but all the VVC_MAX_* definitions derived from Annex A
did not account for it.  Here is a patch which corrects this:
https://ffmpeg.org//pipermail/ffmpeg-devel/2024-February/322140.html

>>           if (current->sps_num_subpics_minus1 > 0) {
>>               flag(sps_independent_subpics_flag);
>>               flag(sps_subpic_same_size_flag);
_______________________________________________
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".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [FFmpeg-devel] [PATCH] lavc/vvc: Correct sps_num_subpics_minus1 minimum
  2024-02-25 21:20   ` Frank Plowman
@ 2024-02-27  6:08     ` Nuo Mi
  0 siblings, 0 replies; 4+ messages in thread
From: Nuo Mi @ 2024-02-27  6:08 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On Mon, Feb 26, 2024 at 5:20 AM Frank Plowman <post@frankplowman.com> wrote:

> On 25/02/2024 19:50, James Almer wrote:
> > On 2/25/2024 2:51 PM, Frank Plowman wrote:
> >> The spec says "the value of sps_num_subpics_minus1 shall be in the
> >> range of 0 to MaxSlicesPerAu − 1, inclusive."
> >>
> >> Signed-off-by: Frank Plowman <post@frankplowman.com>
> >> ---
> >>   libavcodec/cbs_h266_syntax_template.c | 2 +-
> >>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/libavcodec/cbs_h266_syntax_template.c
> >> b/libavcodec/cbs_h266_syntax_template.c
> >> index 26ee7a420b..1d4d0c796f 100644
> >> --- a/libavcodec/cbs_h266_syntax_template.c
> >> +++ b/libavcodec/cbs_h266_syntax_template.c
> >> @@ -1130,7 +1130,7 @@ static int FUNC(sps)(CodedBitstreamContext *ctx,
> >> RWContext *rw,
> >>         flag(sps_subpic_info_present_flag);
> >>       if (current->sps_subpic_info_present_flag) {
> >> -        ue(sps_num_subpics_minus1, 1, VVC_MAX_SLICES - 1);
> >> +        ue(sps_num_subpics_minus1, 0, VVC_MAX_SLICES - 1);
> >
> > Strictly speaking, MaxSlicesPerAu varies depending on the stream's
> > general_level_idc value, listed in table A.2 from Annex-A (in ITU-T
> > H.266 V3).
> >
> > Right now, VVC_MAX_SLICES is defined as 600 in vvc.h, but the max value
> > in the spec is 1000, from level 6.3. I assume it was added in V3?
>
> Good catch.  It looks like level 6.3 has been in the spec since the
> first version, but all the VVC_MAX_* definitions derived from Annex A
> did not account for it.  Here is a patch which corrects this:
> https://ffmpeg.org//pipermail/ffmpeg-devel/2024-February/322140.html

No, level 6.3 was not present in v1 (08/2020); it was added in v2 (04/2022).


>
> >>           if (current->sps_num_subpics_minus1 > 0) {
> >>               flag(sps_independent_subpics_flag);
> >>               flag(sps_subpic_same_size_flag);
> _______________________________________________
> 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".

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-27  6:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-25 17:51 [FFmpeg-devel] [PATCH] lavc/vvc: Correct sps_num_subpics_minus1 minimum Frank Plowman
2024-02-25 19:50 ` James Almer
2024-02-25 21:20   ` Frank Plowman
2024-02-27  6:08     ` Nuo Mi

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