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

#### 函数功能

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


#### 函数原型

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


#### 参数说明

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


#### 返回值说明

数据类型：GpuEncoderErrorCode

取值如下：

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