Project Name  Version 1.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
jh_jpeg_wrap.h
Go to the documentation of this file.
1 /******************************************************************************
2  * This program is protected under international and U.S. copyright laws as *
3  * an unpublished work. This program is confidential and proprietary to the *
4  * copyright owners. Reproduction or disclosure, in whole or in part, or the *
5  * production of derivative works therefrom without the express permission of *
6  * the copyright owners is prohibited. *
7  * *
8  * Copyright (C) 2011-2012 by Dolby Laboratories. *
9  * All rights reserved. *
10  ******************************************************************************/
11 
17 #ifndef JH_JPEG_WRAP_H
18 #define JH_JPEG_WRAP_H
19 #include "jh_datatypes.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 #define JH_FORMAT_VERSION_MAJOR (2)
26 #define JH_FORMAT_VERSION_MINOR (1)
27 #define JH_ID_STRING "DD"
28 #define JH_PARAM_SEGMENT "<ln0=%f><ln1=%f><s2n=%e><cb0=%f><cb1=%f><cr0=%f><cr1=%f><nf=%f>"
29 
30 #define LIB_VERSION "0.2.0"
31 
32 #define JH_MAX_HEADER_SIZE (1024*8)
33 
42 typedef struct jh_jpegwrap_params_ts {
43  int width;
44  int height;
45  int scale_num;
50 
56 extern int jh_jpeg_compress(
57  const jh_image_t *sbi,
58  unsigned qual,
59  jh_stream_t* stream,
60  jh_error_t* error,
63  int debug
64 );
65 
70  const jh_image_t *sdri,
72  unsigned qual,
73  unsigned char* m11,
74  unsigned* m11_sizes,
76  unsigned char* icc,
77  unsigned icc_size,
78  jh_stream_t* stream,
79  jh_error_t* error,
81  int debug
82 );
83 
89 extern void jh_jpeg_release(
90  unsigned char** jpg_buffer
92 );
93 
98  unsigned char* jpg,
99  size_t jpg_size,
100  int* width,
101  int* height,
102  unsigned char** icc,
103  int* icc_size,
104  unsigned char** tmi,
106  unsigned char** sbi,
108  char* header,
109  int probe_header,
111  jh_jpegwrap_params_t* opts,
113  jh_error_t* error,
115  jh_monitor_t *monitorv
117 );
118 
122  void* inbuffer,
123  int size,
124  int* width,
125  int* height,
126  int* channels,
127  char* message
129 );
130  /* end of defgroup jpegwrap */
132 
133 #ifdef __cplusplus
134 }
135 #endif
136 #endif /*JH_JPEG_WRAP_H*/
137