mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-24 02:24:07 +00:00
Merge branch 'fix-tiles-sao'
This commit is contained in:
commit
d20c9ab30f
|
@ -351,29 +351,29 @@ static void encoder_sao_reconstruct(const encoder_state_t *const state,
|
|||
// Copy pixels that will be filtered and bordering pixels from right and
|
||||
// below.
|
||||
const int from_index = (lcu->position_px.x + x_offsets[0]) +
|
||||
(lcu->position_px.y + y_offsets[0]) * frame->width;
|
||||
(lcu->position_px.y + y_offsets[0]) * frame->rec->stride;
|
||||
const int to_index = x_offsets[0] + y_offsets[0] * SAO_BUF_WIDTH;
|
||||
kvz_pixels_blit(&frame->rec->y[from_index],
|
||||
&sao_buf_y[to_index],
|
||||
width + border_right,
|
||||
height + border_below,
|
||||
frame->width,
|
||||
frame->rec->stride,
|
||||
SAO_BUF_WIDTH);
|
||||
if (state->encoder_control->chroma_format != KVZ_CSP_400) {
|
||||
const int from_index_c = (lcu->position_px.x + x_offsets[0])/2 +
|
||||
(lcu->position_px.y + y_offsets[0])/2 * frame->width/2;
|
||||
(lcu->position_px.y + y_offsets[0])/2 * frame->rec->stride/2;
|
||||
const int to_index_c = x_offsets[0]/2 + y_offsets[0]/2 * SAO_BUF_WIDTH_C;
|
||||
kvz_pixels_blit(&frame->rec->u[from_index_c],
|
||||
&sao_buf_u[to_index_c],
|
||||
width/2 + border_right,
|
||||
height/2 + border_below,
|
||||
frame->width/2,
|
||||
frame->rec->stride/2,
|
||||
SAO_BUF_WIDTH_C);
|
||||
kvz_pixels_blit(&frame->rec->v[from_index_c],
|
||||
&sao_buf_v[to_index_c],
|
||||
width/2 + border_right,
|
||||
height/2 + border_below,
|
||||
frame->width/2,
|
||||
frame->rec->stride/2,
|
||||
SAO_BUF_WIDTH_C);
|
||||
}
|
||||
|
||||
|
|
|
@ -291,7 +291,8 @@ void kvz_sao_reconstruct(const encoder_state_t *state,
|
|||
|
||||
const int frame_width = frame->width >> shift;
|
||||
const int frame_height = frame->height >> shift;
|
||||
kvz_pixel *output = &frame->rec->data[color][frame_x + frame_y * frame_width];
|
||||
const int frame_stride = frame->rec->stride >> shift;
|
||||
kvz_pixel *output = &frame->rec->data[color][frame_x + frame_y * frame_stride];
|
||||
|
||||
if (sao->type == SAO_TYPE_EDGE) {
|
||||
const vector2d_t *offset = g_sao_edge_offsets[sao->eo_class];
|
||||
|
@ -317,7 +318,7 @@ void kvz_sao_reconstruct(const encoder_state_t *state,
|
|||
if (frame_y + offset[0].y < 0 || frame_y + offset[1].y < 0) {
|
||||
// Nothing to do for the topmost row.
|
||||
buffer += stride;
|
||||
output += frame_width;
|
||||
output += frame_stride;
|
||||
height -= 1;
|
||||
}
|
||||
}
|
||||
|
@ -328,7 +329,7 @@ void kvz_sao_reconstruct(const encoder_state_t *state,
|
|||
output,
|
||||
sao,
|
||||
stride,
|
||||
frame_width,
|
||||
frame_stride,
|
||||
width,
|
||||
height,
|
||||
color);
|
||||
|
|
|
@ -7,10 +7,12 @@
|
|||
set -eu
|
||||
. "${0%/*}/util.sh"
|
||||
|
||||
common_args='-p4 --rd=0 --no-rdoq --no-deblock --no-sao --no-signhide --subme=0 --pu-depth-inter=1-3 --pu-depth-intra=2-3'
|
||||
common_args='-p4 --rd=0 --no-rdoq --no-signhide --subme=0 --deblock --sao --pu-depth-inter=1-3 --pu-depth-intra=2-3'
|
||||
valgrind_test 264x130 10 $common_args -r1 --owf=1 --threads=0 --no-wpp
|
||||
valgrind_test 264x130 10 $common_args -r1 --owf=0 --threads=0 --no-wpp
|
||||
valgrind_test 264x130 10 $common_args -r2 --owf=1 --threads=2 --wpp
|
||||
valgrind_test 264x130 10 $common_args -r2 --owf=0 --threads=2 --no-wpp
|
||||
valgrind_test 264x130 10 $common_args -r2 --owf=1 --threads=2 --tiles-height-split=u2 --no-wpp
|
||||
valgrind_test 264x130 10 $common_args -r2 --owf=0 --threads=2 --tiles-height-split=u2 --no-wpp
|
||||
valgrind_test 512x512 3 $common_args -r2 --owf=1 --threads=2 --tiles=2x2 --no-wpp
|
||||
valgrind_test 512x512 3 $common_args -r2 --owf=0 --threads=2 --tiles=2x2 --no-wpp
|
||||
|
|
Loading…
Reference in a new issue