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

#### 函数功能

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


#### 函数原型

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


#### 参数说明

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


#### 返回值说明

数据类型：GpuEncoderErrorCode

取值如下：

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