versatile_convertor.h 909 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef DEPTHGUIDE_VERSATILE_CONVERTOR_H
  2. #define DEPTHGUIDE_VERSATILE_CONVERTOR_H
  3. #include "core/cuda_helper.hpp"
  4. #include "core/object_manager.h"
  5. #include <memory>
  6. enum convert_options {
  7. CVT_RGB_BGRA,
  8. CVT_NV12_RGB,
  9. CVT_FAKE_ENCODE_888I,
  10. CVT_FAKE_ENCODE_555P,
  11. CVT_FAKE_ENCODE_800P,
  12. CVT_FAKE_DECODE_888I,
  13. CVT_FAKE_DECODE_555P,
  14. CVT_FAKE_DECODE_800P,
  15. CVT_HALF_SPLIT
  16. };
  17. class versatile_convertor {
  18. public:
  19. struct create_config {
  20. obj_name_type in_name;
  21. obj_name_type ext_in = invalid_obj_name;
  22. obj_name_type out_name;
  23. obj_name_type ext_out = invalid_obj_name;
  24. convert_options cvt_opt;
  25. smart_cuda_stream *stream = nullptr;
  26. };
  27. explicit versatile_convertor(create_config conf);
  28. ~versatile_convertor();
  29. private:
  30. struct impl;
  31. std::unique_ptr<impl> pimpl;
  32. };
  33. #endif //DEPTHGUIDE_VERSATILE_CONVERTOR_H