OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 #ifndef MEDIA_FILTERS_JPEG_PARSER_H_ | 5 #ifndef MEDIA_FILTERS_JPEG_PARSER_H_ |
6 #define MEDIA_FILTERS_JPEG_PARSER_H_ | 6 #define MEDIA_FILTERS_JPEG_PARSER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 uint8_t id; | 33 uint8_t id; |
34 uint8_t horizontal_sampling_factor; | 34 uint8_t horizontal_sampling_factor; |
35 uint8_t vertical_sampling_factor; | 35 uint8_t vertical_sampling_factor; |
36 uint8_t quantization_table_selector; | 36 uint8_t quantization_table_selector; |
37 }; | 37 }; |
38 | 38 |
39 // Parsing result of a JPEG SOF marker. | 39 // Parsing result of a JPEG SOF marker. |
40 struct JpegFrameHeader { | 40 struct JpegFrameHeader { |
41 uint16_t visible_width; | 41 uint16_t visible_width; |
42 uint16_t visible_height; | 42 uint16_t visible_height; |
| 43 uint16_t coded_width; |
| 44 uint16_t coded_height; |
43 uint8_t num_components; | 45 uint8_t num_components; |
44 JpegComponent components[kJpegMaxComponents]; | 46 JpegComponent components[kJpegMaxComponents]; |
45 }; | 47 }; |
46 | 48 |
47 // Parsing result of JPEG SOS marker. | 49 // Parsing result of JPEG SOS marker. |
48 struct JpegScanHeader { | 50 struct JpegScanHeader { |
49 uint8_t num_components; | 51 uint8_t num_components; |
50 struct Component { | 52 struct Component { |
51 uint8_t component_selector; | 53 uint8_t component_selector; |
52 uint8_t dc_selector; | 54 uint8_t dc_selector; |
(...skipping 19 matching lines...) Expand all Loading... |
72 // baseline sequential process. For explanations of each struct and its | 74 // baseline sequential process. For explanations of each struct and its |
73 // members, see JPEG specification at | 75 // members, see JPEG specification at |
74 // http://www.w3.org/Graphics/JPEG/itu-t81.pdf. | 76 // http://www.w3.org/Graphics/JPEG/itu-t81.pdf. |
75 MEDIA_EXPORT bool ParseJpegPicture(const uint8_t* buffer, | 77 MEDIA_EXPORT bool ParseJpegPicture(const uint8_t* buffer, |
76 size_t length, | 78 size_t length, |
77 JpegParseResult* result); | 79 JpegParseResult* result); |
78 | 80 |
79 } // namespace media | 81 } // namespace media |
80 | 82 |
81 #endif // MEDIA_FILTERS_JPEG_PARSER_H_ | 83 #endif // MEDIA_FILTERS_JPEG_PARSER_H_ |
OLD | NEW |