#include "./tools_common.h"
-#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER
+#if CONFIG_VP8_ENCODER || CONFIG_VP9_ENCODER || CONFIG_VP10_ENCODER
#include "vpx/vp8cx.h"
#endif
-#if CONFIG_VP8_DECODER || CONFIG_VP9_DECODER
+#if CONFIG_VP8_DECODER || CONFIG_VP9_DECODER || CONFIG_VP10_DECODER
#include "vpx/vp8dx.h"
#endif
return shortread;
}
+#if CONFIG_ENCODERS
+
static const VpxInterface vpx_encoders[] = {
+#if CONFIG_VP10_ENCODER
+ {"vp10", VP10_FOURCC, &vpx_codec_vp10_cx},
+#endif
+
#if CONFIG_VP8_ENCODER
{"vp8", VP8_FOURCC, &vpx_codec_vp8_cx},
#endif
#endif
};
-int get_vpx_encoder_count() {
+int get_vpx_encoder_count(void) {
return sizeof(vpx_encoders) / sizeof(vpx_encoders[0]);
}
return NULL;
}
+#endif // CONFIG_ENCODERS
+
+#if CONFIG_DECODERS
+
static const VpxInterface vpx_decoders[] = {
#if CONFIG_VP8_DECODER
{"vp8", VP8_FOURCC, &vpx_codec_vp8_dx},
#if CONFIG_VP9_DECODER
{"vp9", VP9_FOURCC, &vpx_codec_vp9_dx},
#endif
+
+#if CONFIG_VP10_DECODER
+ {"vp10", VP10_FOURCC, &vpx_codec_vp10_dx},
+#endif
};
-int get_vpx_decoder_count() {
+int get_vpx_decoder_count(void) {
return sizeof(vpx_decoders) / sizeof(vpx_decoders[0]);
}
return NULL;
}
+#endif // CONFIG_DECODERS
+
// TODO(dkovalev): move this function to vpx_image.{c, h}, so it will be part
// of vpx_image_t support
int vpx_img_plane_width(const vpx_image_t *img, int plane) {
}
// TODO(debargha): Consolidate the functions below into a separate file.
-#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
+#if CONFIG_VP9_HIGHBITDEPTH
static void highbd_img_upshift(vpx_image_t *dst, vpx_image_t *src,
int input_shift) {
// Note the offset is 1 less than half.
(uint16_t *)(src->planes[plane] + y * src->stride[plane]);
uint8_t *p_dst = dst->planes[plane] + y * dst->stride[plane];
for (x = 0; x < w; x++) {
- *p_dst++ = *p_src++;
+ *p_dst++ = (uint8_t)(*p_src++);
}
}
}
lowbd_img_downshift(dst, src, down_shift);
}
}
-#endif // CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
+#endif // CONFIG_VP9_HIGHBITDEPTH