delta-mjpeg.h 886 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (C) STMicroelectronics SA 2013
  3. * Author: Hugues Fruchet <hugues.fruchet@st.com> for STMicroelectronics.
  4. * License terms: GNU General Public License (GPL), version 2
  5. */
  6. #ifndef DELTA_MJPEG_H
  7. #define DELTA_MJPEG_H
  8. #include "delta.h"
  9. struct mjpeg_component {
  10. unsigned int id;/* 1=Y, 2=Cb, 3=Cr, 4=L, 5=Q */
  11. unsigned int h_sampling_factor;
  12. unsigned int v_sampling_factor;
  13. unsigned int quant_table_index;
  14. };
  15. #define MJPEG_MAX_COMPONENTS 5
  16. struct mjpeg_header {
  17. unsigned int length;
  18. unsigned int sample_precision;
  19. unsigned int frame_width;
  20. unsigned int frame_height;
  21. unsigned int nb_of_components;
  22. struct mjpeg_component components[MJPEG_MAX_COMPONENTS];
  23. };
  24. int delta_mjpeg_read_header(struct delta_ctx *pctx,
  25. unsigned char *data, unsigned int size,
  26. struct mjpeg_header *header,
  27. unsigned int *data_offset);
  28. #endif /* DELTA_MJPEG_H */