| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 void die_codec(vpx_codec_ctx_t *ctx, const char *s); | 113 void die_codec(vpx_codec_ctx_t *ctx, const char *s); |
| 114 | 114 |
| 115 /* The tool including this file must define usage_exit() */ | 115 /* The tool including this file must define usage_exit() */ |
| 116 void usage_exit(); | 116 void usage_exit(); |
| 117 | 117 |
| 118 int read_yuv_frame(struct VpxInputContext *input_ctx, vpx_image_t *yuv_frame); | 118 int read_yuv_frame(struct VpxInputContext *input_ctx, vpx_image_t *yuv_frame); |
| 119 | 119 |
| 120 typedef struct VpxInterface { | 120 typedef struct VpxInterface { |
| 121 const char *const name; | 121 const char *const name; |
| 122 const uint32_t fourcc; | 122 const uint32_t fourcc; |
| 123 vpx_codec_iface_t *(*const interface)(); | 123 vpx_codec_iface_t *(*const codec_interface)(); |
| 124 } VpxInterface; | 124 } VpxInterface; |
| 125 | 125 |
| 126 int get_vpx_encoder_count(); | 126 int get_vpx_encoder_count(); |
| 127 const VpxInterface *get_vpx_encoder_by_index(int i); | 127 const VpxInterface *get_vpx_encoder_by_index(int i); |
| 128 const VpxInterface *get_vpx_encoder_by_name(const char *name); | 128 const VpxInterface *get_vpx_encoder_by_name(const char *name); |
| 129 | 129 |
| 130 int get_vpx_decoder_count(); | 130 int get_vpx_decoder_count(); |
| 131 const VpxInterface *get_vpx_decoder_by_index(int i); | 131 const VpxInterface *get_vpx_decoder_by_index(int i); |
| 132 const VpxInterface *get_vpx_decoder_by_name(const char *name); | 132 const VpxInterface *get_vpx_decoder_by_name(const char *name); |
| 133 const VpxInterface *get_vpx_decoder_by_fourcc(uint32_t fourcc); | 133 const VpxInterface *get_vpx_decoder_by_fourcc(uint32_t fourcc); |
| 134 | 134 |
| 135 // TODO(dkovalev): move this function to vpx_image.{c, h}, so it will be part | 135 // TODO(dkovalev): move this function to vpx_image.{c, h}, so it will be part |
| 136 // of vpx_image_t support | 136 // of vpx_image_t support |
| 137 int vpx_img_plane_width(const vpx_image_t *img, int plane); | 137 int vpx_img_plane_width(const vpx_image_t *img, int plane); |
| 138 int vpx_img_plane_height(const vpx_image_t *img, int plane); | 138 int vpx_img_plane_height(const vpx_image_t *img, int plane); |
| 139 void vpx_img_write(const vpx_image_t *img, FILE *file); | 139 void vpx_img_write(const vpx_image_t *img, FILE *file); |
| 140 int vpx_img_read(vpx_image_t *img, FILE *file); | 140 int vpx_img_read(vpx_image_t *img, FILE *file); |
| 141 | 141 |
| 142 double sse_to_psnr(double samples, double peak, double mse); | 142 double sse_to_psnr(double samples, double peak, double mse); |
| 143 | 143 |
| 144 #ifdef __cplusplus | 144 #ifdef __cplusplus |
| 145 } /* extern "C" */ | 145 } /* extern "C" */ |
| 146 #endif | 146 #endif |
| 147 | 147 |
| 148 #endif // TOOLS_COMMON_H_ | 148 #endif // TOOLS_COMMON_H_ |
| OLD | NEW |