LCOV - code coverage report
Current view: top level - Codec - EbTransQuantBuffers.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 36 36 100.0 %
Date: 2019-11-25 17:38:06 Functions: 2 2 100.0 %

          Line data    Source code
       1             : /*
       2             : * Copyright(c) 2019 Intel Corporation
       3             : * SPDX - License - Identifier: BSD - 2 - Clause - Patent
       4             : */
       5             : 
       6             : #include "EbDefinitions.h"
       7             : #include "EbTransQuantBuffers.h"
       8             : #include "EbPictureBufferDesc.h"
       9             : 
      10          22 : void eb_trans_quant_buffers_dctor(EbPtr p)
      11             : {
      12          22 :     EbTransQuantBuffers* obj = (EbTransQuantBuffers*)p;
      13          22 :     EB_DELETE(obj->tu_trans_coeff2_nx2_n_ptr);
      14          22 :     EB_DELETE(obj->tu_trans_coeff_nxn_ptr);
      15          22 :     EB_DELETE(obj->tu_trans_coeff_n2x_n2_ptr);
      16          22 :     EB_DELETE(obj->tu_quant_coeff_nxn_ptr);
      17          22 :     EB_DELETE(obj->tu_quant_coeff_n2x_n2_ptr);
      18          22 : }
      19             : 
      20          22 : EbErrorType eb_trans_quant_buffers_ctor(
      21             :     EbTransQuantBuffers          *trans_quant_buffers_ptr)
      22             : {
      23             :     EbPictureBufferDescInitData transCoeffInitArray;
      24             : 
      25          22 :     trans_quant_buffers_ptr->dctor = eb_trans_quant_buffers_dctor;
      26          22 :     transCoeffInitArray.max_width = SB_STRIDE_Y;
      27          22 :     transCoeffInitArray.max_height = SB_STRIDE_Y;
      28          22 :     transCoeffInitArray.bit_depth = EB_16BIT;
      29          22 :     transCoeffInitArray.buffer_enable_mask = PICTURE_BUFFER_DESC_FULL_MASK;
      30          22 :     transCoeffInitArray.color_format = EB_YUV420;
      31          22 :     transCoeffInitArray.left_padding = 0;
      32          22 :     transCoeffInitArray.right_padding = 0;
      33          22 :     transCoeffInitArray.top_padding = 0;
      34          22 :     transCoeffInitArray.bot_padding = 0;
      35          22 :     transCoeffInitArray.split_mode = EB_FALSE;
      36             : 
      37             :     EbPictureBufferDescInitData ThirtyTwoBittransCoeffInitArray;
      38          22 :     ThirtyTwoBittransCoeffInitArray.max_width = SB_STRIDE_Y;
      39          22 :     ThirtyTwoBittransCoeffInitArray.max_height = SB_STRIDE_Y;
      40          22 :     ThirtyTwoBittransCoeffInitArray.bit_depth = EB_32BIT;
      41          22 :     ThirtyTwoBittransCoeffInitArray.buffer_enable_mask = PICTURE_BUFFER_DESC_FULL_MASK;
      42          22 :     ThirtyTwoBittransCoeffInitArray.color_format = EB_YUV420;
      43          22 :     ThirtyTwoBittransCoeffInitArray.left_padding = 0;
      44          22 :     ThirtyTwoBittransCoeffInitArray.right_padding = 0;
      45          22 :     ThirtyTwoBittransCoeffInitArray.top_padding = 0;
      46          22 :     ThirtyTwoBittransCoeffInitArray.bot_padding = 0;
      47          22 :     ThirtyTwoBittransCoeffInitArray.split_mode = EB_FALSE;
      48             : 
      49          22 :     EB_NEW(
      50             :         trans_quant_buffers_ptr->tu_trans_coeff2_nx2_n_ptr,
      51             :         eb_picture_buffer_desc_ctor,
      52             :         (EbPtr)&ThirtyTwoBittransCoeffInitArray);
      53          22 :     EB_NEW(
      54             :         trans_quant_buffers_ptr->tu_trans_coeff_nxn_ptr,
      55             :         eb_picture_buffer_desc_ctor,
      56             :         (EbPtr)&ThirtyTwoBittransCoeffInitArray);
      57          22 :     EB_NEW(
      58             :         trans_quant_buffers_ptr->tu_trans_coeff_n2x_n2_ptr,
      59             :         eb_picture_buffer_desc_ctor,
      60             :         (EbPtr)&transCoeffInitArray);
      61          22 :     EB_NEW(
      62             :         trans_quant_buffers_ptr->tu_quant_coeff_nxn_ptr,
      63             :         eb_picture_buffer_desc_ctor,
      64             :         (EbPtr)&transCoeffInitArray);
      65          22 :     EB_NEW(
      66             :         trans_quant_buffers_ptr->tu_quant_coeff_n2x_n2_ptr,
      67             :         eb_picture_buffer_desc_ctor,
      68             :         (EbPtr)&transCoeffInitArray);
      69          22 :     return EB_ErrorNone;
      70             : }

Generated by: LCOV version 1.14