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

Hardware JPEG decoder #4576

Merged
merged 5 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions core/embed/gfx/bitblt/dma2d_bitblt.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef TREZORHAL_DMA2D_BITBLT_H
#define TREZORHAL_DMA2D_BITBLT_H
#pragma once

#include <gfx/gfx_bitblt.h>

Expand Down Expand Up @@ -50,4 +49,8 @@ bool dma2d_rgba8888_copy_rgba8888(const gfx_bitblt_t* bb);
bool dma2d_rgba8888_blend_mono4(const gfx_bitblt_t* bb);
bool dma2d_rgba8888_blend_mono8(const gfx_bitblt_t* bb);

#endif // TREZORHAL_DMA2D_BITBLT_H
#ifdef USE_HW_JPEG_DECODER
bool dma2d_rgba8888_copy_ycbcr420(const gfx_bitblt_t* bb);
bool dma2d_rgba8888_copy_ycbcr422(const gfx_bitblt_t* bb);
bool dma2d_rgba8888_copy_ycbcr444(const gfx_bitblt_t* bb);
#endif
4 changes: 2 additions & 2 deletions core/embed/gfx/bitblt/gfx_bitblt_rgba8888.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ void gfx_rgba8888_copy_rgba8888(const gfx_bitblt_t* bb) {

while (height-- > 0) {
for (int x = 0; x < bb->width; x++) {
dst_ptr[x] = src_ptr[x];
dst_ptr[x] = src_ptr[x << bb->src_downscale];
}
dst_ptr += bb->dst_stride / sizeof(*dst_ptr);
src_ptr += bb->src_stride / sizeof(*src_ptr);
src_ptr += (bb->src_stride / sizeof(*src_ptr)) << bb->src_downscale;
}
}
}
Expand Down
Loading