resolve parallel encryption

This commit is contained in:
Wassim Hamidouche 2016-11-15 14:48:46 +01:00 committed by Ari Koivula
parent b8a618e666
commit da3e2d1d07
2 changed files with 5 additions and 8 deletions

View file

@ -113,13 +113,6 @@ static int encoder_state_config_tile_init(encoder_state_t * const state,
state->tile->wf_jobs = NULL; state->tile->wf_jobs = NULL;
} }
state->tile->id = encoder->tiles_tile_id[state->tile->lcu_offset_in_ts]; state->tile->id = encoder->tiles_tile_id[state->tile->lcu_offset_in_ts];
state->tile->dbs_g = NULL;
if (state->encoder_control->cfg->crypto_features) {
state->tile->dbs_g = InitC();
}
state->tile->m_prev_pos = 0;
return 1; return 1;
} }

View file

@ -297,7 +297,11 @@ static void encoder_state_encode_leaf(encoder_state_t * const state) {
assert(state->lcu_order_count > 0); assert(state->lcu_order_count > 0);
const kvz_config *cfg = state->encoder_control->cfg; const kvz_config *cfg = state->encoder_control->cfg;
if ( state->encoder_control->cfg->crypto_features) {
DeleteCryptoC(state->tile->dbs_g);
state->tile->dbs_g = InitC();
state->tile->m_prev_pos = 0;
}
// Select whether to encode the frame/tile in current thread or to define // Select whether to encode the frame/tile in current thread or to define
// wavefront jobs for other threads to handle. // wavefront jobs for other threads to handle.
bool wavefront = state->type == ENCODER_STATE_TYPE_WAVEFRONT_ROW; bool wavefront = state->type == ENCODER_STATE_TYPE_WAVEFRONT_ROW;