コード例 #1
0
ファイル: q_offsets.c プロジェクト: Foredoomed/JM
/*!
 ***********************************************************************
 * \brief
 *    Allocate Q matrix arrays
 ***********************************************************************
 */
static void allocate_QOffsets (QuantParameters *p_Quant, InputParameters *p_Inp)
{
  int max_bitdepth = imax(p_Inp->output.bit_depth[0], p_Inp->output.bit_depth[1]);
  int max_qp = (3 + 6*(max_bitdepth));


  if (p_Inp->AdaptRoundingFixed)
  {
    get_mem3Dshort(&p_Quant->OffsetList4x4, 1, 25, 16);
    get_mem3Dshort(&p_Quant->OffsetList8x8, 1, 15, 64);    
  }
  else
  {
    get_mem3Dshort(&p_Quant->OffsetList4x4, max_qp + 1, 25, 16);
    get_mem3Dshort(&p_Quant->OffsetList8x8, max_qp + 1, 15, 64);    
  }

  get_mem2Dshort(&p_Quant->OffsetList4x4input, 25, 16);
  get_mem2Dshort(&p_Quant->OffsetList8x8input, 15, 64);
}
コード例 #2
0
ファイル: memalloc.c プロジェクト: 5432935/crossbridge
/*!
 ************************************************************************
 * \brief
 *    Allocate 4D memory short array -> short array3D[frames][rows][columns][component]
 *
 * \par Output:
 *    memory size in bytes
 ************************************************************************
 */
int get_mem4Dshort(short *****array4D, int idx, int frames, int rows, int columns )
{
  int  j;

  if(((*array4D) = (short****)calloc(idx,sizeof(short**))) == NULL)
    no_mem_exit("get_mem4Dshort: array4D");

  for(j=0;j<idx;j++)
    get_mem3Dshort( (*array4D)+j, frames, rows, columns ) ;

  return idx*frames*rows*columns*sizeof(short);
}
コード例 #3
0
/*!
 ***********************************************************************
 * \brief
 *    Allocate Q matrix arrays
 ***********************************************************************
 */
void allocate_QOffsets ()
{
  int max_bitdepth = imax(params->output.bit_depth[0], params->output.bit_depth[1]);
  int max_qp = (3 + 6*(max_bitdepth));

  get_mem5Dint(&LevelOffset4x4Comp, 3, 2, max_qp + 1, 4, 4);
  get_mem5Dint(&LevelOffset8x8Comp, 3, 2, max_qp + 1, 8, 8);

  if (params->AdaptRoundingFixed)
  {
    get_mem3Dshort(&OffsetList4x4, 1, 25, 16);
    get_mem3Dshort(&OffsetList8x8, 1, 15, 64);    
  }
  else
  {
    get_mem3Dshort(&OffsetList4x4, max_qp + 1, 25, 16);
    get_mem3Dshort(&OffsetList8x8, max_qp + 1, 15, 64);    
  }

  get_mem2Dshort(&OffsetList4x4input, 25, 16);
  get_mem2Dshort(&OffsetList8x8input, 15, 64);
}
コード例 #4
0
ファイル: memalloc.c プロジェクト: shahid313/MSCourseWork
/*!
 ************************************************************************
 * \brief
 *    Allocate 4D memory short array -> short array3D[frames][rows][columns][component]
 *
 * \par Output:
 *    memory size in bytes
 *-----------------------------------------------------------------------			
 *	 Function Argument List Changed [Removing Global Variables] 
 *	 Input parameters added are 
 *			- h264_decoder* dec_params
 *
 *		<*****@*****.**>
 ************************************************************************
 */
int get_mem4Dshort(short *****array4D, int idx, int frames, int rows, int columns)
{
  int  j;

  if(((*array4D) = (short****)h264_calloc(idx,sizeof(short**))) == NULL)
  {
	  printf("get_mem4Dshort: array4D");
	  exit(0);
  }
  for(j=0;j<idx;j++)
  {
	  get_mem3Dshort( (*array4D)+j, frames, rows, columns ) ;
  }
  return idx*frames*rows*columns*sizeof(short);
}