xref: /openbmc/linux/drivers/media/platform/verisilicon/hantro_jpeg.h (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
1*fbb6c848SEzequiel Garcia /* SPDX-License-Identifier: GPL-2.0+ */
2*fbb6c848SEzequiel Garcia 
3*fbb6c848SEzequiel Garcia #define JPEG_HEADER_SIZE	624
4*fbb6c848SEzequiel Garcia #define JPEG_QUANT_SIZE		64
5*fbb6c848SEzequiel Garcia 
6*fbb6c848SEzequiel Garcia struct hantro_jpeg_ctx {
7*fbb6c848SEzequiel Garcia 	int width;
8*fbb6c848SEzequiel Garcia 	int height;
9*fbb6c848SEzequiel Garcia 	int quality;
10*fbb6c848SEzequiel Garcia 	unsigned char *buffer;
11*fbb6c848SEzequiel Garcia 	unsigned char hw_luma_qtable[JPEG_QUANT_SIZE];
12*fbb6c848SEzequiel Garcia 	unsigned char hw_chroma_qtable[JPEG_QUANT_SIZE];
13*fbb6c848SEzequiel Garcia };
14*fbb6c848SEzequiel Garcia 
15*fbb6c848SEzequiel Garcia void hantro_jpeg_header_assemble(struct hantro_jpeg_ctx *ctx);
16