mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
Fix owf.
This commit is contained in:
parent
5c28745457
commit
4f4b62b13c
|
@ -323,7 +323,6 @@ int main(int argc, char *argv[])
|
||||||
int first_enc = current_encoder_state;
|
int first_enc = current_encoder_state;
|
||||||
do {
|
do {
|
||||||
double frame_psnr[3] = { 0.0, 0.0, 0.0 };
|
double frame_psnr[3] = { 0.0, 0.0, 0.0 };
|
||||||
current_encoder_state = (current_encoder_state + 1) % (encoder.owf + 1);
|
|
||||||
encoder_state_t *state = &encoder_states[current_encoder_state];
|
encoder_state_t *state = &encoder_states[current_encoder_state];
|
||||||
|
|
||||||
if (!state->stats_done) {
|
if (!state->stats_done) {
|
||||||
|
@ -334,6 +333,8 @@ int main(int argc, char *argv[])
|
||||||
psnr_sum[1] += frame_psnr[1];
|
psnr_sum[1] += frame_psnr[1];
|
||||||
psnr_sum[2] += frame_psnr[2];
|
psnr_sum[2] += frame_psnr[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
current_encoder_state = (current_encoder_state + 1) % (encoder.owf + 1);
|
||||||
} while (current_encoder_state != first_enc);
|
} while (current_encoder_state != first_enc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -844,6 +844,7 @@ void encode_one_frame(encoder_state_t * const state)
|
||||||
char* job_description = NULL;
|
char* job_description = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
state->stats_done = 0;
|
||||||
job = threadqueue_submit(state->encoder_control->threadqueue, encoder_state_worker_write_bitstream, (void*) state, 1, job_description);
|
job = threadqueue_submit(state->encoder_control->threadqueue, encoder_state_worker_write_bitstream, (void*) state, 1, job_description);
|
||||||
|
|
||||||
_encode_one_frame_add_bitstream_deps(state, job);
|
_encode_one_frame_add_bitstream_deps(state, job);
|
||||||
|
@ -1058,7 +1059,7 @@ void encoder_next_frame(encoder_state_t *state) {
|
||||||
//Blocking call
|
//Blocking call
|
||||||
threadqueue_waitfor(encoder->threadqueue, state->tqj_bitstream_written);
|
threadqueue_waitfor(encoder->threadqueue, state->tqj_bitstream_written);
|
||||||
|
|
||||||
state->stats_done = 0;
|
state->stats_done = 1;
|
||||||
|
|
||||||
if (state->global->frame == -1) {
|
if (state->global->frame == -1) {
|
||||||
//We're at the first frame, so don't care about all this stuff;
|
//We're at the first frame, so don't care about all this stuff;
|
||||||
|
|
Loading…
Reference in a new issue