| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM 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 #ifndef TOOLS_COMMON_H_ | 10 #ifndef TOOLS_COMMON_H_ |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 void die_codec(vpx_codec_ctx_t *ctx, const char *s); | 116 void die_codec(vpx_codec_ctx_t *ctx, const char *s); |
| 117 | 117 |
| 118 /* The tool including this file must define usage_exit() */ | 118 /* The tool including this file must define usage_exit() */ |
| 119 void usage_exit(); | 119 void usage_exit(); |
| 120 | 120 |
| 121 uint16_t mem_get_le16(const void *data); | 121 uint16_t mem_get_le16(const void *data); |
| 122 uint32_t mem_get_le32(const void *data); | 122 uint32_t mem_get_le32(const void *data); |
| 123 | 123 |
| 124 int read_yuv_frame(struct VpxInputContext *input_ctx, vpx_image_t *yuv_frame); | 124 int read_yuv_frame(struct VpxInputContext *input_ctx, vpx_image_t *yuv_frame); |
| 125 | 125 |
| 126 vpx_codec_iface_t *get_codec_interface(unsigned int fourcc); | 126 typedef struct VpxInterface { |
| 127 const char *const name; |
| 128 const uint32_t fourcc; |
| 129 vpx_codec_iface_t *(*const interface)(); |
| 130 } VpxInterface; |
| 131 |
| 132 int get_vpx_encoder_count(); |
| 133 const VpxInterface *get_vpx_encoder_by_index(int i); |
| 134 const VpxInterface *get_vpx_encoder_by_name(const char *name); |
| 135 |
| 136 int get_vpx_decoder_count(); |
| 137 const VpxInterface *get_vpx_decoder_by_index(int i); |
| 138 const VpxInterface *get_vpx_decoder_by_name(const char *name); |
| 139 const VpxInterface *get_vpx_decoder_by_fourcc(uint32_t fourcc); |
| 127 | 140 |
| 128 // TODO(dkovalev): move this function to vpx_image.{c, h}, so it will be part | 141 // TODO(dkovalev): move this function to vpx_image.{c, h}, so it will be part |
| 129 // of vpx_image_t support | 142 // of vpx_image_t support |
| 143 int vpx_img_plane_width(const vpx_image_t *img, int plane); |
| 144 int vpx_img_plane_height(const vpx_image_t *img, int plane); |
| 130 void vpx_img_write(const vpx_image_t *img, FILE *file); | 145 void vpx_img_write(const vpx_image_t *img, FILE *file); |
| 146 int vpx_img_read(vpx_image_t *img, FILE *file); |
| 131 | 147 |
| 132 #ifdef __cplusplus | 148 #ifdef __cplusplus |
| 133 } /* extern "C" */ | 149 } /* extern "C" */ |
| 134 #endif | 150 #endif |
| 135 | 151 |
| 136 #endif // TOOLS_COMMON_H_ | 152 #endif // TOOLS_COMMON_H_ |
| OLD | NEW |