From: Anton Khirnov <anton@khirnov.net> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH 2/5] avcodec/hevc/hevcdec: Do not allow changes to parameter sets between slices Date: Wed, 26 Jun 2024 08:36:46 +0200 Message-ID: <171938380610.21847.18409539697484039620@lain.khirnov.net> (raw) In-Reply-To: <20240625232736.GO4991@pb2> Quoting Michael Niedermayer (2024-06-26 01:27:36) > The specification explcitly doesnt allow the active *PS to change > > "Any PPS NAL unit containing the value of pps_pic_parameter_set_id for the active PPS RBSP for a coded picture (and > consequently for the layer containing the coded picture) shall have the same content as that of the active PPS RBSP for the > coded picture, unless it follows the last VCL NAL unit of the coded picture and precedes the first VCL NAL unit of another > coded picture." > > "Any SPS NAL unit with nuh_layer_id equal to 0 containing the value of sps_seq_parameter_set_id for the active SPS > RBSP for the base layer for a CVS shall have the same content as that of the active SPS RBSP for the base layer for the > CVS, unless it follows the last access unit of the CVS and precedes the first VCL NAL unit and the first SEI NAL unit > containing an active parameter sets SEI message (when present) of another CVS." > > "Any SPS NAL unit with any nuh_layer_id value containing the value of sps_seq_parameter_set_id for the active SPS > RBSP for a particular layer shall have the same content as that of the active SPS RBSP for the particular layer unless it > follows the access unit auA containing the last coded picture for which the active SPS RBSP for the particular layer is > required to be active for the particular layer and precedes the first NAL unit succeeding auA in decoding order that activates > an SPS RBSP with the same value of seq_parameter_set_id." I have no idea why you're quoting the spec at me, I know perfectly well the PPS cannot change between slices. My point is this: if the current check for PPS change does not detect it, it should be fixed. Specifically, it should compare actual PPS objects rather than pps_id. > So if anything fancy is wanted, the way to go is not to parse it in the first place. > Because if it matches then the parsing was a waste of time. If it mismatches, that > would be invalid and would just lead to failure anyway > > But really the primary goal is to fix the out of array access and be easy to > backport. I am not trying to fix this in a fancy way. > The simpler and more robust the fix is the better. This "simple and robust" approach of sprinkling random checks all over the place leads to unreadable and unmaintainable code. -- Anton Khirnov _______________________________________________ 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".
next prev parent reply other threads:[~2024-06-26 6:36 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-06-23 23:01 [FFmpeg-devel] [PATCH 1/5] avcodec/aac/aacdec_usac: Test ac in usac Michael Niedermayer 2024-06-23 23:01 ` [FFmpeg-devel] [PATCH 2/5] avcodec/hevc/hevcdec: Do not allow changes to parameter sets between slices Michael Niedermayer 2024-06-25 8:59 ` Anton Khirnov 2024-06-25 23:27 ` Michael Niedermayer 2024-06-26 6:36 ` Anton Khirnov [this message] 2024-06-23 23:01 ` [FFmpeg-devel] [PATCH 3/5] avcodec/hevc/hevcdec: SPS not set (or cleared) after frame start Michael Niedermayer 2024-06-25 9:00 ` Anton Khirnov 2024-06-25 23:52 ` Michael Niedermayer 2024-06-26 6:38 ` Anton Khirnov 2024-06-26 23:05 ` Michael Niedermayer 2024-06-23 23:01 ` [FFmpeg-devel] [PATCH 4/5] avcodec/hevc/hevcdec: Do not allow slices to depend on failed slices Michael Niedermayer 2024-06-25 9:04 ` Anton Khirnov 2024-06-23 23:01 ` [FFmpeg-devel] [PATCH 5/5] avformat/iamf: Check substreams in ff_iamf_free_audio_element() Michael Niedermayer 2024-07-15 14:25 ` Michael Niedermayer 2024-07-15 15:16 ` James Almer 2024-06-25 23:35 ` [FFmpeg-devel] [PATCH 1/5] avcodec/aac/aacdec_usac: Test ac in usac Lynne via ffmpeg-devel 2024-06-25 23:57 ` Michael Niedermayer 2024-06-26 6:58 ` Lynne via ffmpeg-devel 2024-06-26 18:57 ` Michael Niedermayer 2024-06-26 19:45 ` Andreas Rheinhardt 2024-06-26 22:46 ` Lynne via ffmpeg-devel
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=171938380610.21847.18409539697484039620@lain.khirnov.net \ --to=anton@khirnov.net \ --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