Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improper data at end of slice #32

Open
frankplow opened this issue Feb 9, 2025 · 1 comment
Open

Improper data at end of slice #32

frankplow opened this issue Feb 9, 2025 · 1 comment

Comments

@frankplow
Copy link

The encoder does not seem to terminate slices properly. At the least, it misses the end_of_slice_one_bit syntax element but I think it might also miss the end_of_tile_one_bit syntax element, both of which are required by the specification. There seems to be some code which aims to write this data, but it is commented out:

uvg266/src/encoderstate.c

Lines 902 to 919 in 9c29121

/*
bool end_of_slice_segment_flag;
if (state->encoder_control->cfg.slices & UVG_SLICES_WPP) {
// Slice segments end after each WPP row.
end_of_slice_segment_flag = lcu->last_column;
}
else if (state->encoder_control->cfg.slices & UVG_SLICES_TILES) {
// Slices end after each tile.
end_of_slice_segment_flag = lcu->last_column && lcu->last_row;
}
else {
// Slice ends after the last row of the last tile.
int last_tile_id = -1 + encoder->cfg.tiles_width_count * encoder->cfg.tiles_height_count;
bool is_last_tile = state->tile->id == last_tile_id;
end_of_slice_segment_flag = is_last_tile && lcu->last_column && lcu->last_row;
}
//uvg_cabac_encode_bin_trm(&state->cabac, end_of_slice_segment_flag);
*/

@Eric3495
Copy link

Eric3495 commented Feb 9, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants