From: "Jan Ekström" <jeebjp@gmail.com> To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v2 3/3] avcodec/hevcdec: simplify decrementing of MDCV/CLL flags Date: Tue, 25 Jul 2023 22:29:11 +0300 Message-ID: <20230725192918.199526-4-jeebjp@gmail.com> (raw) In-Reply-To: <20230725192918.199526-1-jeebjp@gmail.com> Mostly done to be able to update the comment so that it no longer mentions the same flag twice. --- libavcodec/hevcdec.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index 1fe91238d4..15276edd33 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -2760,17 +2760,15 @@ static int set_side_data(HEVCContext *s) AVFrame *out = s->ref->frame; int ret; - // Decrement the mastering display flag when IRAP frame has no_rasl_output_flag=1 - // so the side data persists for the entire coded video sequence. - if (s->sei.common.mastering_display.present > 0 && - IS_IRAP(s) && s->no_rasl_output_flag) { - s->sei.common.mastering_display.present--; - } - // Decrement the mastering display flag when IRAP frame has no_rasl_output_flag=1 - // so the side data persists for the entire coded video sequence. - if (s->sei.common.content_light.present > 0 && - IS_IRAP(s) && s->no_rasl_output_flag) { - s->sei.common.content_light.present--; + // Decrement the mastering display and content light level flag when IRAP + // frame has no_rasl_output_flag=1 so the side data persists for the entire + // coded video sequence. + if (IS_IRAP(s) && s->no_rasl_output_flag) { + if (s->sei.common.mastering_display.present > 0) + s->sei.common.mastering_display.present--; + + if (s->sei.common.content_light.present > 0) + s->sei.common.content_light.present--; } ret = ff_h2645_sei_to_frame(out, &s->sei.common, AV_CODEC_ID_HEVC, NULL, -- 2.41.0 _______________________________________________ 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:[~2023-07-25 19:30 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-07-25 19:29 [FFmpeg-devel] [PATCH v2 0/3] avcodec: move HDR10 (MDCV/CLL) SEI handling to h2645_sei Jan Ekström 2023-07-25 19:29 ` [FFmpeg-devel] [PATCH v2 1/3] avcodec: move mastering display colour volume " Jan Ekström 2023-07-25 19:29 ` [FFmpeg-devel] [PATCH v2 2/3] avcodec: move content light level " Jan Ekström 2023-07-25 19:29 ` Jan Ekström [this message] 2023-07-26 21:37 ` [FFmpeg-devel] [PATCH v2 0/3] avcodec: move HDR10 (MDCV/CLL) " Jan Ekström 2023-07-27 19:22 ` Jan Ekström
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=20230725192918.199526-4-jeebjp@gmail.com \ --to=jeebjp@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