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 | 10 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 static const VpxInterface vpx_encoders[] = { | 133 static const VpxInterface vpx_encoders[] = { |
134 #if CONFIG_VP8_ENCODER | 134 #if CONFIG_VP8_ENCODER |
135 {"vp8", VP8_FOURCC, &vpx_codec_vp8_cx}, | 135 {"vp8", VP8_FOURCC, &vpx_codec_vp8_cx}, |
136 #endif | 136 #endif |
137 | 137 |
138 #if CONFIG_VP9_ENCODER | 138 #if CONFIG_VP9_ENCODER |
139 {"vp9", VP9_FOURCC, &vpx_codec_vp9_cx}, | 139 {"vp9", VP9_FOURCC, &vpx_codec_vp9_cx}, |
140 #endif | 140 #endif |
141 }; | 141 }; |
142 | 142 |
143 int get_vpx_encoder_count() { | 143 int get_vpx_encoder_count(void) { |
144 return sizeof(vpx_encoders) / sizeof(vpx_encoders[0]); | 144 return sizeof(vpx_encoders) / sizeof(vpx_encoders[0]); |
145 } | 145 } |
146 | 146 |
147 const VpxInterface *get_vpx_encoder_by_index(int i) { | 147 const VpxInterface *get_vpx_encoder_by_index(int i) { |
148 return &vpx_encoders[i]; | 148 return &vpx_encoders[i]; |
149 } | 149 } |
150 | 150 |
151 const VpxInterface *get_vpx_encoder_by_name(const char *name) { | 151 const VpxInterface *get_vpx_encoder_by_name(const char *name) { |
152 int i; | 152 int i; |
153 | 153 |
154 for (i = 0; i < get_vpx_encoder_count(); ++i) { | 154 for (i = 0; i < get_vpx_encoder_count(); ++i) { |
155 const VpxInterface *encoder = get_vpx_encoder_by_index(i); | 155 const VpxInterface *encoder = get_vpx_encoder_by_index(i); |
156 if (strcmp(encoder->name, name) == 0) | 156 if (strcmp(encoder->name, name) == 0) |
157 return encoder; | 157 return encoder; |
158 } | 158 } |
159 | 159 |
160 return NULL; | 160 return NULL; |
161 } | 161 } |
162 | 162 |
163 static const VpxInterface vpx_decoders[] = { | 163 static const VpxInterface vpx_decoders[] = { |
164 #if CONFIG_VP8_DECODER | 164 #if CONFIG_VP8_DECODER |
165 {"vp8", VP8_FOURCC, &vpx_codec_vp8_dx}, | 165 {"vp8", VP8_FOURCC, &vpx_codec_vp8_dx}, |
166 #endif | 166 #endif |
167 | 167 |
168 #if CONFIG_VP9_DECODER | 168 #if CONFIG_VP9_DECODER |
169 {"vp9", VP9_FOURCC, &vpx_codec_vp9_dx}, | 169 {"vp9", VP9_FOURCC, &vpx_codec_vp9_dx}, |
170 #endif | 170 #endif |
171 }; | 171 }; |
172 | 172 |
173 int get_vpx_decoder_count() { | 173 int get_vpx_decoder_count(void) { |
174 return sizeof(vpx_decoders) / sizeof(vpx_decoders[0]); | 174 return sizeof(vpx_decoders) / sizeof(vpx_decoders[0]); |
175 } | 175 } |
176 | 176 |
177 const VpxInterface *get_vpx_decoder_by_index(int i) { | 177 const VpxInterface *get_vpx_decoder_by_index(int i) { |
178 return &vpx_decoders[i]; | 178 return &vpx_decoders[i]; |
179 } | 179 } |
180 | 180 |
181 const VpxInterface *get_vpx_decoder_by_name(const char *name) { | 181 const VpxInterface *get_vpx_decoder_by_name(const char *name) { |
182 int i; | 182 int i; |
183 | 183 |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 | 477 |
478 void vpx_img_downshift(vpx_image_t *dst, vpx_image_t *src, | 478 void vpx_img_downshift(vpx_image_t *dst, vpx_image_t *src, |
479 int down_shift) { | 479 int down_shift) { |
480 if (dst->fmt & VPX_IMG_FMT_HIGHBITDEPTH) { | 480 if (dst->fmt & VPX_IMG_FMT_HIGHBITDEPTH) { |
481 highbd_img_downshift(dst, src, down_shift); | 481 highbd_img_downshift(dst, src, down_shift); |
482 } else { | 482 } else { |
483 lowbd_img_downshift(dst, src, down_shift); | 483 lowbd_img_downshift(dst, src, down_shift); |
484 } | 484 } |
485 } | 485 } |
486 #endif // CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH | 486 #endif // CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH |
OLD | NEW |