~ubuntu-branches/ubuntu/wily/libde265/wily

« back to all changes in this revision

Viewing changes to libde265/de265.h

  • Committer: Package Import Robot
  • Author(s): Joachim Bauch
  • Date: 2015-07-16 11:07:46 UTC
  • mfrom: (2.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20150716110746-76vsv24j3yux7tnu
Tags: 1.0.2-1
* Imported Upstream version 1.0.2
* Added new files to copyright information.
* Only export decoder API and update symbols for new version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
LIBDE265_API const char *de265_get_version(void);
73
73
LIBDE265_API uint32_t de265_get_version_number(void);
74
74
 
 
75
LIBDE265_API int de265_get_version_number_major(void);
 
76
LIBDE265_API int de265_get_version_number_minor(void);
 
77
LIBDE265_API int de265_get_version_number_maintenance(void);
 
78
 
75
79
 
76
80
/* === error codes === */
77
81
 
79
83
  DE265_OK = 0,
80
84
  DE265_ERROR_NO_SUCH_FILE=1,
81
85
  //DE265_ERROR_NO_STARTCODE=2,  obsolet
82
 
  DE265_ERROR_EOF=3,
 
86
  //DE265_ERROR_EOF=3,
83
87
  DE265_ERROR_COEFFICIENT_OUT_OF_IMAGE_BOUNDS=4,
84
88
  DE265_ERROR_CHECKSUM_MISMATCH=5,
85
89
  DE265_ERROR_CTB_OUTSIDE_IMAGE_AREA=6,
91
95
  DE265_ERROR_LIBRARY_NOT_INITIALIZED=12,
92
96
  DE265_ERROR_WAITING_FOR_INPUT_DATA=13,
93
97
  DE265_ERROR_CANNOT_PROCESS_SEI=14,
 
98
  DE265_ERROR_PARAMETER_PARSING=15,
 
99
  DE265_ERROR_NO_INITIAL_SLICE_HEADER=16,
 
100
  DE265_ERROR_PREMATURE_END_OF_SLICE=17,
 
101
  DE265_ERROR_UNSPECIFIED_DECODING_ERROR=18,
94
102
 
95
103
  // --- errors that should become obsolete in later libde265 versions ---
96
104
 
97
 
  DE265_ERROR_MAX_THREAD_CONTEXTS_EXCEEDED = 500,
98
 
  DE265_ERROR_MAX_NUMBER_OF_SLICES_EXCEEDED = 501,
 
105
  //DE265_ERROR_MAX_THREAD_CONTEXTS_EXCEEDED = 500, obsolet
 
106
  //DE265_ERROR_MAX_NUMBER_OF_SLICES_EXCEEDED = 501, obsolet
 
107
  DE265_ERROR_NOT_IMPLEMENTED_YET = 502,
99
108
  //DE265_ERROR_SCALING_LIST_NOT_IMPLEMENTED = 502, obsolet
100
109
 
101
110
  // --- warnings ---
125
134
  DE265_WARNING_NUMBER_OF_THREADS_LIMITED_TO_MAXIMUM=1022,
126
135
  DE265_NON_EXISTING_LT_REFERENCE_CANDIDATE_IN_SLICE_HEADER=1023,
127
136
  DE265_WARNING_CANNOT_APPLY_SAO_OUT_OF_MEMORY=1024,
128
 
  DE265_WARNING_SPS_MISSING_CANNOT_DECODE_SEI=1025
 
137
  DE265_WARNING_SPS_MISSING_CANNOT_DECODE_SEI=1025,
 
138
  DE265_WARNING_COLLOCATED_MOTION_VECTOR_OUTSIDE_IMAGE_AREA=1026
129
139
} de265_error;
130
140
 
131
141
LIBDE265_API const char* de265_get_error_text(de265_error err);
148
158
 
149
159
enum de265_chroma {
150
160
  de265_chroma_mono=0,
151
 
  de265_chroma_420=1,  // currently the only used format
 
161
  de265_chroma_420=1,
152
162
  de265_chroma_422=2,
153
163
  de265_chroma_444=3
154
164
};
159
169
LIBDE265_API int de265_get_image_width(const struct de265_image*,int channel);
160
170
LIBDE265_API int de265_get_image_height(const struct de265_image*,int channel);
161
171
LIBDE265_API enum de265_chroma de265_get_chroma_format(const struct de265_image*);
 
172
LIBDE265_API int de265_get_bits_per_pixel(const struct de265_image*,int channel);
 
173
/* The |out_stride| is returned as "bytes per line" if a non-NULL parameter is given. */
162
174
LIBDE265_API const uint8_t* de265_get_image_plane(const struct de265_image*, int channel, int* out_stride);
163
175
LIBDE265_API void* de265_get_image_plane_user_data(const struct de265_image*, int channel);
164
176
LIBDE265_API de265_PTS de265_get_image_PTS(const struct de265_image*);
312
324
 
313
325
struct de265_image_allocation
314
326
{
315
 
  int  (*get_buffer)(de265_decoder_context* ctx,
 
327
  int  (*get_buffer)(de265_decoder_context* ctx, // first parameter deprecated
316
328
                     struct de265_image_spec* spec,
317
329
                     struct de265_image* img,
318
330
                     void* userdata);
319
 
  void (*release_buffer)(de265_decoder_context* ctx,
 
331
  void (*release_buffer)(de265_decoder_context* ctx, // first parameter deprecated
320
332
                         struct de265_image* img,
321
333
                         void* userdata);
322
334
};
384
396
  de265_acceleration_SSE4 = 40,
385
397
  de265_acceleration_AVX  = 50,    // not implemented yet
386
398
  de265_acceleration_AVX2 = 60,    // not implemented yet
 
399
  de265_acceleration_ARM  = 70,
 
400
  de265_acceleration_NEON = 80,
387
401
  de265_acceleration_AUTO = 10000
388
402
};
389
403