ref: c0061cc24f254d648737986ce14ac1a4bcb45874
parent: fe4b663559eb244b69faa8dbc7c9e75de06845ff
parent: 5f732c2031549ee9bf546b88335fda7633b7a9d0
author: Marco Paniconi <[email protected]>
date: Mon Jul 7 13:07:13 EDT 2014
Merge "Fix build for examples/vp8_multi_resolution_encoder."
--- a/examples.mk
+++ b/examples.mk
@@ -179,7 +179,8 @@
ifeq ($(CONFIG_MULTI_RES_ENCODING),yes)
ifeq ($(CONFIG_LIBYUV),yes)
-EXAMPLES-$(CONFIG_VP8_DECODER) += vp8_multi_resolution_encoder.c
+EXAMPLES-$(CONFIG_VP8_ENCODER) += vp8_multi_resolution_encoder.c
+vp8_multi_resolution_encoder.SRCS += tools_common.h tools_common.c
vp8_multi_resolution_encoder.SRCS += $(LIBYUV_SRCS)
vp8_multi_resolution_encoder.GUID = 04f8738e-63c8-423b-90fa-7c2703a374de
vp8_multi_resolution_encoder.DESCRIPTION = VP8 Multiple-resolution Encoding
--- a/examples/vp8_multi_resolution_encoder.c
+++ b/examples/vp8_multi_resolution_encoder.c
@@ -27,8 +27,9 @@
#define interface (vpx_codec_vp8_cx())
#define fourcc 0x30385056
-#define IVF_FILE_HDR_SZ (32)
-#define IVF_FRAME_HDR_SZ (12)
+void usage_exit() {
+ exit(EXIT_FAILURE);
+}
/*
* The input video frame is downsampled several times to generate a multi-level
@@ -44,25 +45,6 @@
#include "third_party/libyuv/include/libyuv/basic_types.h"
#include "third_party/libyuv/include/libyuv/scale.h"
#include "third_party/libyuv/include/libyuv/cpu_id.h"
-
-static void die(const char *fmt, ...) {
- va_list ap;
-
- va_start(ap, fmt);
- vprintf(fmt, ap);
- if(fmt[strlen(fmt)-1] != '\n')
- printf("\n");
- exit(EXIT_FAILURE);
-}
-
-static void die_codec(vpx_codec_ctx_t *ctx, const char *s) {
- const char *detail = vpx_codec_error_detail(ctx);
-
- printf("%s: %s\n", s, vpx_codec_error(ctx));
- if(detail)
- printf(" %s\n",detail);
- exit(EXIT_FAILURE);
-}
int (*read_frame_p)(FILE *f, vpx_image_t *img);