]> granicus.if.org Git - handbrake/commitdiff
Add VP8 support
authorjstebbins <jstebbins.hb@gmail.com>
Tue, 15 Apr 2014 18:42:17 +0000 (18:42 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Tue, 15 Apr 2014 18:42:17 +0000 (18:42 +0000)
Thanks to Matthew Harvey for this patch

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6165 b64f7644-9d1e-0410-96f1-a4d463321fa5

17 files changed:
contrib/ffmpeg/module.defs
contrib/libvpx/module.defs [new file with mode: 0644]
contrib/libvpx/module.rules [new file with mode: 0644]
gtk/configure.ac
gtk/src/callbacks.c
gtk/src/hb-backend.c
libhb/common.c
libhb/common.h
libhb/encavcodec.c
libhb/module.defs
libhb/muxavformat.c
libhb/muxmkv.c
libhb/work.c
macosx/HandBrake.xcodeproj/project.pbxproj
make/include/contrib.defs
make/include/main.defs
test/module.defs

index b6ce564115131bcfabdc4c0e8ccb6b84e72c7457..b7d0b07d89bf61084a7a908dbc45a19775d272d3 100644 (file)
@@ -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 (file)
index 0000000..c2c0c4a
--- /dev/null
@@ -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 (file)
index 0000000..db1d492
--- /dev/null
@@ -0,0 +1,2 @@
+$(eval $(call import.MODULE.rules,LIBVPX))
+$(eval $(call import.CONTRIB.rules,LIBVPX))
index 6d0ecfce8699e5974f4c3d5a3226178a81947144..52da947b0519048dce5476dbb51e4163d06d7a2d 100644 (file)
@@ -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*)
index 4b4e076a0bc6423722adbc8ad332e57a5469add0..4c77c16701443f5637fdcdfd867e0d6498966160 100644 (file)
@@ -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);
index 737814c5deaa9dcab3d84b02125d28f6c5a176cd..b54c9fc323e047b5ff4e919812025f608196f755 100644 (file)
@@ -4234,6 +4234,7 @@ ghb_validate_vquality(GValue *settings)
             } break;
 
             case HB_VCODEC_THEORA:
+            case HB_VCODEC_FFMPEG_VP8:
             {
                 min = 0;
                 max = 63;
index 8e9c02f221fe8c0b2803f230fe97981879aefe40..25bc74f6940def77259d8f3539e7a0df029867f2 100644 (file)
@@ -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";
     }
index 97ac820df2c056db9b58f5611820c87d4e987371..d85c7224b1fcc00f7c84826baa4fde707a45b9db 100644 (file)
@@ -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
index 844c62777b2470699ef660bc6443b7c0ef30cf9c..127e1249d08748bb079470df17cbd6c6a524bd4e 100644 (file)
@@ -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;
 }
 
 
index 73a3b69992deda47ff7d6c556a935320eb163d7f..d0a2da131234638f41301df0683ab3d9619e261b 100644 (file)
@@ -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))
index de8680e17cf4358f989bb4fb8c21ffe89bb3ad26..9037dc07479f80927fce0bbdc07a4808b25f922f 100644 (file)
@@ -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;
index 1250a681ef39a776d8d5e07549411f3ea7d4001c..4a8de8a37a5abbabd695269cabc2ced5ba062481 100644 (file)
@@ -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;
index 92e8692d022d465892ff30820c9924f4857379f9..5c8c38bed5efba5aedefa37b6a157a885652b6e1 100644 (file)
@@ -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;
index 621a2559ee123296d4324d7a6664098643a1baeb..ab057ed40c10451b2fd00013e6b7fc50f616b9fb 100644 (file)
@@ -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 */; };
 
 /* 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>"; };
                        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 */,
                        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 */,
                273F1FDE14AD9DA40021BE6D = {
                        isa = PBXGroup;
                        children = (
+                               22DD2C49177B94DB00EF50D3 /* libvpx.a */,
                                273F204114ADBC210021BE6D /* HandBrake */,
                                273F200214ADAE950021BE6D /* HandBrakeCLI */,
                                273F200014ADAE950021BE6D /* Products */,
index fffddb8ca7642aa28071585cc6f91033641a3969..800f1c56c0c4f6e553979500ecbe0d505cdaaa7b 100644 (file)
@@ -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
index d3276067cc668fe7bd58c2ef62c394483caef4e5..513afe116dd9c1674fb5f731ff06d8d09fd0e71e 100644 (file)
@@ -59,6 +59,7 @@ endif
 
 MODULES += contrib/lame
 MODULES += contrib/ffmpeg
+MODULES += contrib/libvpx
 MODULES += contrib/libdvdread
 MODULES += contrib/libdvdnav
 MODULES += contrib/libbluray
index 09b61b1aec35df135e9befa7007c1f5f847a305e..4c81c2c262b34679ae64c19318872a80ec171c7b 100644 (file)
@@ -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))