intra_fit_tools.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*Daala video codec
  2. Copyright (c) 2012 Daala project contributors. All rights reserved.
  3. Redistribution and use in source and binary forms, with or without
  4. modification, are permitted provided that the following conditions are met:
  5. - Redistributions of source code must retain the above copyright notice, this
  6. list of conditions and the following disclaimer.
  7. - Redistributions in binary form must reproduce the above copyright notice,
  8. this list of conditions and the following disclaimer in the documentation
  9. and/or other materials provided with the distribution.
  10. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS”
  11. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  12. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  13. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
  14. FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  15. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  16. SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  17. CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  18. OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  19. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*/
  20. #if !defined(_tools_init_intra_tools_H)
  21. # define _tools_init_intra_tools_H (1)
  22. #include "vidinput.h"
  23. #include "../src/odintrin.h"
  24. #define B_SZ_LOG (2)
  25. #define B_SZ_LOG_MAX (4)
  26. #define B_SZ (1<<B_SZ_LOG)
  27. #define B_SZ_MAX (1<<B_SZ_LOG_MAX)
  28. #define OD_INTRA_DC (0)
  29. #define OD_INTRA_TM (1)
  30. #define OD_INTRA_HU (2)
  31. #define OD_INTRA_HE (3)
  32. #define OD_INTRA_HD (4)
  33. #define OD_INTRA_RD (5)
  34. #define OD_INTRA_VR (6)
  35. #define OD_INTRA_VE (7)
  36. #define OD_INTRA_VL (8)
  37. #define OD_INTRA_LD (9)
  38. #define OD_INTRA_NMODES (10)
  39. typedef int (*plane_start_func)(void *_ctx,const char *_name,
  40. const th_info *_ti,int _pli,int _nxblocks,int _nyblocks);
  41. typedef void (*block_func)(void *_ctx,const unsigned char *_data,int _stride,
  42. int _bi,int _bj);
  43. typedef int (*plane_finish_func)(void *_ctx);
  44. /*Computes the starting offset and number of blocks which can be intra
  45. predicted with full context (i.e., all of their neighbors) available.*/
  46. void get_intra_dims(const th_info *_ti,int _pli,int _padding,
  47. int *_x0,int *_y0,int *_nxblocks,int *_nyblocks);
  48. char *get_map_filename(const char *_name,int _pli,int _nxblocks,int _nyblocks);
  49. char *get_weights_filename(const char *_name,
  50. int _pli,int _nxblocks,int _nyblocks);
  51. int apply_to_blocks(void *_ctx,plane_start_func _start,block_func _block,
  52. plane_finish_func _finish,int _argc,const char **_argv);
  53. int apply_to_blocks2(void *_ctx,int _padding,plane_start_func _start,
  54. const block_func *_blocks,int _nfuncs,plane_finish_func _finish,int _plmask,
  55. int _argc,const char **_argv);
  56. void vp8_intra_predict(unsigned char *_dst,int _dst_stride,
  57. const unsigned char *_src,int _src_stride,int _mode);
  58. #endif