Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: source/libvpx/tools_common.c

Issue 1302353004: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/tools_common.h ('k') | source/libvpx/vp8/common/common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/tools_common.c
diff --git a/source/libvpx/tools_common.c b/source/libvpx/tools_common.c
index 8d356af3f54d56b1b6e087ab4705ea39fb22f858..20b259ca94b8405868c06c1a321dc868cc5dcf5c 100644
--- a/source/libvpx/tools_common.c
+++ b/source/libvpx/tools_common.c
@@ -16,11 +16,11 @@
#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
@@ -130,7 +130,13 @@ int read_yuv_frame(struct VpxInputContext *input_ctx, vpx_image_t *yuv_frame) {
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
@@ -160,6 +166,10 @@ const VpxInterface *get_vpx_encoder_by_name(const char *name) {
return NULL;
}
+#endif // CONFIG_ENCODERS
+
+#if CONFIG_DECODERS
+
static const VpxInterface vpx_decoders[] = {
#if CONFIG_VP8_DECODER
{"vp8", VP8_FOURCC, &vpx_codec_vp8_dx},
@@ -168,6 +178,10 @@ static const VpxInterface vpx_decoders[] = {
#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(void) {
@@ -202,6 +216,8 @@ const VpxInterface *get_vpx_decoder_by_fourcc(uint32_t fourcc) {
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) {
@@ -270,7 +286,7 @@ double sse_to_psnr(double samples, double peak, double sse) {
}
// 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.
@@ -483,4 +499,4 @@ void vpx_img_downshift(vpx_image_t *dst, vpx_image_t *src,
lowbd_img_downshift(dst, src, down_shift);
}
}
-#endif // CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
+#endif // CONFIG_VP9_HIGHBITDEPTH
« no previous file with comments | « source/libvpx/tools_common.h ('k') | source/libvpx/vp8/common/common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698