From patchwork Tue May 2 21:55:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 3553 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.3.129 with SMTP id 123csp2089503vsd; Tue, 2 May 2017 14:57:21 -0700 (PDT) X-Received: by 10.223.135.130 with SMTP id b2mr20224496wrb.48.1493762241155; Tue, 02 May 2017 14:57:21 -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 65si356588wmn.121.2017.05.02.14.57.20; Tue, 02 May 2017 14:57:21 -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 6AFCC689827; Wed, 3 May 2017 00:56:39 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt0-f195.google.com (mail-qt0-f195.google.com [209.85.216.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1A875689207 for ; Wed, 3 May 2017 00:56:32 +0300 (EEST) Received: by mail-qt0-f195.google.com with SMTP id o36so22261534qtb.2 for ; Tue, 02 May 2017 14:56:36 -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=FDieJYyqcan/zRko8xIFGqgCOskXKWmVku6MrWPSRXhiTMyL/h+Ihfdf1wPwO8bmed jFckYcBX/Pwyvc8epYQertFgR0byH1uay9uzOx5mzIv3Qoq+Nr40TE9G7eF1HmJQ/PjC ibghszTzZxOQLZrewj/ImJ1TCzYzcF8bXKe2QG6H17aaxlTrz760ldV86IRxWsY/GSId MLUQkvtVx/KShsYLgUNDfsTiDi/Xi0HIgEdrmFqMLT5DKRZhLVmr4VefEnM4EIttQlIE h9htQv3A4UMTeC9tunHBxOQGTzQPsMeWNH8z/hN2jgy4M1g7nmvmYyMekFvmIQPez1Rr eYRA== 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=BapqC5TunIyNEylV2EwynMr7sAs526lTlg8z+lfpJeUA/FpOOktFj7f8zIZFqOkUhu nZmh1r5SU142OPEhDdX7Rtedkkmj6lGc6lLZ511oMwLdSYt5eGnZJp3bjQeUB4S4J7hw AAmbgKZolK7J7HQyPfzLcBiv05G8ZCp17FuYqVmyfIyNdfmxeLUG1QZAemjoP75aH41s SYJ9VjHqVfiCzHHY1ITyR+a3XONx286mDr13wtsNGFjwBLam+fFQUpLhyZ11dpR+unXq RpAgN0gLgx16Bl31Uv1ineUE+bAuNswmkwj7s+CYQBgoeGqd0qkck7Jfr7FCg3c3k9ZZ cqAQ== X-Gm-Message-State: AN3rC/5w1BhgeKi6QJn3kVAGsXykPWev8tT2orTjV2DPPe6+y5Qui/sm ysbEo60QAQQ9b0Hz X-Received: by 10.237.44.166 with SMTP id g35mr28140913qtd.211.1493762194820; Tue, 02 May 2017 14:56:34 -0700 (PDT) Received: from localhost.localdomain ([181.231.62.139]) by smtp.gmail.com with ESMTPSA id t45sm14992046qtt.9.2017.05.02.14.56.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 May 2017 14:56:34 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Tue, 2 May 2017 18:55:25 -0300 Message-Id: <20170502215530.8672-5-jamrial@gmail.com> X-Mailer: git-send-email 2.12.1 In-Reply-To: <20170502215530.8672-1-jamrial@gmail.com> References: <20170502215530.8672-1-jamrial@gmail.com> Subject: [FFmpeg-devel] [PATCH v2 4/9] 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;