3 * Copyright 2017 Advanced Micro Devices, Inc.
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 * OTHER DEALINGS IN THE SOFTWARE.
31 #define QP_SET_SIZE 15
33 typedef int qp_set
[QP_SET_SIZE
];
36 int rc_quant_incr_limit0
;
37 int rc_quant_incr_limit1
;
38 int initial_fullness_offset
;
39 int initial_xmit_delay
;
40 int first_line_bpg_offset
;
41 int second_line_bpg_offset
;
44 int flatness_det_thresh
;
52 int rc_buf_thresh
[QP_SET_SIZE
- 1];
57 CM_444
, /* 444 YUV or simple 422 */
58 CM_422
, /* native 422 */
59 CM_420
/* native 420 */
78 typedef struct qp_entry qp_table
[];
80 void calc_rc_params(struct rc_params
*rc
, enum colour_mode cm
, enum bits_per_comp bpc
, float bpp
, int slice_width
, int slice_height
, int minor_version
);