summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2014-04-15 18:42:17 +0000
committerjstebbins <[email protected]>2014-04-15 18:42:17 +0000
commitc6c85528383812a0d11c8ce035b1584f35624f7c (patch)
tree30409e8e361022168d608cda17bc1abe1b2c515e
parentc973315226c1009f2cadc8a14e5219c1ef5d69c2 (diff)
Add VP8 support
Thanks to Matthew Harvey for this patch git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6165 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--contrib/ffmpeg/module.defs3
-rw-r--r--contrib/libvpx/module.defs22
-rw-r--r--contrib/libvpx/module.rules2
-rw-r--r--gtk/configure.ac2
-rw-r--r--gtk/src/callbacks.c1
-rw-r--r--gtk/src/hb-backend.c1
-rw-r--r--libhb/common.c13
-rw-r--r--libhb/common.h1
-rw-r--r--libhb/encavcodec.c260
-rw-r--r--libhb/module.defs4
-rw-r--r--libhb/muxavformat.c6
-rw-r--r--libhb/muxmkv.c5
-rw-r--r--libhb/work.c4
-rw-r--r--macosx/HandBrake.xcodeproj/project.pbxproj6
-rw-r--r--make/include/contrib.defs2
-rw-r--r--make/include/main.defs1
-rw-r--r--test/module.defs2
17 files changed, 230 insertions, 105 deletions
diff --git a/contrib/ffmpeg/module.defs b/contrib/ffmpeg/module.defs
index b6ce56411..b7d0b07d8 100644
--- a/contrib/ffmpeg/module.defs
+++ b/contrib/ffmpeg/module.defs
@@ -31,6 +31,9 @@ FFMPEG.CONFIGURE.extra = \
--enable-encoder=flac \
--enable-encoder=mpeg2video \
--enable-encoder=mpeg4 \
+ --enable-libvpx \
+ --enable-encoder=libvpx_vp8 \
+ --disable-decoder=libvpx_vp8 \
--enable-zlib \
--enable-bzlib \
--cc="$(FFMPEG.GCC.gcc)" \
diff --git a/contrib/libvpx/module.defs b/contrib/libvpx/module.defs
new file mode 100644
index 000000000..c2c0c4aea
--- /dev/null
+++ b/contrib/libvpx/module.defs
@@ -0,0 +1,22 @@
+$(eval $(call import.MODULE.defs,LIBVPX,libvpx,YASM))
+$(eval $(call import.CONTRIB.defs,LIBVPX))
+
+LIBVPX.FETCH.url = http://download.handbrake.fr/contrib/libvpx-v1.3.0.tar.bz2
+
+LIBVPX.CONFIGURE.env.LD = LD=$(subst CC=,,$(LIBVPX.CONFIGURE.env.CC))
+
+LIBVPX.CONFIGURE.args.host =
+LIBVPX.CONFIGURE.deps =
+LIBVPX.CONFIGURE.extra = \
+ --enable-vp8-encoder \
+ --disable-vp9 \
+ --disable-vp8-decoder \
+ --disable-examples \
+ --disable-docs \
+ --disable-unit-tests
+
+ifeq (1-i686,$(BUILD.cross)-$(BUILD.machine))
+ LIBVPX.CONFIGURE.extra += --target=x86-win32-gcc
+else ifeq (1-x86_64,$(BUILD.cross)-$(BUILD.machine))
+ LIBVPX.CONFIGURE.extra += --target=x86_64-win64-gcc
+endif
diff --git a/contrib/libvpx/module.rules b/contrib/libvpx/module.rules
new file mode 100644
index 000000000..db1d4921f
--- /dev/null
+++ b/contrib/libvpx/module.rules
@@ -0,0 +1,2 @@
+$(eval $(call import.MODULE.rules,LIBVPX))
+$(eval $(call import.CONTRIB.rules,LIBVPX))
diff --git a/gtk/configure.ac b/gtk/configure.ac
index 6d0ecfce8..52da947b0 100644
--- a/gtk/configure.ac
+++ b/gtk/configure.ac
@@ -171,7 +171,7 @@ fi
GHB_TOOLS_CFLAGS=`$BUILD_PKG_CONFIG --cflags glib-2.0 gdk-pixbuf-2.0`
GHB_TOOLS_LIBS=`$BUILD_PKG_CONFIG --libs glib-2.0 gdk-pixbuf-2.0`
-HB_LIBS="-lhandbrake -lavresample -lavformat -lavcodec -lavutil -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lsamplerate -lx264 -lswscale -ltheoraenc -ltheoradec -lz -lbz2 -lpthread -lbluray -lass -lfontconfig -lfreetype -lxml2"
+HB_LIBS="-lhandbrake -lavresample -lavformat -lavcodec -lavutil -ldvdnav -ldvdread -lmp3lame -lvorbis -lvorbisenc -logg -lsamplerate -lx264 -lswscale -ltheoraenc -ltheoradec -lvpx -lz -lbz2 -lpthread -lbluray -lass -lfontconfig -lfreetype -lxml2"
case $host in
*-*-mingw*)
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index 4b4e076a0..4c77c1670 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -4892,6 +4892,7 @@ format_vquality_cb(GtkScale *scale, gdouble val, signal_user_data_t *ud)
{
case HB_VCODEC_FFMPEG_MPEG4:
case HB_VCODEC_FFMPEG_MPEG2:
+ case HB_VCODEC_FFMPEG_VP8:
case HB_VCODEC_THEORA:
{
return g_strdup_printf("%s: %d", vqname, (int)val);
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index 737814c5d..b54c9fc32 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -4234,6 +4234,7 @@ ghb_validate_vquality(GValue *settings)
} break;
case HB_VCODEC_THEORA:
+ case HB_VCODEC_FFMPEG_VP8:
{
min = 0;
max = 63;
diff --git a/libhb/common.c b/libhb/common.c
index 8e9c02f22..25bc74f69 100644
--- a/libhb/common.c
+++ b/libhb/common.c
@@ -43,6 +43,7 @@ enum
HB_GID_VCODEC_MPEG2,
HB_GID_VCODEC_MPEG4,
HB_GID_VCODEC_THEORA,
+ HB_GID_VCODEC_VP8,
HB_GID_ACODEC_AAC,
HB_GID_ACODEC_AAC_HE,
HB_GID_ACODEC_AAC_PASS,
@@ -209,6 +210,7 @@ hb_encoder_internal_t hb_video_encoders[] =
{ { "H.265 (x265)", "x265", "H.265 (libx265)", HB_VCODEC_X265, HB_MUX_AV_MP4|HB_MUX_AV_MKV, }, NULL, 1, HB_GID_VCODEC_H265, },
{ { "MPEG-4", "mpeg4", "MPEG-4 (libavcodec)", HB_VCODEC_FFMPEG_MPEG4, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_VCODEC_MPEG4, },
{ { "MPEG-2", "mpeg2", "MPEG-2 (libavcodec)", HB_VCODEC_FFMPEG_MPEG2, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_VCODEC_MPEG2, },
+ { { "VP8", "VP8", "VP8 (libvpx)", HB_VCODEC_FFMPEG_VP8, HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_VCODEC_VP8, },
{ { "Theora", "theora", "Theora (libtheora)", HB_VCODEC_THEORA, HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_VCODEC_THEORA, },
};
int hb_video_encoders_count = sizeof(hb_video_encoders) / sizeof(hb_video_encoders[0]);
@@ -227,6 +229,7 @@ static int hb_video_encoder_is_enabled(int encoder)
case HB_VCODEC_THEORA:
case HB_VCODEC_FFMPEG_MPEG4:
case HB_VCODEC_FFMPEG_MPEG2:
+ case HB_VCODEC_FFMPEG_VP8:
#ifdef USE_X265
case HB_VCODEC_X265:
#endif
@@ -1119,6 +1122,13 @@ void hb_video_quality_get_limits(uint32_t codec, float *low, float *high,
*high = 63.;
break;
+ case HB_VCODEC_FFMPEG_VP8:
+ *direction = 1;
+ *granularity = 1.;
+ *low = 0.;
+ *high = 63.;
+ break;
+
case HB_VCODEC_FFMPEG_MPEG2:
case HB_VCODEC_FFMPEG_MPEG4:
default:
@@ -1147,6 +1157,9 @@ const char* hb_video_quality_get_name(uint32_t codec)
#endif
return "RF";
+ case HB_VCODEC_FFMPEG_VP8:
+ return "CQ";
+
default:
return "QP";
}
diff --git a/libhb/common.h b/libhb/common.h
index 97ac820df..d85c7224b 100644
--- a/libhb/common.h
+++ b/libhb/common.h
@@ -449,6 +449,7 @@ struct hb_job_s
#define HB_VCODEC_X265 0x0000004
#define HB_VCODEC_FFMPEG_MPEG4 0x0000010
#define HB_VCODEC_FFMPEG_MPEG2 0x0000020
+#define HB_VCODEC_FFMPEG_VP8 0x0000040
#define HB_VCODEC_FFMPEG_MASK 0x00000F0
#define HB_VCODEC_QSV_H264 0x0000100
#define HB_VCODEC_QSV_MASK 0x0000F00
diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c
index 844c62777..127e1249d 100644
--- a/libhb/encavcodec.c
+++ b/libhb/encavcodec.c
@@ -77,6 +77,10 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job )
{
hb_log("encavcodecInit: MPEG-2 encoder");
} break;
+ case AV_CODEC_ID_VP8:
+ {
+ hb_log("encavcodecInit: VP8 encoder");
+ } break;
default:
{
hb_error("encavcodecInit: unsupported encoder!");
@@ -89,6 +93,7 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job )
{
hb_log( "encavcodecInit: avcodec_find_encoder "
"failed" );
+ return 1;
}
context = avcodec_alloc_context3( codec );
@@ -192,8 +197,28 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job )
// what was previously used
context->flags |= CODEC_FLAG_QSCALE;
context->global_quality = FF_QP2LAMBDA * job->vquality + 0.5;
- hb_log( "encavcodec: encoding at constant quantizer %d",
- context->global_quality );
+ //Set constant quality for libvpx
+ if ( w->codec_param == AV_CODEC_ID_VP8 )
+ {
+ char quality[7];
+ snprintf(quality, 7, "%.2f", job->vquality);
+ av_dict_set( &av_opts, "crf", quality, 0 );
+ //Setting the deadline to good and cpu-used to 0
+ //causes the encoder to balance video quality and
+ //encode time, with a bias to video quality.
+ av_dict_set( &av_opts, "deadline", "good", 0);
+ av_dict_set( &av_opts, "cpu-used", "0", 0);
+ //This value was chosen to make the bitrate high enough
+ //for libvpx to "turn off" the maximum bitrate feature
+ //that is normally applied to constant quality.
+ context->bit_rate = job->width*job->height*( (double)fps.num / (double)fps.den );
+ hb_log( "encavcodec: encoding at CQ %.2f", job->vquality );
+ }
+ else
+ {
+ hb_log( "encavcodec: encoding at constant quantizer %d",
+ context->global_quality );
+ }
}
context->width = job->width;
context->height = job->height;
@@ -336,6 +361,63 @@ static void compute_dts_offset( hb_work_private_t * pv, hb_buffer_t * buf )
}
}
+static uint8_t convert_pict_type( int pict_type, char pkt_flag_key, uint16_t* sflags )
+{
+ uint8_t retval = 0;
+ switch ( pict_type )
+ {
+ case AV_PICTURE_TYPE_P:
+ {
+ retval = HB_FRAME_P;
+ } break;
+
+ case AV_PICTURE_TYPE_B:
+ {
+ retval = HB_FRAME_B;
+ } break;
+
+ case AV_PICTURE_TYPE_S:
+ {
+ retval = HB_FRAME_P;
+ } break;
+
+ case AV_PICTURE_TYPE_SP:
+ {
+ retval = HB_FRAME_P;
+ } break;
+
+ case AV_PICTURE_TYPE_BI:
+ case AV_PICTURE_TYPE_SI:
+ case AV_PICTURE_TYPE_I:
+ {
+ *sflags |= HB_FRAME_REF;
+ if ( pkt_flag_key )
+ {
+ retval = HB_FRAME_IDR;
+ }
+ else
+ {
+ retval = HB_FRAME_I;
+ }
+ } break;
+
+ default:
+ {
+ if ( pkt_flag_key )
+ {
+ //buf->s.flags |= HB_FRAME_REF;
+ *sflags |= HB_FRAME_REF;
+ retval = HB_FRAME_KEY;
+ }
+ else
+ {
+ retval = HB_FRAME_REF;
+ }
+ } break;
+ }
+ return retval;
+}
+
// Generate DTS by rearranging PTS in this sequence:
// pts0 - delay, pts1 - delay, pts2 - delay, pts1, pts2, pts3...
//
@@ -433,120 +515,98 @@ int encavcodecWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
hb_job_t * job = pv->job;
AVFrame * frame;
hb_buffer_t * in = *buf_in, * buf;
-
- if ( in->size <= 0 )
+ char final_flushing_call = (in->size <= 0);
+ if ( final_flushing_call )
{
+ //make a flushing call to encode for codecs that can encode out of order
/* EOF on input - send it downstream & say we're done */
- *buf_out = in;
*buf_in = NULL;
- return HB_WORK_DONE;
+ frame = NULL;
+ }
+ else
+ {
+ frame = av_frame_alloc();
+ frame->data[0] = in->plane[0].data;
+ frame->data[1] = in->plane[1].data;
+ frame->data[2] = in->plane[2].data;
+ frame->linesize[0] = in->plane[0].stride;
+ frame->linesize[1] = in->plane[1].stride;
+ frame->linesize[2] = in->plane[2].stride;
+
+ // For constant quality, setting the quality in AVCodecContext
+ // doesn't do the trick. It must be set in the AVFrame.
+ frame->quality = pv->context->global_quality;
+
+ // Remember info about this frame that we need to pass across
+ // the avcodec_encode_video call (since it reorders frames).
+ save_frame_info( pv, in );
+ compute_dts_offset( pv, in );
+
+ // Bizarro ffmpeg appears to require the input AVFrame.pts to be
+ // set to a frame number. Setting it to an actual pts causes
+ // jerky video.
+ // frame->pts = in->s.start;
+ frame->pts = pv->frameno_in++;
}
-
- frame = av_frame_alloc();
- frame->data[0] = in->plane[0].data;
- frame->data[1] = in->plane[1].data;
- frame->data[2] = in->plane[2].data;
- frame->linesize[0] = in->plane[0].stride;
- frame->linesize[1] = in->plane[1].stride;
- frame->linesize[2] = in->plane[2].stride;
-
- // For constant quality, setting the quality in AVCodecContext
- // doesn't do the trick. It must be set in the AVFrame.
- frame->quality = pv->context->global_quality;
-
- // Remember info about this frame that we need to pass across
- // the avcodec_encode_video call (since it reorders frames).
- save_frame_info( pv, in );
- compute_dts_offset( pv, in );
-
- // Bizarro ffmpeg appears to require the input AVFrame.pts to be
- // set to a frame number. Setting it to an actual pts causes
- // jerky video.
- // frame->pts = in->s.start;
- frame->pts = pv->frameno_in++;
if ( pv->context->codec )
{
int ret;
AVPacket pkt;
int got_packet;
+ char still_flushing = final_flushing_call;
+ hb_buffer_t* buf_head = NULL;
+ hb_buffer_t* buf_last = NULL;
- av_init_packet(&pkt);
- /* Should be way too large */
- buf = hb_video_buffer_init( job->width, job->height );
- pkt.data = buf->data;
- pkt.size = buf->alloc;
-
- ret = avcodec_encode_video2( pv->context, &pkt, frame, &got_packet );
- if ( ret < 0 || pkt.size <= 0 || !got_packet )
- {
- hb_buffer_close( &buf );
- }
- else
+ do
{
- int64_t frameno = pkt.pts;
- buf->size = pkt.size;
- buf->s.start = get_frame_start( pv, frameno );
- buf->s.duration = get_frame_duration( pv, frameno );
- buf->s.stop = buf->s.stop + buf->s.duration;
- buf->s.flags &= ~HB_FRAME_REF;
- switch ( pv->context->coded_frame->pict_type )
+ av_init_packet(&pkt);
+ /* Should be way too large */
+ buf = hb_video_buffer_init( job->width, job->height );
+ pkt.data = buf->data;
+ pkt.size = buf->alloc;
+
+ ret = avcodec_encode_video2( pv->context, &pkt, frame, &got_packet );
+ if ( ret < 0 || pkt.size <= 0 || !got_packet )
{
- case AV_PICTURE_TYPE_P:
- {
- buf->s.frametype = HB_FRAME_P;
- } break;
-
- case AV_PICTURE_TYPE_B:
- {
- buf->s.frametype = HB_FRAME_B;
- } break;
-
- case AV_PICTURE_TYPE_S:
- {
- buf->s.frametype = HB_FRAME_P;
- } break;
-
- case AV_PICTURE_TYPE_SP:
- {
- buf->s.frametype = HB_FRAME_P;
- } break;
-
- case AV_PICTURE_TYPE_BI:
- case AV_PICTURE_TYPE_SI:
- case AV_PICTURE_TYPE_I:
+ hb_buffer_close( &buf );
+ still_flushing = 0;
+ }
+ else
+ {
+ int64_t frameno = pkt.pts;
+ buf->size = pkt.size;
+ buf->s.start = get_frame_start( pv, frameno );
+ buf->s.duration = get_frame_duration( pv, frameno );
+ buf->s.stop = buf->s.stop + buf->s.duration;
+ buf->s.flags &= ~HB_FRAME_REF;
+ buf->s.frametype = convert_pict_type( pv->context->coded_frame->pict_type, pkt.flags & AV_PKT_FLAG_KEY, &buf->s.flags );
+ buf = process_delay_list( pv, buf );
+
+ if (buf_head == NULL)
{
- buf->s.flags |= HB_FRAME_REF;
- if ( pkt.flags & AV_PKT_FLAG_KEY )
- {
- buf->s.frametype = HB_FRAME_IDR;
- }
- else
- {
- buf->s.frametype = HB_FRAME_I;
- }
- } break;
-
- default:
+ buf_head = buf;
+ }
+ else
{
- if ( pkt.flags & AV_PKT_FLAG_KEY )
- {
- buf->s.flags |= HB_FRAME_REF;
- buf->s.frametype = HB_FRAME_KEY;
- }
- else
- {
- buf->s.frametype = HB_FRAME_REF;
- }
- } break;
+ buf_last->next = buf;
+ }
+ buf_last = buf;
+ }
+ /* Write stats */
+ if (job->pass == 1 && pv->context->stats_out != NULL)
+ {
+ fprintf( pv->file, "%s", pv->context->stats_out );
}
- buf = process_delay_list( pv, buf );
+ } while (still_flushing);
+ if (buf_last != NULL && final_flushing_call)
+ {
+ buf_last->next = in;
+ buf = buf_head;
}
-
- if( job->pass == 1 )
+ else if (final_flushing_call)
{
- /* Write stats */
- fprintf( pv->file, "%s", pv->context->stats_out );
+ buf = in;
}
}
else
@@ -556,11 +616,11 @@ int encavcodecWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
hb_error( "encavcodec: codec context has uninitialized codec; skipping frame" );
}
- av_frame_free(&frame);
+ av_frame_free( &frame );
*buf_out = buf;
- return HB_WORK_OK;
+ return final_flushing_call? HB_WORK_DONE : HB_WORK_OK;
}
diff --git a/libhb/module.defs b/libhb/module.defs
index 73a3b6999..d0a2da131 100644
--- a/libhb/module.defs
+++ b/libhb/module.defs
@@ -1,4 +1,4 @@
-__deps__ := A52DEC BZIP2 FFMPEG FONTCONFIG FREETYPE LAME LIBASS LIBDCA \
+__deps__ := A52DEC BZIP2 LIBVPX FFMPEG FONTCONFIG FREETYPE LAME LIBASS LIBDCA \
LIBDVDREAD LIBDVDNAV LIBICONV LIBMKV LIBOGG LIBSAMPLERATE LIBTHEORA LIBVORBIS LIBXML2 \
MP4V2 PTHREADW32 X264 X265 ZLIB LIBBLURAY FDKAAC LIBMFX
@@ -116,7 +116,7 @@ LIBHB.lib = $(LIBHB.build/)hb.lib
LIBHB.dll.libs = $(foreach n, \
ass avcodec avformat avutil avresample dvdnav dvdread \
fontconfig freetype mp3lame \
- ogg samplerate swscale theora vorbis vorbisenc x264 xml2 bluray, \
+ ogg samplerate swscale vpx theora vorbis vorbisenc x264 xml2 bluray, \
$(CONTRIB.build/)lib/lib$(n).a )
ifeq (1,$(FEATURE.fdk_aac))
diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c
index de8680e17..9037dc074 100644
--- a/libhb/muxavformat.c
+++ b/libhb/muxavformat.c
@@ -280,6 +280,12 @@ static int avformatInit( hb_mux_object_t * m )
}
break;
+ case HB_VCODEC_FFMPEG_VP8:
+ track->st->codec->codec_id = AV_CODEC_ID_VP8;
+ priv_data = NULL;
+ priv_size = 0;
+ break;
+
case HB_VCODEC_THEORA:
{
track->st->codec->codec_id = AV_CODEC_ID_THEORA;
diff --git a/libhb/muxmkv.c b/libhb/muxmkv.c
index 1250a681e..4a8de8a37 100644
--- a/libhb/muxmkv.c
+++ b/libhb/muxmkv.c
@@ -180,6 +180,11 @@ static int MKVInit( hb_mux_object_t * m )
if (job->areBframes)
track->minCache = 1;
break;
+ case HB_VCODEC_FFMPEG_VP8:
+ track->codecID = "V_VP8";
+ track->codecPrivate = NULL;
+ track->codecPrivateSize = 0;
+ break;
case HB_VCODEC_THEORA:
{
int i;
diff --git a/libhb/work.c b/libhb/work.c
index 92e8692d0..5c8c38bed 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -1248,6 +1248,10 @@ static void do_job(hb_job_t *job)
w = hb_get_work( WORK_ENCAVCODEC );
w->codec_param = AV_CODEC_ID_MPEG2VIDEO;
break;
+ case HB_VCODEC_FFMPEG_VP8:
+ w = hb_get_work( WORK_ENCAVCODEC );
+ w->codec_param = AV_CODEC_ID_VP8;
+ break;
case HB_VCODEC_X264:
w = hb_get_work( WORK_ENCX264 );
break;
diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj
index 621a2559e..ab057ed40 100644
--- a/macosx/HandBrake.xcodeproj/project.pbxproj
+++ b/macosx/HandBrake.xcodeproj/project.pbxproj
@@ -9,6 +9,8 @@
/* Begin PBXBuildFile section */
226268E01572CC7300477B4E /* libavresample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226268DF1572CC7300477B4E /* libavresample.a */; };
226268E11572CC7300477B4E /* libavresample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226268DF1572CC7300477B4E /* libavresample.a */; };
+ 22DD2C4A177B94DB00EF50D3 /* libvpx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22DD2C49177B94DB00EF50D3 /* libvpx.a */; };
+ 22DD2C4B177B95DA00EF50D3 /* libvpx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22DD2C49177B94DB00EF50D3 /* libvpx.a */; };
273F202314ADB8650021BE6D /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 273F202214ADB8650021BE6D /* IOKit.framework */; };
273F202614ADB8A40021BE6D /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 273F202514ADB8A40021BE6D /* libz.dylib */; };
273F202814ADB8BE0021BE6D /* libbz2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 273F202714ADB8BE0021BE6D /* libbz2.dylib */; };
@@ -192,6 +194,7 @@
/* Begin PBXFileReference section */
226268DF1572CC7300477B4E /* libavresample.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libavresample.a; path = external/contrib/lib/libavresample.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ 22DD2C49177B94DB00EF50D3 /* libvpx.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvpx.a; path = external//contrib/lib/libvpx.a; sourceTree = BUILT_PRODUCTS_DIR; };
271BA4C014B119F800BC1D2C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; name = Info.plist; path = external/macosx/Info.plist; sourceTree = BUILT_PRODUCTS_DIR; };
271E74EF182F260C0077C311 /* osx109.i386.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = osx109.i386.xcconfig; sourceTree = "<group>"; };
271E74F0182F260C0077C311 /* osx109.x86_64.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = osx109.x86_64.xcconfig; sourceTree = "<group>"; };
@@ -348,6 +351,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 22DD2C4B177B95DA00EF50D3 /* libvpx.a in Frameworks */,
273F203014ADB9790021BE6D /* AudioToolbox.framework in Frameworks */,
273F202314ADB8650021BE6D /* IOKit.framework in Frameworks */,
273F203314ADB9F00021BE6D /* CoreServices.framework in Frameworks */,
@@ -382,6 +386,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 22DD2C4A177B94DB00EF50D3 /* libvpx.a in Frameworks */,
A9E1467B16BC2ABD00C307BC /* QuartzCore.framework in Frameworks */,
273F21C114ADE7A20021BE6D /* Growl.framework in Frameworks */,
273F21C214ADE7BC0021BE6D /* Sparkle.framework in Frameworks */,
@@ -458,6 +463,7 @@
273F1FDE14AD9DA40021BE6D = {
isa = PBXGroup;
children = (
+ 22DD2C49177B94DB00EF50D3 /* libvpx.a */,
273F204114ADBC210021BE6D /* HandBrake */,
273F200214ADAE950021BE6D /* HandBrakeCLI */,
273F200014ADAE950021BE6D /* Products */,
diff --git a/make/include/contrib.defs b/make/include/contrib.defs
index fffddb8ca..800f1c56c 100644
--- a/make/include/contrib.defs
+++ b/make/include/contrib.defs
@@ -108,7 +108,7 @@ define import.CONTRIB.defs
$(1).CONFIGURE.env.LDFLAGS = LDFLAGS="-L$$(call fn.ABSOLUTE,$(CONTRIB.build/))lib $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?extra.exe *D)"
$(1).CONFIGURE.env.PKG_CONFIG_PATH = PKG_CONFIG_PATH="$$(call fn.ABSOLUTE,$$(CONTRIB.build/))lib/pkgconfig"
- $(1).CONFIGURE.env.args = !CC !CFLAGS !CXX !CXXFLAGS !CPPFLAGS !LDFLAGS !PKG_CONFIG_PATH !LOCAL_PATH
+ $(1).CONFIGURE.env.args = !CC !CFLAGS !CXX !CXXFLAGS !CPPFLAGS !LD !LDFLAGS !PKG_CONFIG_PATH !LOCAL_PATH
$(1).CONFIGURE.env = $$(call fn.ARGS,$(1).CONFIGURE.env,$$($(1).CONFIGURE.env.args))
$(1).CONFIGURE.target = $$($(1).build/).stamp.configure
diff --git a/make/include/main.defs b/make/include/main.defs
index d3276067c..513afe116 100644
--- a/make/include/main.defs
+++ b/make/include/main.defs
@@ -59,6 +59,7 @@ endif
MODULES += contrib/lame
MODULES += contrib/ffmpeg
+MODULES += contrib/libvpx
MODULES += contrib/libdvdread
MODULES += contrib/libdvdnav
MODULES += contrib/libbluray
diff --git a/test/module.defs b/test/module.defs
index 09b61b1ae..4c81c2c26 100644
--- a/test/module.defs
+++ b/test/module.defs
@@ -16,7 +16,7 @@ TEST.libs = $(LIBHB.a)
TEST.GCC.l = \
ass avcodec avformat avutil avresample dvdnav dvdread \
fontconfig fribidi mp3lame ogg \
- samplerate swscale theoraenc theoradec vorbis vorbisenc x264 \
+ samplerate swscale vpx theoraenc theoradec vorbis vorbisenc x264 \
bluray freetype xml2 bz2 z
ifeq (1,$(FEATURE.qsv))