Skip to content

Commit 50b896f

Browse files
committed
changed type of q_matrix and qp scale value
Signed-off-by: kp5.choi@samsung.com <kp5.choi@samsung.com>
1 parent b3b886c commit 50b896f

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/oapv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ static int enc_tile(oapve_ctx_t *ctx, oapve_core_t *core, oapve_tile_t *tile)
853853
core->dq_shift[c] = ctx->bit_depth - 2 - (core->qp[c] / 6);
854854

855855
int cnt = 0;
856-
int dq_scale = oapv_tbl_dq_scale[core->qp[c] % 6];
856+
u8 dq_scale = oapv_tbl_dq_scale[core->qp[c] % 6];
857857
for(int y = 0; y < OAPV_BLK_H; y++) {
858858
for(int x = 0; x < OAPV_BLK_W; x++) {
859859
core->q_mat_dec[c][cnt++] = dq_scale * ctx->fh.q_matrix[c][y][x];
@@ -1675,7 +1675,7 @@ static int dec_tile(oapvd_core_t *core, oapvd_tile_t *tile)
16751675

16761676
for(c = 0; c < ctx->num_comp; c++) {
16771677
core->qp[c] = tile->th.tile_qp[c];
1678-
int dq_scale = oapv_tbl_dq_scale[core->qp[c] % 6];
1678+
u8 dq_scale = oapv_tbl_dq_scale[core->qp[c] % 6];
16791679
core->dq_shift[c] = ctx->bit_depth - 2 - (core->qp[c] / 6);
16801680

16811681
core->kparam_dc[c] = OAPV_KPARAM_DC_MAX;

src/oapv_def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ struct oapv_fh {
125125
int full_range_flag; /* u( 1) */
126126
int use_q_matrix; /* u( 1) */
127127
/* (start) quantization_matrix */
128-
int q_matrix[N_C][OAPV_BLK_H][OAPV_BLK_W]; /* u( 8) */
128+
u8 q_matrix[N_C][OAPV_BLK_H][OAPV_BLK_W]; /* u( 8) */
129129
/* ( end ) quantization_matrix */
130130
/* (start) tile_info */
131131
int tile_width_in_mbs; /* u(20) */

src/oapv_tbl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const s8 oapv_tbl_tm8[8][8] = {
7979
{ 18,-50, 75,-89, 89,-75, 50,-18}
8080
};
8181

82-
const int oapv_tbl_dq_scale[6] = {40, 45, 51, 57, 64, 71};
82+
const u8 oapv_tbl_dq_scale[6] = {40, 45, 51, 57, 64, 71};
8383

8484
const u8 oapv_tbl_scan[OAPV_BLK_D] = {
8585
0, 1, 8, 16, 9, 2, 3, 10,

src/oapv_tbl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
extern const u8 oapv_tbl_log2[257];
3838
extern const s8 oapv_tbl_tm8[8][8];
39-
extern const int oapv_tbl_dq_scale[6];
39+
extern const u8 oapv_tbl_dq_scale[6];
4040
extern const u8 oapv_tbl_scan[OAPV_BLK_D];
4141
extern int oapv_itrans_diff[64][64];
4242
extern const u16 oapve_tbl_vlc_code[100][5][2];

0 commit comments

Comments
 (0)