From: Nuo Mi <nuomi2021@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Nuo Mi <nuomi2021@gmail.com>
Subject: [FFmpeg-devel] [PATCH v2 2/8] cbs_h266: fix inference for sh_alf_enabled_flag
Date: Tue, 8 Aug 2023 18:58:57 +0800
Message-ID: <TYSPR06MB643360B0A24C32998459173BAA0DA@TYSPR06MB6433.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <20230808105903.6667-1-nuomi2021@gmail.com>
if pps_alf_info_in_ph_flag is true
sh_alf_enabled_flag infered from ph
Failed clip:
LTRP_A_ERICSSON_3.bit
---
libavcodec/cbs_h266_syntax_template.c | 81 ++++++++++++++++-----------
1 file changed, 47 insertions(+), 34 deletions(-)
diff --git a/libavcodec/cbs_h266_syntax_template.c b/libavcodec/cbs_h266_syntax_template.c
index 857882655b..801feedb4a 100644
--- a/libavcodec/cbs_h266_syntax_template.c
+++ b/libavcodec/cbs_h266_syntax_template.c
@@ -3111,44 +3111,57 @@ static int FUNC(slice_header) (CodedBitstreamContext *ctx, RWContext *rw,
if (nal_unit_type == VVC_IDR_W_RADL || nal_unit_type == VVC_IDR_N_LP ||
nal_unit_type == VVC_CRA_NUT || nal_unit_type == VVC_GDR_NUT)
flag(sh_no_output_of_prior_pics_flag);
- if (sps->sps_alf_enabled_flag && !pps->pps_alf_info_in_ph_flag) {
- flag(sh_alf_enabled_flag);
- if (current->sh_alf_enabled_flag) {
- ub(3, sh_num_alf_aps_ids_luma);
- for (i = 0; i < current->sh_num_alf_aps_ids_luma; i++)
- ubs(3, sh_alf_aps_id_luma[i], 1, i);
- if (sps->sps_chroma_format_idc != 0) {
- flag(sh_alf_cb_enabled_flag);
- flag(sh_alf_cr_enabled_flag);
- } else {
+
+ if (sps->sps_alf_enabled_flag) {
+ if (!pps->pps_alf_info_in_ph_flag) {
+ flag(sh_alf_enabled_flag);
+ if (current->sh_alf_enabled_flag) {
+ ub(3, sh_num_alf_aps_ids_luma);
+ for (i = 0; i < current->sh_num_alf_aps_ids_luma; i++)
+ ubs(3, sh_alf_aps_id_luma[i], 1, i);
+
+ if (sps->sps_chroma_format_idc != 0) {
+ flag(sh_alf_cb_enabled_flag);
+ flag(sh_alf_cr_enabled_flag);
+ }
+ if (current->sh_alf_cb_enabled_flag ||
+ current->sh_alf_cr_enabled_flag) {
+ ub(3, sh_alf_aps_id_chroma);
+ }
+
+ if (sps->sps_ccalf_enabled_flag) {
+ flag(sh_alf_cc_cb_enabled_flag);
+ if (current->sh_alf_cc_cb_enabled_flag)
+ ub(3, sh_alf_cc_cb_aps_id);
+
+ flag(sh_alf_cc_cr_enabled_flag);
+ if (current->sh_alf_cc_cr_enabled_flag)
+ ub(3, sh_alf_cc_cr_aps_id);
+ }
+ }
+ } else {
+ infer(sh_alf_enabled_flag, ph->ph_alf_enabled_flag);
+ if (current->sh_alf_enabled_flag) {
+ infer(sh_num_alf_aps_ids_luma, ph->ph_num_alf_aps_ids_luma);
+ for (i = 0; i < current->sh_num_alf_aps_ids_luma; i++)
+ infer(sh_alf_aps_id_luma[i], ph->ph_alf_aps_id_luma[i]);
+
infer(sh_alf_cb_enabled_flag, ph->ph_alf_cb_enabled_flag);
infer(sh_alf_cr_enabled_flag, ph->ph_alf_cr_enabled_flag);
- }
- if (current->sh_alf_cb_enabled_flag ||
- current->sh_alf_cr_enabled_flag)
- ub(3, sh_alf_aps_id_chroma);
- else
- infer(sh_alf_aps_id_chroma, ph->ph_alf_aps_id_chroma);
- if (sps->sps_ccalf_enabled_flag) {
- flag(sh_alf_cc_cb_enabled_flag);
- if (current->sh_alf_cc_cb_enabled_flag)
- ub(3, sh_alf_cc_cb_aps_id);
- else
- infer(sh_alf_cc_cb_aps_id, ph->ph_alf_cc_cb_aps_id);
- flag(sh_alf_cc_cr_enabled_flag);
- if (current->sh_alf_cc_cr_enabled_flag)
- ub(3, sh_alf_cc_cr_aps_id);
- else
- infer(sh_alf_cc_cr_aps_id, ph->ph_alf_cc_cr_aps_id);
- } else {
- infer(sh_alf_cc_cb_enabled_flag, ph->ph_alf_cc_cb_enabled_flag);
- infer(sh_alf_cc_cr_enabled_flag, ph->ph_alf_cc_cr_enabled_flag);
- infer(sh_alf_cc_cb_aps_id, ph->ph_alf_cc_cb_aps_id);
- infer(sh_alf_cc_cr_aps_id, ph->ph_alf_cc_cr_aps_id);
+ if (current->sh_alf_cb_enabled_flag ||current->sh_alf_cr_enabled_flag)
+ infer(sh_alf_aps_id_chroma, ph->ph_alf_aps_id_chroma);
+
+ if (sps->sps_ccalf_enabled_flag) {
+ infer(sh_alf_cc_cb_enabled_flag, ph->ph_alf_cc_cb_enabled_flag);
+ if (current->sh_alf_cc_cb_enabled_flag)
+ infer(sh_alf_cc_cb_aps_id, ph->ph_alf_cc_cb_aps_id);
+
+ infer(sh_alf_cc_cr_enabled_flag, ph->ph_alf_cc_cr_enabled_flag);
+ if (current->sh_alf_cc_cr_enabled_flag)
+ infer(sh_alf_cc_cr_aps_id, ph->ph_alf_cc_cr_aps_id);
+ }
}
}
- } else {
- infer(sh_alf_enabled_flag, 0);
}
if (current->sh_picture_header_in_slice_header_flag) {
--
2.25.1
_______________________________________________
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-08-08 10:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 14:55 [FFmpeg-devel] [PATCH 1/8] cbs_h266: fix inference for sh_lmcs_used_flag and sh_explicit_scaling_list_used_flag Nuo Mi
2023-08-07 15:17 ` James Almer
2023-08-07 15:47 ` Nuo Mi
2023-08-08 10:58 ` [FFmpeg-devel] [PATCH v2 " Nuo Mi
2023-08-17 13:38 ` James Almer
[not found] ` <20230808105903.6667-1-nuomi2021@gmail.com>
2023-08-08 10:58 ` Nuo Mi [this message]
2023-08-08 10:58 ` [FFmpeg-devel] [PATCH v2 3/8] cbs_h266: fix inference for xh_deblocking_filter_disabled_flag Nuo Mi
2023-08-08 10:58 ` [FFmpeg-devel] [PATCH v2 4/8] cbs_h266: fix slice_height_in_ctus for single slice tile Nuo Mi
2023-08-08 10:59 ` [FFmpeg-devel] [PATCH v2 5/8] cbs_h266: H266RawSliceHeader, expose NumEntryPoints Nuo Mi
2023-08-08 10:59 ` [FFmpeg-devel] [PATCH v2 6/8] cbs_h266: H266RawPredWeightTable, expose num_weights_l0 and num_weights_l1 Nuo Mi
2023-08-08 10:59 ` [FFmpeg-devel] [PATCH v2 7/8] cbs_h266: H266RawSliceHeader, expose NumRefIdxActive[] Nuo Mi
2023-08-08 10:59 ` [FFmpeg-devel] [PATCH v2 8/8] cbs_h266: slice_header, fix inference for pred_weight_table Nuo Mi
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=TYSPR06MB643360B0A24C32998459173BAA0DA@TYSPR06MB6433.apcprd06.prod.outlook.com \
--to=nuomi2021@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