Simplify wavefront handling.

- Move the reconstruction status assignment out of the main for job loop.
This commit is contained in:
Ari Koivula 2015-03-17 11:22:50 +02:00
parent 4a27f79f20
commit 4bec6cec93

View file

@ -409,15 +409,14 @@ static void encoder_state_encode_leaf(encoder_state_t * const state) {
threadqueue_job_unwait_job(state->encoder_control->threadqueue, state->tile->wf_jobs[lcu->id]); threadqueue_job_unwait_job(state->encoder_control->threadqueue, state->tile->wf_jobs[lcu->id]);
} }
}
// In the case where SAO is not enabled, the wavefront row is
// done when the last LCU in the row is done. // In the case where SAO is not enabled, the wavefront row is
if (lcu->position.x == state->tile->frame->width_in_lcu - 1) { // done when the last LCU in the row is done.
if (!state->encoder_control->sao_enable) { if (!state->encoder_control->sao_enable) {
assert(!state->tqj_recon_done); assert(!state->tqj_recon_done);
state->tqj_recon_done = state->tile->wf_jobs[lcu->id]; int last_lcu = state->lcu_order_count - 1;
} state->tqj_recon_done = state->tile->wf_jobs[last_lcu];
}
} }
} }
} }