Wind Yuan | ce2778b | 2015-03-18 15:32:12 +0800 | [diff] [blame] | 1 | /* |
| 2 | * cl_demosaic_handler.h - CL demosaic handler |
| 3 | * |
| 4 | * Copyright (c) 2015 Intel Corporation |
| 5 | * |
| 6 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | * you may not use this file except in compliance with the License. |
| 8 | * You may obtain a copy of the License at |
| 9 | * |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | * |
| 12 | * Unless required by applicable law or agreed to in writing, software |
| 13 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | * See the License for the specific language governing permissions and |
| 16 | * limitations under the License. |
| 17 | * |
| 18 | * Author: Wind Yuan <feng.yuan@intel.com> |
| 19 | */ |
| 20 | |
| 21 | #ifndef XCAM_CL_DEMOSAIC_HANLDER_H |
| 22 | #define XCAM_CL_DEMOSAIC_HANLDER_H |
| 23 | |
| 24 | #include "xcam_utils.h" |
| 25 | #include "cl_image_handler.h" |
| 26 | |
| 27 | namespace XCam { |
| 28 | |
| 29 | class CLDemosaicImageKernel |
| 30 | : public CLImageKernel |
| 31 | { |
| 32 | public: |
| 33 | explicit CLDemosaicImageKernel (SmartPtr<CLContext> &context); |
| 34 | |
| 35 | protected: |
| 36 | virtual XCamReturn prepare_arguments ( |
| 37 | SmartPtr<DrmBoBuffer> &input, SmartPtr<DrmBoBuffer> &output, |
| 38 | CLArgument args[], uint32_t &arg_count, |
| 39 | CLWorkSize &work_size); |
| 40 | |
| 41 | private: |
| 42 | XCAM_DEAD_COPY (CLDemosaicImageKernel); |
| 43 | }; |
| 44 | |
| 45 | class CLBayer2RGBImageHandler |
| 46 | : public CLImageHandler |
| 47 | { |
| 48 | public: |
| 49 | explicit CLBayer2RGBImageHandler (const char *name); |
| 50 | bool set_output_format (uint32_t fourcc); |
| 51 | |
| 52 | protected: |
| 53 | virtual XCamReturn prepare_buffer_pool_video_info ( |
| 54 | const VideoBufferInfo &input, |
| 55 | VideoBufferInfo &output); |
| 56 | |
| 57 | private: |
| 58 | XCAM_DEAD_COPY (CLBayer2RGBImageHandler); |
| 59 | |
| 60 | private: |
| 61 | uint32_t _output_format; |
| 62 | }; |
| 63 | |
| 64 | SmartPtr<CLImageHandler> |
| 65 | create_cl_demosaic_image_handler (SmartPtr<CLContext> &context); |
| 66 | |
| 67 | }; |
| 68 | |
| 69 | #endif //XCAM_CL_DEMOSAIC_HANLDER_H |