---
title: Convert
description: "调用GPU进行格式转换，将输入buffer中的数据转换后写入输出buffer中。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/2300/armnative/kunpengcpsvideo_17_0061.html
sourcePath: /source/zh/kunpengboostkithistory/2300/armnative/kunpengcpsvideo_17_0061.html
indexId: def3ef32b68c3312dfc3a6f62b84c788911e3ccb0187202c772f7f1026c0df1b77
---
# Convert

#### 函数功能

调用GPU进行格式转换，将输入buffer中的数据转换后写入输出buffer中。


#### 约束说明

NA


#### 函数原型

int32_t Convert(GpuEncoderBufferT &inBuffer, GpuEncoderBufferT &outBuffer) = 0


#### 参数说明

| 字段名称 | 输入/输出 | 字段类型 | 字段描述 |
| --- | --- | --- | --- |
| inBuffer | 输入 | GpuEncoderBufferT & | 需要进行格式转换的输入buffer |
| outBuffer | 输入 | GpuEncoderBufferT & | 接收格式转换后数据的输出buffer |


#### 返回值说明

数据类型：GpuEncoderErrorCode

取值如下：

- OK：转换buffer格式成功。
- 其他：转换buffer格式失败。
