mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 11:24:05 +00:00
Merge branch 'fix-owf-gop'
This commit is contained in:
commit
b75bd12e81
|
@ -46,6 +46,7 @@ matrix:
|
|||
|
||||
# Tests for GOP, with and without OWF.
|
||||
- env: TEST_FRAMES=20 VALGRIND_TEST="--gop=8 -p0 --threads=2 --wpp --owf=1 --rd=0 --no-rdoq --no-deblock --no-sao --no-signhide --subme=0 --pu-depth-inter=1-3 --pu-depth-intra=2-3"
|
||||
- env: TEST_FRAMES=10 VALGRIND_TEST="--gop=8 -p0 --threads=2 --wpp --owf=4 --rd=0 --no-rdoq --no-deblock --no-sao --no-signhide --subme=0 --pu-depth-inter=1-3 --pu-depth-intra=2-3"
|
||||
- env: TEST_FRAMES=20 VALGRIND_TEST="--gop=8 -p0 --threads=2 --wpp --owf=0 --rd=0 --no-rdoq --no-deblock --no-sao --no-signhide --subme=0 --pu-depth-inter=1-3 --pu-depth-intra=2-3"
|
||||
|
||||
# Tests trying to use invalid input dimensions
|
||||
|
|
|
@ -946,18 +946,16 @@ int kvz_encoder_feed_frame(encoder_state_t *const state, kvz_picture *const img_
|
|||
|
||||
void kvz_encoder_compute_stats(encoder_state_t *state, double frame_psnr[3])
|
||||
{
|
||||
const encoder_control_t * const encoder = state->encoder_control;
|
||||
|
||||
//Blocking call
|
||||
kvz_threadqueue_waitfor(encoder->threadqueue, state->tqj_bitstream_written);
|
||||
assert(state->frame_done);
|
||||
kvz_videoframe_compute_psnr(state->tile->frame, frame_psnr);
|
||||
}
|
||||
|
||||
void kvz_encoder_next_frame(encoder_state_t *state)
|
||||
{
|
||||
const encoder_control_t * const encoder = state->encoder_control;
|
||||
//Blocking call
|
||||
kvz_threadqueue_waitfor(encoder->threadqueue, state->tqj_bitstream_written);
|
||||
|
||||
// The previous frame must be done before the next one is started.
|
||||
assert(state->frame_done);
|
||||
|
||||
if (state->global->frame == -1) {
|
||||
//We're at the first frame, so don't care about all this stuff;
|
||||
|
|
|
@ -152,6 +152,9 @@ static int kvazaar_encode(kvz_encoder *enc,
|
|||
(pic_in == NULL || enc->cur_state_num == enc->out_state_num)) {
|
||||
|
||||
kvz_threadqueue_waitfor(enc->control->threadqueue, output_state->tqj_bitstream_written);
|
||||
// The job pointer must be set to NULL here since it won't be usable after
|
||||
// the next frame is done.
|
||||
output_state->tqj_bitstream_written = NULL;
|
||||
|
||||
// Get stream length before taking chunks since that clears the stream.
|
||||
if (len_out) *len_out = kvz_bitstream_tell(&output_state->stream) / 8;
|
||||
|
|
Loading…
Reference in a new issue