1 /*
2  * Copyright (C) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef IMAGE_EFFECT_MEMCPY_HELPER_H
17 #define IMAGE_EFFECT_MEMCPY_HELPER_H
18 
19 #include <cstdint>
20 
21 #include "effect_info.h"
22 #include "effect_buffer.h"
23 #include "effect_memory.h"
24 #include "image_effect_marco_define.h"
25 
26 namespace OHOS {
27 namespace Media {
28 namespace Effect {
29 struct CopyInfo {
30     BufferInfo bufferInfo;
31     uint8_t *data = nullptr;
32 };
33 
34 class MemcpyHelper {
35 public:
36     IMAGE_EFFECT_EXPORT static void CopyData(CopyInfo &src, CopyInfo &dst);
37     IMAGE_EFFECT_EXPORT static void CopyData(EffectBuffer *src, EffectBuffer *dst);
38     IMAGE_EFFECT_EXPORT static void CopyData(EffectBuffer *src, CopyInfo &dst);
39     IMAGE_EFFECT_EXPORT static void CopyData(CopyInfo &src, EffectBuffer *dst);
40     IMAGE_EFFECT_EXPORT static void CopyData(EffectBuffer *buffer, MemoryData *memoryData);
41     IMAGE_EFFECT_EXPORT static void CopyData(MemoryData *src, MemoryData *dst);
42 };
43 } // namespace Effect
44 } // namespace Media
45 } // namespace OHOS
46 
47 #endif // IMAGE_EFFECT_MEMCPY_HELPER_H