1 #ifndef color_YPbPr_convert_YDbDr
2 #define color_YPbPr_convert_YDbDr
3 
4 #include "../../_internal/convert.hpp"
5 
6 #include "../category.hpp"
7 
8 
9 #include "../../YDbDr/YDbDr.hpp"
10 #include "../../rgb/rgb.hpp"
11 
12 namespace color
13  {
14   namespace _internal
15    {
16 
17     template
18      <
19        typename YPbPr_tag_name, ::color::constant::YPbPr::reference_enum YPbPr_reference_number
20       ,typename YDbDr_tag_name
21      >
22      struct convert
23       <
24         ::color::category::YPbPr<  YPbPr_tag_name, YPbPr_reference_number >
25        ,::color::category::YDbDr<  YDbDr_tag_name >
26       >
27       {
28        public:
29          typedef ::color::category::YPbPr< YPbPr_tag_name, YPbPr_reference_number >    YPbPr_category_type, category_left_type;
30          typedef ::color::category::YDbDr< YDbDr_tag_name >    YDbDr_category_type, category_right_type;
31 
32          typedef typename ::color::trait::scalar<category_left_type>::instance_type  scalar_type;
33 
34          typedef ::color::model< YPbPr_category_type >  YPbPr_model_type;
35          typedef ::color::model< YDbDr_category_type >  YDbDr_model_type;
36 
37          typedef ::color::rgb< scalar_type >  rgb_model_type;
38 
39          typedef ::color::trait::container<category_left_type>     container_left_trait_type;
40          typedef ::color::trait::container<category_right_type>    container_right_trait_type;
41 
42          typedef typename container_left_trait_type::input_type         container_left_input_type;
43          typedef typename container_right_trait_type::model_type  container_right_const_input_type;
44 
processcolor::_internal::convert45          static void process
46           (
47             container_left_input_type         left
48            ,container_right_const_input_type  right
49           )
50           {
51            left = YPbPr_model_type( rgb_model_type( YDbDr_model_type( right ) ) ).container();
52           }
53         };
54 
55    }
56  }
57 
58 #endif
59