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

esp_new_jpeg block decoding questions #38

Open
3 tasks done
hyzgit opened this issue Oct 16, 2024 · 1 comment
Open
3 tasks done

esp_new_jpeg block decoding questions #38

hyzgit opened this issue Oct 16, 2024 · 1 comment

Comments

@hyzgit
Copy link

hyzgit commented Oct 16, 2024

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate.
  • Provided a clear description of your suggestion.
  • Included any relevant context or examples.

Issue or Suggestion Description

for (int block_cnt = 0; block_cnt < process_count; block_cnt++)
{
ret = jpeg_dec_process(jpeg_dec, jpeg_io);
if (ret != JPEG_ERR_OK)
{
goto jpeg_dec_failed;
}
}

In the code above, how do you know the corresponding position and width and height of each block

@TempoTian
Copy link
Contributor

Block is devided by height. Width is the same for each block, block height can be estimated by block_height = height / block_count which is aligned to 16 (subsampling YUV420) or 8 others.

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