endpts.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. Copyright 2007 nVidia, Inc.
  3. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
  5. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
  6. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  7. See the License for the specific language governing permissions and limitations under the License.
  8. */
  9. #ifndef _AVPCL_ENDPTS_H
  10. #define _AVPCL_ENDPTS_H
  11. // endpoint definitions and routines to search through endpoint space
  12. #include "nvmath/vector.h"
  13. namespace AVPCL {
  14. static const int NCHANNELS_RGB = 3;
  15. static const int NCHANNELS_RGBA = 4;
  16. static const int CHANNEL_R = 0;
  17. static const int CHANNEL_G = 1;
  18. static const int CHANNEL_B = 2;
  19. static const int CHANNEL_A = 3;
  20. struct FltEndpts
  21. {
  22. nv::Vector4 A;
  23. nv::Vector4 B;
  24. };
  25. struct IntEndptsRGB
  26. {
  27. int A[NCHANNELS_RGB];
  28. int B[NCHANNELS_RGB];
  29. };
  30. struct IntEndptsRGB_1
  31. {
  32. int A[NCHANNELS_RGB];
  33. int B[NCHANNELS_RGB];
  34. int lsb; // shared lsb for A and B
  35. };
  36. struct IntEndptsRGB_2
  37. {
  38. int A[NCHANNELS_RGB];
  39. int B[NCHANNELS_RGB];
  40. int a_lsb; // lsb for A
  41. int b_lsb; // lsb for B
  42. };
  43. struct IntEndptsRGBA
  44. {
  45. int A[NCHANNELS_RGBA];
  46. int B[NCHANNELS_RGBA];
  47. };
  48. struct IntEndptsRGBA_2
  49. {
  50. int A[NCHANNELS_RGBA];
  51. int B[NCHANNELS_RGBA];
  52. int a_lsb; // lsb for A
  53. int b_lsb; // lsb for B
  54. };
  55. struct IntEndptsRGBA_2a
  56. {
  57. int A[NCHANNELS_RGBA];
  58. int B[NCHANNELS_RGBA];
  59. int a_lsb; // lsb for RGB channels of A
  60. int b_lsb; // lsb for RGB channels of A
  61. };
  62. }
  63. #endif