@@ -795,8 +795,8 @@ static int enc_tile_comp(oapv_bs_t *bs, oapve_tile_t *tile, oapve_ctx_t *ctx, oa
795795 ctx -> fn_imgb_to_blk [c ](o16 , OAPV_BLK_W , OAPV_BLK_H , s_org , blk_x , (OAPV_BLK_W << 1 ), core -> coef , ctx -> bit_depth );
796796
797797 ctx -> fn_enc_blk (ctx , core , OAPV_LOG2_BLK_W , OAPV_LOG2_BLK_H , c );
798- oapve_vlc_dc_coef (ctx , core , bs , core -> dc_diff , c );
799- oapve_vlc_ac_coef (ctx , core , bs , core -> coef , 0 , c );
798+ oapve_vlc_dc_coef (bs , core -> dc_diff , & core -> kparam_dc [ c ] );
799+ oapve_vlc_ac_coef (bs , core -> coef , & core -> kparam_ac [ c ] );
800800 DUMP_COEF (core -> coef , OAPV_BLK_D , blk_x , blk_y , c );
801801
802802 if (rec != NULL ) {
@@ -867,8 +867,8 @@ static int enc_tile(oapve_ctx_t *ctx, oapve_core_t *core, oapve_tile_t *tile)
867867 }
868868
869869 for (int c = 0 ; c < ctx -> num_comp ; c ++ ) {
870- core -> prev_dc_ctx [c ] = 20 ;
871- core -> prev_1st_ac_ctx [c ] = 0 ;
870+ core -> kparam_dc [c ] = OAPV_KPARAM_DC_MAX ;
871+ core -> kparam_ac [c ] = OAPV_KPARAM_AC_MIN ;
872872 core -> prev_dc [c ] = 0 ;
873873
874874 int tc , s_org , s_rec ;
@@ -913,7 +913,6 @@ static int enc_tile(oapve_ctx_t *ctx, oapve_core_t *core, oapve_tile_t *tile)
913913 tile -> bs_size = bs_size ;
914914
915915 oapv_bs_t bs_th ;
916- bs_th .is_bin_count = 0 ;
917916 oapv_bsw_init (& bs_th , tile -> bs_buf , tile -> bs_size , NULL );
918917 tile -> tile_size = bs_size - OAPV_TILE_SIZE_LEN ;
919918
0 commit comments