Chromium Code Reviews| Index: webrtc/modules/video_coding/utility/vp9_uncomp_header_parser.h |
| diff --git a/webrtc/modules/video_coding/utility/vp9_uncomp_header_parser.h b/webrtc/modules/video_coding/utility/vp9_uncomp_header_parser.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5edaaff61501445f844efa8c88a50fe0a4f4a2d9 |
| --- /dev/null |
| +++ b/webrtc/modules/video_coding/utility/vp9_uncomp_header_parser.h |
| @@ -0,0 +1,36 @@ |
| +/* |
| + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
| + * |
| + * Use of this source code is governed by a BSD-style license |
| + * that can be found in the LICENSE file in the root of the source |
| + * tree. An additional intellectual property rights grant can be found |
| + * in the file PATENTS. All contributing project authors may |
| + * be found in the AUTHORS file in the root of the source tree. |
| + */ |
| + |
| +#ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_VP9_UNCOMP_HEADER_PARSER_H_ |
| +#define WEBRTC_MODULES_VIDEO_CODING_UTILITY_VP9_UNCOMP_HEADER_PARSER_H_ |
| + |
| +#include <stdint.h> |
| +#include <stdio.h> |
|
brandtr
2017/05/19 14:10:27
Do you need this?
jianj1
2017/05/19 21:20:56
size_t will need it. I changed it to <stddef.h>
|
| + |
| +namespace webrtc { |
| + |
| +namespace vp9 { |
| + |
| +typedef struct VP9BitReader VP9BitReader; |
|
brandtr
2017/05/19 14:10:27
Don't think you would need this in C++.
jianj1
2017/05/19 21:20:56
Done.
|
| +struct VP9BitReader { |
| + const uint8_t *buf_; |
|
brandtr
2017/05/19 14:10:27
Although the style guide allows it, we typically p
jianj1
2017/05/19 21:20:57
Done.
|
| + const uint8_t *buf_end_; |
| + size_t offset_; |
| +}; |
| + |
| +// Gets the QP, QP range: [0, 255]. |
| +// Returns true on success, false otherwise. |
| +bool GetQp(const uint8_t *buf, size_t length, int *qp); |
|
brandtr
2017/05/19 14:10:27
const uint8_t*
jianj1
2017/05/19 21:20:56
Done.
|
| + |
| +} // namespace vp9 |
| + |
| +} // namespace webrtc |
| + |
| +#endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_VP9_UNCOMP_HEADER_PARSER_H_ |