Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / drivers / media / platform / sti / delta / delta-mjpeg.h
blob43f7a88b6e591c9fdbe21bc45e0b24694bb40194
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Copyright (C) STMicroelectronics SA 2013
4 * Author: Hugues Fruchet <hugues.fruchet@st.com> for STMicroelectronics.
5 */
7 #ifndef DELTA_MJPEG_H
8 #define DELTA_MJPEG_H
10 #include "delta.h"
12 struct mjpeg_component {
13 unsigned int id;/* 1=Y, 2=Cb, 3=Cr, 4=L, 5=Q */
14 unsigned int h_sampling_factor;
15 unsigned int v_sampling_factor;
16 unsigned int quant_table_index;
19 #define MJPEG_MAX_COMPONENTS 5
21 struct mjpeg_header {
22 unsigned int length;
23 unsigned int sample_precision;
24 unsigned int frame_width;
25 unsigned int frame_height;
26 unsigned int nb_of_components;
27 struct mjpeg_component components[MJPEG_MAX_COMPONENTS];
30 int delta_mjpeg_read_header(struct delta_ctx *pctx,
31 unsigned char *data, unsigned int size,
32 struct mjpeg_header *header,
33 unsigned int *data_offset);
35 #endif /* DELTA_MJPEG_H */