---
title: FrameScaling
description: "设置期望编码宽高。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/2530/armnative15/kunpengcpsvideo_16_0114.html
sourcePath: /source/zh/kunpengboostkithistory/2530/armnative15/kunpengcpsvideo_16_0114.html
indexId: aa41add6fde4de0a167b69c797af29c16477297be658639e7e6e27cea230026e79
---
# FrameScaling

#### 函数功能

设置期望编码宽高。


#### 约束说明

如配置参数中所示的参数类型，会经由此参数透传至FrameScaling入参中；配置参数中的配置参数的相关约束此处仍然存在。

二次开发者也可直接调用此接口，实现YUV帧缩放功能。


#### 函数原型

EncoderRetCode FrameScaling(uint32_t width, uint32_t height)


#### 参数说明

width：uint32_t类型，期望编码宽度。该类字段如下：

| 字段名称 | 输入/输出 | 字段类型 | 字段描述 |
| --- | --- | --- | --- |
| width | 输入 | uint32\_t | 期望编码宽度。 |


height：uint32_t类型，期望编码高度。该类字段如下：

| 字段名称 | 输入/输出 | 字段类型 | 字段描述 |
| --- | --- | --- | --- |
| height | 输入 | uint32\_t | 期望编码高度。 |


#### 返回值说明

数据类型：EncoderRetCode

取值如下：

- VIDEO_ENCODER_SUCCESS：成功。
- VIDEO_ENCODER_SET_ENCODE_PARAMS_FAIL：失败。
