LCOV - code coverage report
Current view: top level - Codec - EbPictureOperators.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 4 8 50.0 %
Date: 2019-11-25 17:38:06 Functions: 1 2 50.0 %

          Line data    Source code
       1             : /*
       2             : * Copyright(c) 2019 Intel Corporation
       3             : * SPDX - License - Identifier: BSD - 2 - Clause - Patent
       4             : */
       5             : 
       6             : #ifndef EbPictureOperators_h
       7             : #define EbPictureOperators_h
       8             : 
       9             : #include "EbPictureOperators_C.h"
      10             : #include "EbPictureOperators_SSE2.h"
      11             : #include "EbPictureOperators_SSE4_1.h"
      12             : #include "EbPictureOperators_AVX2.h"
      13             : #include "EbPictureOperators_AVX512.h"
      14             : #include "EbHmCode.h"
      15             : #include "EbDefinitions.h"
      16             : #include "EbPictureBufferDesc.h"
      17             : #include "EbSequenceControlSet.h"
      18             : #ifdef __cplusplus
      19             : extern "C" {
      20             : #endif
      21             : 
      22             :     extern EbErrorType picture_full_distortion32_bits(
      23             :         EbPictureBufferDesc  *coeff,
      24             :         uint32_t                coeff_luma_origin_index,
      25             :         uint32_t                coeff_chroma_origin_index,
      26             :         EbPictureBufferDesc  *recon_coeff,
      27             :         uint32_t                recon_coeff_luma_origin_index,
      28             :         uint32_t                recon_coeff_chroma_origin_index,
      29             :         uint32_t                bwidth,
      30             :         uint32_t                bheight,
      31             :         uint32_t                bwidth_uv,
      32             :         uint32_t                bheight_uv,
      33             :         uint64_t                y_distortion[DIST_CALC_TOTAL],
      34             :         uint64_t                cb_distortion[DIST_CALC_TOTAL],
      35             :         uint64_t                cr_distortion[DIST_CALC_TOTAL],
      36             :         uint32_t                y_count_non_zero_coeffs,
      37             :         uint32_t                cb_count_non_zero_coeffs,
      38             :         uint32_t                cr_count_non_zero_coeffs,
      39             :         COMPONENT_TYPE          component_type);
      40             : 
      41             :     extern uint64_t compute_nx_m_satd_sad_lcu(
      42             :         uint8_t  *src,        // input parameter, source samples Ptr
      43             :         uint32_t  src_stride,  // input parameter, source stride
      44             :         uint32_t  width,      // input parameter, block width (N)
      45             :         uint32_t  height);     // input parameter, block height (M)
      46             : 
      47             :     //Residual Data
      48             : 
      49             :     void compressed_pack_lcu(
      50             :         uint8_t  *in8_bit_buffer,
      51             :         uint32_t  in8_stride,
      52             :         uint8_t  *inn_bit_buffer,
      53             :         uint32_t  inn_stride,
      54             :         uint16_t *out16_bit_buffer,
      55             :         uint32_t  out_stride,
      56             :         uint32_t  width,
      57             :         uint32_t  height);
      58             : 
      59             :     void conv2b_to_c_pack_lcu(
      60             :         const uint8_t *inn_bit_buffer,
      61             :         uint32_t       inn_stride,
      62             :         uint8_t       *in_compn_bit_buffer,
      63             :         uint32_t       out_stride,
      64             :         uint8_t       *local_cache,
      65             :         uint32_t       width,
      66             :         uint32_t       height);
      67             : 
      68             :     void pack2d_src(
      69             :         uint8_t  *in8_bit_buffer,
      70             :         uint32_t  in8_stride,
      71             :         uint8_t  *inn_bit_buffer,
      72             :         uint32_t  inn_stride,
      73             :         uint16_t *out16_bit_buffer,
      74             :         uint32_t  out_stride,
      75             :         uint32_t  width,
      76             :         uint32_t  height);
      77             : 
      78             :     void un_pack2d(
      79             :         uint16_t *in16_bit_buffer,
      80             :         uint32_t  in_stride,
      81             :         uint8_t  *out8_bit_buffer,
      82             :         uint32_t  out8_stride,
      83             :         uint8_t  *outn_bit_buffer,
      84             :         uint32_t  outn_stride,
      85             :         uint32_t  width,
      86             :         uint32_t  height);
      87             : 
      88             :     void extract_8bit_data(
      89             :         uint16_t *in16_bit_buffer,
      90             :         uint32_t  in_stride,
      91             :         uint8_t  *out8_bit_buffer,
      92             :         uint32_t  out8_stride,
      93             :         uint32_t  width,
      94             :         uint32_t  height);
      95             : 
      96             :     void unpack_l0l1_avg(
      97             :         uint16_t *ref16_l0,
      98             :         uint32_t  ref_l0_stride,
      99             :         uint16_t *ref16_l1,
     100             :         uint32_t  ref_l1_stride,
     101             :         uint8_t  *dst_ptr,
     102             :         uint32_t  dst_stride,
     103             :         uint32_t  width,
     104             :         uint32_t  height);
     105             : 
     106             :     void extract8_bitdata_safe_sub(
     107             :         uint16_t   *in16_bit_buffer,
     108             :         uint32_t    in_stride,
     109             :         uint8_t    *out8_bit_buffer,
     110             :         uint32_t    out8_stride,
     111             :         uint32_t    width,
     112             :         uint32_t    height,
     113             :         EbBool      sub_pred);
     114             : 
     115             :     void unpack_l0l1_avg_safe_sub(
     116             :         uint16_t *ref16_l0,
     117             :         uint32_t  ref_l0_stride,
     118             :         uint16_t *ref16_l1,
     119             :         uint32_t  ref_l1_stride,
     120             :         uint8_t  *dst_ptr,
     121             :         uint32_t  dst_stride,
     122             :         uint32_t  width,
     123             :         uint32_t  height,
     124             :         EbBool    sub_pred);
     125             : 
     126             :     void memcpy16bit(
     127             :         uint16_t *out_ptr,
     128             :         uint16_t *in_ptr,
     129             :         uint64_t  num_of_elements);
     130             : 
     131             :     void memcpy32bit(
     132             :         uint32_t *out_ptr,
     133             :         uint32_t *in_ptr,
     134             :         uint64_t  num_of_elements);
     135             : 
     136           0 :     static INLINE void memset16bit(
     137             :         uint16_t                     * in_ptr,
     138             :         uint16_t                       value,
     139             :         uint64_t                       num_of_elements)
     140             :     {
     141             :         uint64_t i;
     142             : 
     143           0 :         for (i = 0; i < num_of_elements; i++)
     144           0 :             in_ptr[i] = value;
     145           0 :     }
     146             : 
     147     7297140 :     static INLINE void memset32bit(
     148             :         uint32_t                     * in_ptr,
     149             :         uint32_t                       value,
     150             :         uint64_t                       num_of_elements)
     151             :     {
     152             :         uint64_t i;
     153             : 
     154    14594300 :         for (i = 0; i < num_of_elements; i++)
     155     7297120 :             in_ptr[i] = value;
     156     7297140 :     }
     157             : 
     158             :     int32_t sum_residual_c(
     159             :         int16_t  *in_ptr,
     160             :         uint32_t  size,
     161             :         uint32_t  stride_in);
     162             : 
     163             :     void memset16bit_block(
     164             :         int16_t  *in_ptr,
     165             :         uint32_t  stride_in,
     166             :         uint32_t  size,
     167             :         int16_t   value);
     168             : 
     169             :     void full_distortion_kernel_cbf_zero32_bits_c(
     170             :         int32_t  *coeff,
     171             :         uint32_t  coeff_stride,
     172             :         int32_t  *recon_coeff,
     173             :         uint32_t  recon_coeff_stride,
     174             :         uint64_t  distortion_result[DIST_CALC_TOTAL],
     175             :         uint32_t  area_width,
     176             :         uint32_t  area_height);
     177             : 
     178             :     void full_distortion_kernel32_bits_c(
     179             :         int32_t  *coeff,
     180             :         uint32_t  coeff_stride,
     181             :         int32_t  *recon_coeff,
     182             :         uint32_t  recon_coeff_stride,
     183             :         uint64_t  distortion_result[DIST_CALC_TOTAL],
     184             :         uint32_t  area_width,
     185             :         uint32_t  area_height);
     186             : 
     187             :     uint64_t full_distortion_kernel16_bits(
     188             :         uint8_t  *input,
     189             :         uint32_t  input_offset,
     190             :         uint32_t  input_stride,
     191             :         uint8_t  *pred,
     192             :         uint32_t  pred_offset,
     193             :         uint32_t  pred_stride,
     194             :         uint32_t  area_width,
     195             :         uint32_t  area_height);
     196             : 
     197             :     void residual_kernel16bit(
     198             :         uint16_t *input,
     199             :         uint32_t  input_stride,
     200             :         uint16_t *pred,
     201             :         uint32_t  pred_stride,
     202             :         int16_t  *residual,
     203             :         uint32_t  residual_stride,
     204             :         uint32_t  area_width,
     205             :         uint32_t  area_height);
     206             : 
     207             :     void residual_kernel8bit_c(
     208             :         uint8_t  *input,
     209             :         uint32_t  input_stride,
     210             :         uint8_t  *pred,
     211             :         uint32_t  pred_stride,
     212             :         int16_t  *residual,
     213             :         uint32_t  residual_stride,
     214             :         uint32_t  area_width,
     215             :         uint32_t  area_height);
     216             : 
     217             :     void residual_kernel_subsampled(
     218             :         uint8_t   *input,
     219             :         uint32_t   input_stride,
     220             :         uint8_t   *pred,
     221             :         uint32_t   pred_stride,
     222             :         int16_t  *residual,
     223             :         uint32_t   residual_stride,
     224             :         uint32_t   area_width,
     225             :         uint32_t   area_height,
     226             :         uint8_t    last_line);
     227             : 
     228             :     void picture_addition_kernel16_bit(
     229             :         uint16_t *pred_ptr,
     230             :         uint32_t  pred_stride,
     231             :         int32_t  *residual_ptr,
     232             :         uint32_t  residual_stride,
     233             :         uint16_t *recon_ptr,
     234             :         uint32_t  recon_stride,
     235             :         uint32_t  width,
     236             :         uint32_t  height,
     237             :         int32_t   bd);
     238             : 
     239             :     void pic_copy_kernel_8bit(
     240             :         EbByte                     src,
     241             :         uint32_t                   src_stride,
     242             :         EbByte                     dst,
     243             :         uint32_t                   dst_stride,
     244             :         uint32_t                   area_width,
     245             :         uint32_t                   area_height);
     246             : 
     247             :     void pic_copy_kernel_16bit(
     248             :         uint16_t                  *src,
     249             :         uint32_t                   src_stride,
     250             :         uint16_t                  *dst,
     251             :         uint32_t                   dst_stride,
     252             :         uint32_t                   width,
     253             :         uint32_t                   height);
     254             : 
     255             :     EbErrorType picture_copy(
     256             :         EbPictureBufferDesc       *src,
     257             :         uint32_t                   src_luma_origin_index,
     258             :         uint32_t                   src_chroma_origin_index,
     259             :         EbPictureBufferDesc       *dst,
     260             :         uint32_t                   dst_luma_origin_index,
     261             :         uint32_t                   dst_chroma_origin_index,
     262             :         uint32_t                   area_width,
     263             :         uint32_t                   area_height,
     264             :         uint32_t                   chroma_area_width,
     265             :         uint32_t                   chroma_area_height,
     266             :         uint32_t                   component_mask,
     267             :         uint8_t                    hbd);
     268             : 
     269             : #ifdef __cplusplus
     270             : }
     271             : #endif
     272             : #endif // EbPictureOperators_h

Generated by: LCOV version 1.14