From: fei.w.wang-at-intel.com@ffmpeg.org To: ffmpeg-devel@ffmpeg.org Cc: fei.w.wang@intel.com Subject: [FFmpeg-devel] [PATCH v1 4/7] lavc/cbs_h266: Add NumSlicesInTile to H266RawPPS Date: Thu, 28 Mar 2024 09:26:28 +0800 Message-ID: <20240328012631.777476-4-fei.w.wang@intel.com> (raw) In-Reply-To: <20240328012631.777476-1-fei.w.wang@intel.com> From: Fei Wang <fei.w.wang@intel.com> Signed-off-by: Fei Wang <fei.w.wang@intel.com> --- libavcodec/cbs_h266.h | 1 + libavcodec/cbs_h266_syntax_template.c | 16 ++++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/libavcodec/cbs_h266.h b/libavcodec/cbs_h266.h index 19f83aeb49..87bd39c6f5 100644 --- a/libavcodec/cbs_h266.h +++ b/libavcodec/cbs_h266.h @@ -594,6 +594,7 @@ typedef struct H266RawPPS { uint16_t col_width_val[VVC_MAX_TILE_COLUMNS]; uint16_t row_height_val[VVC_MAX_TILE_ROWS]; uint16_t slice_top_left_tile_idx[VVC_MAX_SLICES]; + uint16_t num_slices_in_tile[VVC_MAX_SLICES]; } H266RawPPS; typedef struct H266RawAPS { diff --git a/libavcodec/cbs_h266_syntax_template.c b/libavcodec/cbs_h266_syntax_template.c index 12f821b3fd..3f378d199e 100644 --- a/libavcodec/cbs_h266_syntax_template.c +++ b/libavcodec/cbs_h266_syntax_template.c @@ -1976,14 +1976,13 @@ static int FUNC(pps) (CodedBitstreamContext *ctx, RWContext *rw, if (current->pps_slice_width_in_tiles_minus1[i] == 0 && current->pps_slice_height_in_tiles_minus1[i] == 0 && current->row_height_val[tile_y] > 1) { - int num_slices_in_tile, - uniform_slice_height, remaining_height_in_ctbs_y; + int uniform_slice_height, remaining_height_in_ctbs_y; remaining_height_in_ctbs_y = current->row_height_val[tile_y]; ues(pps_num_exp_slices_in_tile[i], 0, current->row_height_val[tile_y] - 1, 1, i); if (current->pps_num_exp_slices_in_tile[i] == 0) { - num_slices_in_tile = 1; + current->num_slices_in_tile[i] = 1; current->slice_height_in_ctus[i] = current->row_height_val[tile_y]; slice_top_left_ctu_x[i] = ctu_x; slice_top_left_ctu_y[i] = ctu_y; @@ -2026,14 +2025,18 @@ static int FUNC(pps) (CodedBitstreamContext *ctx, RWContext *rw, slice_top_left_ctu_y[i + j] = ctu_y; j++; } - num_slices_in_tile = j; + current->num_slices_in_tile[i] = j; } - for (int k = 0; k < num_slices_in_tile; k++) + for (int k = 0; k < current->num_slices_in_tile[i]; k++) current->slice_top_left_tile_idx[i + k] = tile_idx; - i += num_slices_in_tile - 1; + i += current->num_slices_in_tile[i] - 1; } else { uint16_t height = 0; infer(pps_num_exp_slices_in_tile[i], 0); + if (current->pps_slice_width_in_tiles_minus1[i] == 0 && + current->pps_slice_height_in_tiles_minus1[i] == 0) + current->num_slices_in_tile[i] = 1; + for (j = 0; j <= current->pps_slice_height_in_tiles_minus1[i]; j++) { @@ -2074,6 +2077,7 @@ static int FUNC(pps) (CodedBitstreamContext *ctx, RWContext *rw, uint16_t height = 0; current->slice_top_left_tile_idx[i] = tile_idx; + current->num_slices_in_tile[i] = 1; tile_x = tile_idx % current->num_tile_columns; tile_y = tile_idx / current->num_tile_columns; if (tile_y >= current->num_tile_rows) -- 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:[~2024-03-28 1:26 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-28 1:26 [FFmpeg-devel] [PATCH v1 1/7] lavc/vaapi_dec: Create VA parameters dynamically fei.w.wang-at-intel.com 2024-03-28 1:26 ` [FFmpeg-devel] [PATCH v1 2/7] lavc/vvc_refs: Move definition of VVC_FRAME_FLAG* to h header fei.w.wang-at-intel.com 2024-03-28 1:26 ` [FFmpeg-devel] [PATCH v1 3/7] lavc/cbs_h266: Add SliceTopLeftTileIdx to H266RawPPS fei.w.wang-at-intel.com 2024-03-28 1:26 ` fei.w.wang-at-intel.com [this message] 2024-03-28 1:26 ` [FFmpeg-devel] [PATCH v1 5/7] lavc/vvc_ps: Add alf raw syntax into VVCALF fei.w.wang-at-intel.com 2024-03-28 1:26 ` [FFmpeg-devel] [PATCH v1 6/7] lavc/vvc_dec: Add hardware decode API fei.w.wang-at-intel.com 2024-03-28 2:04 ` Andreas Rheinhardt 2024-04-02 6:24 ` Wang, Fei W 2024-03-28 1:26 ` [FFmpeg-devel] [PATCH v1 7/7] lavc/vaapi_dec: Add VVC decoder fei.w.wang-at-intel.com 2024-04-02 12:48 ` Nuo Mi 2024-04-03 3:31 ` Wang, Fei W 2024-04-06 5:03 ` Nuo Mi 2024-04-01 19:52 ` [FFmpeg-devel] [PATCH v1 1/7] lavc/vaapi_dec: Create VA parameters dynamically Mark Thompson 2024-04-02 6:16 ` Wang, Fei W
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=20240328012631.777476-4-fei.w.wang@intel.com \ --to=fei.w.wang-at-intel.com@ffmpeg.org \ --cc=fei.w.wang@intel.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