OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2012 The LibYuv Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 // image scanlines. | 146 // image scanlines. |
147 // TODO(fbarchard): Add dst_x, dst_y to allow specific rect to be decoded. | 147 // TODO(fbarchard): Add dst_x, dst_y to allow specific rect to be decoded. |
148 LIBYUV_BOOL DecodeToCallback(CallbackFunction fn, void* opaque, | 148 LIBYUV_BOOL DecodeToCallback(CallbackFunction fn, void* opaque, |
149 int dst_width, int dst_height); | 149 int dst_width, int dst_height); |
150 | 150 |
151 // The helper function which recognizes the jpeg sub-sampling type. | 151 // The helper function which recognizes the jpeg sub-sampling type. |
152 static JpegSubsamplingType JpegSubsamplingTypeHelper( | 152 static JpegSubsamplingType JpegSubsamplingTypeHelper( |
153 int* subsample_x, int* subsample_y, int number_of_components); | 153 int* subsample_x, int* subsample_y, int number_of_components); |
154 | 154 |
155 private: | 155 private: |
156 | |
157 void AllocOutputBuffers(int num_outbufs); | 156 void AllocOutputBuffers(int num_outbufs); |
158 void DestroyOutputBuffers(); | 157 void DestroyOutputBuffers(); |
159 | 158 |
160 LIBYUV_BOOL StartDecode(); | 159 LIBYUV_BOOL StartDecode(); |
161 LIBYUV_BOOL FinishDecode(); | 160 LIBYUV_BOOL FinishDecode(); |
162 | 161 |
163 void SetScanlinePointers(uint8** data); | 162 void SetScanlinePointers(uint8** data); |
164 LIBYUV_BOOL DecodeImcuRow(); | 163 LIBYUV_BOOL DecodeImcuRow(); |
165 | 164 |
166 int GetComponentScanlinePadding(int component); | 165 int GetComponentScanlinePadding(int component); |
(...skipping 17 matching lines...) Expand all Loading... |
184 // Temporary buffer used for decoding when we can't decode directly to the | 183 // Temporary buffer used for decoding when we can't decode directly to the |
185 // output buffers. Large enough for just one iMCU row. | 184 // output buffers. Large enough for just one iMCU row. |
186 uint8** databuf_; | 185 uint8** databuf_; |
187 int* databuf_strides_; | 186 int* databuf_strides_; |
188 }; | 187 }; |
189 | 188 |
190 } // namespace libyuv | 189 } // namespace libyuv |
191 | 190 |
192 #endif // __cplusplus | 191 #endif // __cplusplus |
193 #endif // INCLUDE_LIBYUV_MJPEG_DECODER_H_ NOLINT | 192 #endif // INCLUDE_LIBYUV_MJPEG_DECODER_H_ NOLINT |
OLD | NEW |