linux/drivers/media/platform/sti/delta/delta-mjpeg.h
<<
>>
Prefs
   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 */
   6
   7#ifndef DELTA_MJPEG_H
   8#define DELTA_MJPEG_H
   9
  10#include "delta.h"
  11
  12struct 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;
  17};
  18
  19#define MJPEG_MAX_COMPONENTS 5
  20
  21struct 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];
  28};
  29
  30int 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);
  34
  35#endif /* DELTA_MJPEG_H */
  36