1
0

memalloc.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*!
  2. ************************************************************************
  3. * \file memalloc.h
  4. *
  5. * \brief
  6. * Memory allocation and free helper funtions
  7. *
  8. * \author
  9. * Main contributors (see contributors.h for copyright, address and affiliation details)
  10. * - Karsten Sühring <[email protected]>
  11. * - Alexis Michael Tourapis <[email protected]>
  12. *
  13. ************************************************************************
  14. */
  15. #ifndef _MEMALLOC_H_
  16. #define _MEMALLOC_H_
  17. #include "global.h"
  18. #include "quant_params.h"
  19. #if defined(USEMMX) // && (IMGTYPE == 0) // MMX, SSE, SSE2 intrinsic support
  20. #if defined(_MSC_VER) || defined(__INTEL_COMPILER) // ICC
  21. # include <emmintrin.h>
  22. # else
  23. # include <xmmintrin.h>
  24. # endif
  25. #endif
  26. extern int get_mem2D(byte ***array2D, int dim0, int dim1);
  27. extern int get_mem3D(byte ****array3D, int dim0, int dim1, int dim2);
  28. extern int get_mem4D(byte *****array4D, int dim0, int dim1, int dim2, int dim3);
  29. extern int get_mem2Dint(int ***array2D, int rows, int columns);
  30. extern int get_mem3Dint(int ****array3D, int frames, int rows, int columns);
  31. extern int get_mem4Dint(int *****array4D, int idx, int frames, int rows, int columns );
  32. extern int get_mem2DPicMotion(struct pic_motion ***array3D, int rows, int columns);
  33. extern int get_mem3Dref(h264_ref_t ****array3D, int frames, int rows, int columns);
  34. extern int get_mem2Dshort(short ***array2D, int dim0, int dim1);
  35. extern MotionVector ***get_mem3DMotionVector(int dim0, int dim1, int dim2);
  36. extern int get_mem4Dshort(short *****array4D, int dim0, int dim1, int dim2, int dim3);
  37. extern int get_mem2Dpel(imgpel ***array2D, int rows, int columns);
  38. extern struct video_image *get_memImage(int width, int height);
  39. extern void free_memImage(struct video_image *image);
  40. extern void free_mem2D (byte **array2D);
  41. extern void free_mem3D (byte ***array3D);
  42. extern void free_mem4D (byte ****array4D);
  43. //
  44. extern void free_mem2Dint (int **array2D);
  45. extern void free_mem3Dint (int ***array3D);
  46. extern void free_mem3Dref(h264_ref_t ***array3D);
  47. extern void free_mem2DPicMotion(struct pic_motion **array3D);
  48. //
  49. extern void free_mem2Dshort(short **array2D);
  50. extern void free_mem3DMotionVector(MotionVector ***);
  51. extern void free_mem2Dpel (imgpel **array2D);
  52. extern int init_top_bot_planes(imgpel **imgFrame, int height, imgpel ***imgTopField, imgpel ***imgBotField);
  53. extern void free_top_bot_planes(imgpel **imgTopField, imgpel **imgBotField);
  54. extern void no_mem_exit(char *where);
  55. #endif