blob: c0370d32180c238d7734ba4eb62c0b93e8eee527 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
/*
* soft_geo_mapper.h - soft geometry map class
*
* Copyright (c) 2017 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Author: Wind Yuan <feng.yuan@intel.com>
*/
#ifndef XCAM_SOFT_GEO_MAP_H
#define XCAM_SOFT_GEO_MAP_H
#include <xcam_std.h>
#include <interface/geo_mapper.h>
#include <soft/soft_handler.h>
#include <soft/soft_image.h>
namespace XCam {
namespace XCamSoftTasks {
class GeoMapTask;
};
class SoftGeoMapper
: public SoftHandler, public GeoMapper
{
public:
SoftGeoMapper (const char *name = "SoftGeoMap");
~SoftGeoMapper ();
bool set_lookup_table (const PointFloat2 *data, uint32_t width, uint32_t height);
//derived from SoftHandler
virtual XCamReturn terminate ();
void remap_task_done (
const SmartPtr<Worker> &worker, const SmartPtr<Worker::Arguments> &args, const XCamReturn error);
protected:
//derived from interface
XCamReturn remap (
const SmartPtr<VideoBuffer> &in,
SmartPtr<VideoBuffer> &out_buf);
//derived from SoftHandler
XCamReturn configure_resource (const SmartPtr<Parameters> ¶m);
XCamReturn start_work (const SmartPtr<Parameters> ¶m);
private:
XCamReturn start_remap_task (const SmartPtr<ImageHandler::Parameters> ¶m);
private:
SmartPtr<XCamSoftTasks::GeoMapTask> _map_task;
SmartPtr<Float2Image> _lookup_table;
};
extern SmartPtr<SoftHandler> create_soft_geo_mapper ();
}
#endif //XCAM_SOFT_GEO_MAP_H
|