Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] avformat/vvc: fix parsing sps_subpic_id
Date: Wed, 22 May 2024 10:00:30 -0300
Message-ID: <3beb7fbb-1d08-474d-bba4-e71252010230@gmail.com> (raw)
In-Reply-To: <20240519132554.3342-1-jamrial@gmail.com>

On 5/19/2024 10:25 AM, James Almer wrote:
> The length of the sps_subpic_id[i] syntax element is sps_subpic_id_len_minus1 + 1 bits.
> 
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>   libavformat/vvc.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/libavformat/vvc.c b/libavformat/vvc.c
> index 34c0aaf58b..ac3209a01b 100644
> --- a/libavformat/vvc.c
> +++ b/libavformat/vvc.c
> @@ -371,6 +371,7 @@ static int vvcc_parse_sps(GetBitContext *gb,
>           const int tmp_height_val  = AV_CEIL_RSHIFT(sps_pic_height_max_in_luma_samples, ctb_log2_size_y);
>           const int wlen            = av_ceil_log2(tmp_width_val);
>           const int hlen            = av_ceil_log2(tmp_height_val);
> +        unsigned int sps_subpic_id_len;
>           if (sps_num_subpics_minus1 > 0) {       // sps_num_subpics_minus1
>               sps_independent_subpics_flag = get_bits1(gb);
>               sps_subpic_same_size_flag = get_bits1(gb);
> @@ -390,11 +391,11 @@ static int vvcc_parse_sps(GetBitContext *gb,
>                   skip_bits(gb, 2);       // sps_subpic_treated_as_pic_flag && sps_loop_filter_across_subpic_enabled_flag
>               }
>           }
> -        get_ue_golomb_long(gb); // sps_subpic_id_len_minus1
> +        sps_subpic_id_len = get_ue_golomb_long(gb) + 1;
>           if (get_bits1(gb)) {    // sps_subpic_id_mapping_explicitly_signalled_flag
>               if (get_bits1(gb))  // sps_subpic_id_mapping_present_flag
>                   for (int i = 0; i <= sps_num_subpics_minus1; i++) {
> -                    skip_bits1(gb);     // sps_subpic_id[i]
> +                    skip_bits_long(gb, sps_subpic_id_len); // sps_subpic_id[i]
>                   }
>           }
>       }

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

      reply	other threads:[~2024-05-22 13:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-19 13:25 James Almer
2024-05-22 13:00 ` James Almer [this message]

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=3beb7fbb-1d08-474d-bba4-e71252010230@gmail.com \
    --to=jamrial@gmail.com \
    --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