From patchwork Sun Apr 30 20:34:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 3524 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.3.129 with SMTP id 123csp1150575vsd; Sun, 30 Apr 2017 13:35:39 -0700 (PDT) X-Received: by 10.28.68.6 with SMTP id r6mr4815470wma.7.1493584539275; Sun, 30 Apr 2017 13:35:39 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id x8si6859050wmg.92.2017.04.30.13.35.38; Sun, 30 Apr 2017 13:35:39 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A018768997D; Sun, 30 Apr 2017 23:34:52 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk0-f193.google.com (mail-qk0-f193.google.com [209.85.220.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4EC746898F0 for ; Sun, 30 Apr 2017 23:34:45 +0300 (EEST) Received: by mail-qk0-f193.google.com with SMTP id u75so15410054qka.1 for ; Sun, 30 Apr 2017 13:34:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=le9VsrtGg4AFE90ziDeOTcBOmAwBCkq2O47T8cgsSZ4=; b=vRR24WLzDYzdMC/CrZn0EXbDUdqUH6h0ieyYOowqZGxt3mCdIUHiv/YBydaqioqt08 +5uoCNm0HVO3h27jg1lRo5dz1SHgWly3fhjaqj1OqSBBMRhg/GH0K+3vbj0q12D1LUk9 bQpzYPFzWbv7DAwZPWk+2+1fRXp8sCATD7IE88+4WRM7ppnWq9eodR/S8+z3ZhTK+ZV5 mC/loCaQsqoVn7g0ZRUMq2coB0pfI72JK1weACWT1OpM2DrTCr1J6BQDRfXRBimknimq SOSaEwgabOa+HTxZssJ+7GeQyhXAPi3dMwsz2Wmu7R2mIEF1SffBUeU6oZVkGFeOCgR7 2W+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=le9VsrtGg4AFE90ziDeOTcBOmAwBCkq2O47T8cgsSZ4=; b=a0hPgYKLx2hV2TMieD5ONfNJoLkKql1cvaHzrrzzRjPEfyvJETASCASHuWyFbxxlns m2HvHX4Zva4Ql1kvz/xJcNOA49v4a9PnSOAob4LjKVUUgqmYMVQDELkoZxcUKRx9UJ9R cnvPQ7wHht4omjCNd4mbynirYMJuFJtleiTJBDblFrC3KPLn1azaRY7h9rb3DZ2t6hDl lUSjqizw408xk1EFyCqiuubr2SGjZ6eYoWFHjK06wmX0kqs6TqZR42OPwshy8IRhxnk5 8NxXnQcUcPcmy9inC8lFUTal78YZogkDZTHcPGn9BO/D2DDPXF651+qlmhhAH9UesctY FQuQ== X-Gm-Message-State: AN3rC/7JGTlRzFpwQIeSVpT1NnF8FQxCsfnhd8Z6K/Dob4RhS2HiZJdM TlfW5Jav1D47Kz+j X-Received: by 10.55.214.7 with SMTP id t7mr8544489qki.170.1493584487533; Sun, 30 Apr 2017 13:34:47 -0700 (PDT) Received: from localhost.localdomain ([181.231.62.139]) by smtp.gmail.com with ESMTPSA id 24sm9147592qtx.8.2017.04.30.13.34.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 30 Apr 2017 13:34:47 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sun, 30 Apr 2017 17:34:08 -0300 Message-Id: <20170430203410.7128-6-jamrial@gmail.com> X-Mailer: git-send-email 2.12.1 In-Reply-To: <20170430203410.7128-1-jamrial@gmail.com> References: <20170430203410.7128-1-jamrial@gmail.com> Subject: [FFmpeg-devel] [PATCH 5/7] hevcdec: move SliceHeader struct definition to hevc_ps X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: James Almer --- libavcodec/hevc_ps.h | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++ libavcodec/hevcdec.h | 83 ---------------------------------------------------- 2 files changed, 83 insertions(+), 83 deletions(-) diff --git a/libavcodec/hevc_ps.h b/libavcodec/hevc_ps.h index 45ef9daf1f..016f0075d4 100644 --- a/libavcodec/hevc_ps.h +++ b/libavcodec/hevc_ps.h @@ -39,6 +39,89 @@ typedef struct ShortTermRPS { uint8_t used[32]; } ShortTermRPS; +typedef struct LongTermRPS { + int poc[32]; + uint8_t used[32]; + uint8_t nb_refs; +} LongTermRPS; + +typedef struct SliceHeader { + unsigned int pps_id; + + ///< address (in raster order) of the first block in the current slice segment + unsigned int slice_segment_addr; + ///< address (in raster order) of the first block in the current slice + unsigned int slice_addr; + + enum HEVCSliceType slice_type; + + int pic_order_cnt_lsb; + + uint8_t first_slice_in_pic_flag; + uint8_t dependent_slice_segment_flag; + uint8_t pic_output_flag; + uint8_t colour_plane_id; + + ///< RPS coded in the slice header itself is stored here + int short_term_ref_pic_set_sps_flag; + int short_term_ref_pic_set_size; + ShortTermRPS slice_rps; + const ShortTermRPS *short_term_rps; + int long_term_ref_pic_set_size; + LongTermRPS long_term_rps; + unsigned int list_entry_lx[2][32]; + + uint8_t rpl_modification_flag[2]; + uint8_t no_output_of_prior_pics_flag; + uint8_t slice_temporal_mvp_enabled_flag; + + unsigned int nb_refs[2]; + + uint8_t slice_sample_adaptive_offset_flag[3]; + uint8_t mvd_l1_zero_flag; + + uint8_t cabac_init_flag; + uint8_t disable_deblocking_filter_flag; ///< slice_header_disable_deblocking_filter_flag + uint8_t slice_loop_filter_across_slices_enabled_flag; + uint8_t collocated_list; + + unsigned int collocated_ref_idx; + + int slice_qp_delta; + int slice_cb_qp_offset; + int slice_cr_qp_offset; + + uint8_t cu_chroma_qp_offset_enabled_flag; + + int beta_offset; ///< beta_offset_div2 * 2 + int tc_offset; ///< tc_offset_div2 * 2 + + unsigned int max_num_merge_cand; ///< 5 - 5_minus_max_num_merge_cand + + unsigned *entry_point_offset; + int * offset; + int * size; + int num_entry_point_offsets; + + int8_t slice_qp; + + uint8_t luma_log2_weight_denom; + int16_t chroma_log2_weight_denom; + + int16_t luma_weight_l0[16]; + int16_t chroma_weight_l0[16][2]; + int16_t chroma_weight_l1[16][2]; + int16_t luma_weight_l1[16]; + + int16_t luma_offset_l0[16]; + int16_t chroma_offset_l0[16][2]; + + int16_t luma_offset_l1[16]; + int16_t chroma_offset_l1[16][2]; + + int slice_ctb_addr_rs; +} SliceHeader; + typedef struct HEVCWindow { unsigned int left_offset; unsigned int right_offset; diff --git a/libavcodec/hevcdec.h b/libavcodec/hevcdec.h index d8494ee6b1..d5d6bbcdb6 100644 --- a/libavcodec/hevcdec.h +++ b/libavcodec/hevcdec.h @@ -227,12 +227,6 @@ enum ScanType { SCAN_VERT, }; -typedef struct LongTermRPS { - int poc[32]; - uint8_t used[32]; - uint8_t nb_refs; -} LongTermRPS; - typedef struct RefPicList { struct HEVCFrame *ref[HEVC_MAX_REFS]; int list[HEVC_MAX_REFS]; @@ -244,83 +238,6 @@ typedef struct RefPicListTab { RefPicList refPicList[2]; } RefPicListTab; -typedef struct SliceHeader { - unsigned int pps_id; - - ///< address (in raster order) of the first block in the current slice segment - unsigned int slice_segment_addr; - ///< address (in raster order) of the first block in the current slice - unsigned int slice_addr; - - enum HEVCSliceType slice_type; - - int pic_order_cnt_lsb; - - uint8_t first_slice_in_pic_flag; - uint8_t dependent_slice_segment_flag; - uint8_t pic_output_flag; - uint8_t colour_plane_id; - - ///< RPS coded in the slice header itself is stored here - int short_term_ref_pic_set_sps_flag; - int short_term_ref_pic_set_size; - ShortTermRPS slice_rps; - const ShortTermRPS *short_term_rps; - int long_term_ref_pic_set_size; - LongTermRPS long_term_rps; - unsigned int list_entry_lx[2][32]; - - uint8_t rpl_modification_flag[2]; - uint8_t no_output_of_prior_pics_flag; - uint8_t slice_temporal_mvp_enabled_flag; - - unsigned int nb_refs[2]; - - uint8_t slice_sample_adaptive_offset_flag[3]; - uint8_t mvd_l1_zero_flag; - - uint8_t cabac_init_flag; - uint8_t disable_deblocking_filter_flag; ///< slice_header_disable_deblocking_filter_flag - uint8_t slice_loop_filter_across_slices_enabled_flag; - uint8_t collocated_list; - - unsigned int collocated_ref_idx; - - int slice_qp_delta; - int slice_cb_qp_offset; - int slice_cr_qp_offset; - - uint8_t cu_chroma_qp_offset_enabled_flag; - - int beta_offset; ///< beta_offset_div2 * 2 - int tc_offset; ///< tc_offset_div2 * 2 - - unsigned int max_num_merge_cand; ///< 5 - 5_minus_max_num_merge_cand - - unsigned *entry_point_offset; - int * offset; - int * size; - int num_entry_point_offsets; - - int8_t slice_qp; - - uint8_t luma_log2_weight_denom; - int16_t chroma_log2_weight_denom; - - int16_t luma_weight_l0[16]; - int16_t chroma_weight_l0[16][2]; - int16_t chroma_weight_l1[16][2]; - int16_t luma_weight_l1[16]; - - int16_t luma_offset_l0[16]; - int16_t chroma_offset_l0[16][2]; - - int16_t luma_offset_l1[16]; - int16_t chroma_offset_l1[16][2]; - - int slice_ctb_addr_rs; -} SliceHeader; - typedef struct CodingUnit { int x; int y;