1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     y2r_Y2r.h
4 
5   Copyright (C)2009 Nintendo Co., Ltd.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law.  They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Rev: 20359 $
14  *---------------------------------------------------------------------------*/
15 
16 //
17 // このファイルを編集しないでください。
18 // このファイルは自動生成されます。
19 //
20 
21 #ifndef NN_Y2R_CTR_Y2R_Y2R_H_
22 #define NN_Y2R_CTR_Y2R_Y2R_H_
23 
24 #include <nn/Handle.h>
25 #include <nn/Result.h>
26 #include <nn/types.h>
27 #include <nn/y2r/CTR/y2r_Types.h>
28 
29 
30 
31 namespace nn {
32 namespace y2r {
33 namespace CTR {
34 namespace detail {
35 
36     class Y2r
37     {
38     public:
39         enum Tag
40         {
41             TAG_IPC_ERROR,
42             TAG_SET_INPUT_FORMAT,
43             TAG_GET_INPUT_FORMAT,
44             TAG_SET_OUTPUT_FORMAT,
45             TAG_GET_OUTPUT_FORMAT,
46             TAG_SET_ROTATION,
47             TAG_GET_ROTATION,
48             TAG_SET_BLOCK_ALIGNMENT,
49             TAG_GET_BLOCK_ALIGNMENT,
50             TAG_SET_SPACIAL_DITHERING,
51             TAG_GET_SPACIAL_DITHERING,
52             TAG_SET_TEMPORAL_DITHERING,
53             TAG_GET_TEMPORAL_DITHERING,
54             TAG_SET_TRANSFER_END_INTERRUPT,
55             TAG_GET_TRANSFER_END_INTERRUPT,
56             TAG_GET_TRANSFER_END_EVENT,
57             TAG_SET_SENDING_Y,
58             TAG_SET_SENDING_U,
59             TAG_SET_SENDING_V,
60             TAG_SET_SENDING_YUV,
61             TAG_IS_FINISHED_SENDING_YUV,
62             TAG_IS_FINISHED_SENDING_Y,
63             TAG_IS_FINISHED_SENDING_U,
64             TAG_IS_FINISHED_SENDING_V,
65             TAG_SET_RECEIVING,
66             TAG_IS_FINISHED_RECEIVING,
67             TAG_SET_INPUT_LINE_WIDTH,
68             TAG_GET_INPUT_LINE_WIDTH,
69             TAG_SET_INPUT_LINES,
70             TAG_GET_INPUT_LINES,
71             TAG_SET_COEFFICIENT_PARAMS,
72             TAG_GET_COEFFICIENT_PARAMS,
73             TAG_SET_STANDARD_COEFFICIENT,
74             TAG_GET_STANDARD_COEFFICIENT_PARAMS,
75             TAG_SET_ALPHA,
76             TAG_GET_ALPHA,
77             TAG_SET_DITHERING_WEIGHT_PARAMS,
78             TAG_GET_DITHERING_WEIGHT_PARAMS,
79             TAG_START_CONVERSION,
80             TAG_STOP_CONVERSION,
81             TAG_IS_BUSY_CONVERSION,
82             TAG_SET_PACKAGE_PARAMETER,
83             TAG_PING_PROCESS,
84             TAG_DRIVER_INITIALIZE,
85             TAG_DRIVER_FINALIZE,
86             TAG_IPC_END
87         };
88 
89     public:
90         static Handle s_Session;
91 
92     public:
Y2r()93         Y2r() {}
94 
95     public:
96         static nn::Result SetInputFormat( nn::y2r::CTR::InputFormat format );
97         static nn::Result GetInputFormat( nn::y2r::CTR::InputFormat* pFormat );
98         static nn::Result SetOutputFormat( nn::y2r::CTR::OutputFormat format );
99         static nn::Result GetOutputFormat( nn::y2r::CTR::OutputFormat* pFormat );
100         static nn::Result SetRotation( nn::y2r::CTR::Rotation rotation );
101         static nn::Result GetRotation( nn::y2r::CTR::Rotation* pRotation );
102         static nn::Result SetBlockAlignment( nn::y2r::CTR::BlockAlignment align );
103         static nn::Result GetBlockAlignment( nn::y2r::CTR::BlockAlignment* pAlign );
104         static nn::Result SetSpacialDithering( bool enable );
105         static nn::Result GetSpacialDithering( bool* pEnable );
106         static nn::Result SetTemporalDithering( bool enable );
107         static nn::Result GetTemporalDithering( bool* pEnable );
108         static nn::Result SetTransferEndInterrupt( bool enable );
109         static nn::Result GetTransferEndInterrupt( bool* pEnable );
110         static nn::Result GetTransferEndEvent( nn::Handle* pHandle );
111         static nn::Result SetSendingY( nn::Handle srcProcess, u32 pSrc, size_t imageSize, s16 transferUnit, s16 transferStride );
112         static nn::Result SetSendingU( nn::Handle srcProcess, u32 pSrc, size_t imageSize, s16 transferUnit, s16 transferStride );
113         static nn::Result SetSendingV( nn::Handle srcProcess, u32 pSrc, size_t imageSize, s16 transferUnit, s16 transferStride );
114         static nn::Result SetSendingYuv( nn::Handle srcProcess, u32 pSrc, size_t imageSize, s16 transferUnit, s16 transferStride );
115         static nn::Result IsFinishedSendingYuv( bool* pState );
116         static nn::Result IsFinishedSendingY( bool* pState );
117         static nn::Result IsFinishedSendingU( bool* pState );
118         static nn::Result IsFinishedSendingV( bool* pState );
119         static nn::Result SetReceiving( nn::Handle dstProcess, u32 pDst, size_t imageSize, s16 transferUnit, s16 transferStride );
120         static nn::Result IsFinishedReceiving( bool* pState );
121         static nn::Result SetInputLineWidth( s16 width );
122         static nn::Result GetInputLineWidth( s16* pWidth );
123         static nn::Result SetInputLines( s16 lines );
124         static nn::Result GetInputLines( s16* pLines );
125         static nn::Result SetCoefficientParams( const nn::y2r::CTR::CoefficientParams& src );
126         static nn::Result GetCoefficientParams( nn::y2r::CTR::CoefficientParams* pDst );
127         static nn::Result SetStandardCoefficient( nn::y2r::CTR::StandardCoefficient no );
128         static nn::Result GetStandardCoefficientParams( nn::y2r::CTR::CoefficientParams* pDst, nn::y2r::CTR::StandardCoefficient no );
129         static nn::Result SetAlpha( s16 alpha );
130         static nn::Result GetAlpha( s16* pAlpha );
131         static nn::Result SetDitheringWeightParams( const nn::y2r::CTR::DitheringWeightParams& w );
132         static nn::Result GetDitheringWeightParams( nn::y2r::CTR::DitheringWeightParams* pW );
133         static nn::Result StartConversion();
134         static nn::Result StopConversion();
135         static nn::Result IsBusyConversion( bool* pState );
136         static nn::Result SetPackageParameter( const nn::y2r::CTR::PackageParameter& param );
137         static nn::Result PingProcess();
138         static nn::Result DriverInitialize();
139         static nn::Result DriverFinalize();
140     };
141 
142 } // end of namespace detail
143 } // end of namespace CTR
144 } // end of namespace y2r
145 } // end of namespace nn
146 
147 
148 
149 #endif  // ifndef NN_Y2R_CTR_Y2R_Y2R_H_
150