From 9f05a7fdfc08e0279a825dc851b61c61063564b3 Mon Sep 17 00:00:00 2001 From: Loren Merritt Date: Thu, 5 Oct 2006 08:15:55 +0000 Subject: [PATCH] no more vfw git-svn-id: svn://svn.videolan.org/x264/trunk@581 df754926-b1dd-0310-bc7b-ec298dee348c --- Makefile | 6 +- configure | 22 - vfw/build/cygwin/Makefile | 127 ---- vfw/build/win32/bin/x264vfw.inf | 91 --- vfw/build/win32/x264vfw.dsp | 137 ---- vfw/build/win32/x264vfw.dsw | 29 - vfw/codec.c | 453 ------------- vfw/config.c | 1098 ------------------------------- vfw/driverproc.c | 220 ------- vfw/driverproc.def | 8 - vfw/installer/win.bmp | Bin 26494 -> 0 bytes vfw/installer/x264-conf.nsi | 114 ---- vfw/installer/x264vfw.ico | Bin 6966 -> 0 bytes vfw/resource.h | 113 ---- vfw/resource.rc | 314 --------- vfw/w32api/vfw.h | 209 ------ vfw/x264.bmp | Bin 12366 -> 0 bytes vfw/x264vfw.h | 168 ----- 18 files changed, 1 insertion(+), 3108 deletions(-) delete mode 100644 vfw/build/cygwin/Makefile delete mode 100644 vfw/build/win32/bin/x264vfw.inf delete mode 100644 vfw/build/win32/x264vfw.dsp delete mode 100644 vfw/build/win32/x264vfw.dsw delete mode 100644 vfw/codec.c delete mode 100644 vfw/config.c delete mode 100644 vfw/driverproc.c delete mode 100644 vfw/driverproc.def delete mode 100644 vfw/installer/win.bmp delete mode 100644 vfw/installer/x264-conf.nsi delete mode 100644 vfw/installer/x264vfw.ico delete mode 100644 vfw/resource.h delete mode 100644 vfw/resource.rc delete mode 100644 vfw/w32api/vfw.h delete mode 100644 vfw/x264.bmp delete mode 100644 vfw/x264vfw.h diff --git a/Makefile b/Makefile index b20ca4b8..4e7174e7 100644 --- a/Makefile +++ b/Makefile @@ -75,9 +75,6 @@ $(SONAME): .depend $(OBJS) $(OBJASM) x264$(EXE): $(OBJCLI) libx264.a $(CC) -o $@ $+ $(LDFLAGS) -x264vfw.dll: libx264.a $(wildcard vfw/*.c vfw/*.h) - $(MAKE) -C vfw/build/cygwin - libx264gtk.a: muxers.o libx264.a $(MAKE) -C gtk @@ -133,13 +130,12 @@ clean: rm -f $(OBJS) $(OBJASM) $(OBJCLI) $(SONAME) *.a x264 x264.exe .depend TAGS rm -f checkasm checkasm.exe tools/checkasm.o rm -f tools/avc2avi tools/avc2avi.exe tools/avc2avi.o - rm -rf vfw/build/cygwin/bin rm -f $(SRC2:%.c=%.gcda) $(SRC2:%.c=%.gcno) - sed -e 's/ *-fprofile-\(generate\|use\)//g' config.mak > config.mak2 && mv config.mak2 config.mak $(MAKE) -C gtk clean distclean: clean - rm -f config.mak config.h vfw/build/cygwin/config.mak x264.pc + rm -f config.mak config.h x264.pc $(MAKE) -C gtk distclean install: x264 $(SONAME) diff --git a/configure b/configure index 5d052d59..d189bb1d 100755 --- a/configure +++ b/configure @@ -9,7 +9,6 @@ echo "" echo " --help print this message" echo " --enable-avis-input enables avisynth input (win32 only)" echo " --enable-mp4-output enables mp4 output (using gpac)" -echo " --enable-vfw compiles the VfW frontend" echo " --enable-gtk build GTK+ interface" echo " --enable-pthread enables multithreaded encoding" echo " --enable-debug adds -g, doesn't strip" @@ -51,7 +50,6 @@ pthread="auto" debug="no" gprof="no" pic="no" -vfw="no" gtk="no" vis="no" shared="no" @@ -218,11 +216,9 @@ for opt do ;; --extra-cflags=*) CFLAGS="$CFLAGS ${opt#--extra-cflags=}" - VFW_CFLAGS="${opt#--extra-cflags=}" ;; --extra-ldflags=*) LDFLAGS="$LDFLAGS ${opt#--extra-ldflags=}" - VFW_LDFLAGS="${opt#--extra-ldflags=}" ;; --enable-pthread) pthread="yes" @@ -241,12 +237,6 @@ for opt do --enable-pic) pic="yes" ;; - --enable-vfw) - vfw="yes" - ;; - --disable-vfw) - vfw="no" - ;; --enable-gtk) gtk="yes" ;; @@ -326,7 +316,6 @@ fi if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then CFLAGS="$CFLAGS -s -fomit-frame-pointer" LDFLAGS="$LDFLAGS -s" - VFW_LDFLAGS="$VFW_LDFLAGS -s" fi if [ "$debug" = "yes" ]; then @@ -358,7 +347,6 @@ CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS AS=$AS ASFLAGS=$ASFLAGS -VFW=$vfw GTK=$gtk EXE=$EXE VIS=$vis @@ -374,15 +362,6 @@ echo '' >> config.mak cp config.mak gtk/config.mak -if [ "$vfw" = "yes" ]; then - rm -f vfw/build/cygwin/config.mak - cat > vfw/build/cygwin/config.mak << EOF -CFLAGS=$VFW_CFLAGS -LDFLAGS=$VFW_LDFLAGS -EOF - echo "default: x264vfw.dll" >> config.mak -fi - if [ "$shared" = "yes" ]; then API=$(grep '#define X264_BUILD' < x264.h | cut -f 3 -d ' ') echo "SONAME=libx264.so.$API" >> config.mak @@ -428,7 +407,6 @@ echo "System: $SYS" echo "avis input: $avis_input" echo "mp4 output: $mp4_output" echo "pthread: $pthread" -echo "vfw: $vfw" echo "gtk: $gtk" echo "debug: $debug" echo "gprof: $gprof" diff --git a/vfw/build/cygwin/Makefile b/vfw/build/cygwin/Makefile deleted file mode 100644 index 719f2f4b..00000000 --- a/vfw/build/cygwin/Makefile +++ /dev/null @@ -1,127 +0,0 @@ -############################################################################## -# -# Makefile for x264 VFW driver -# -# Author: XviD project: -# - Milan Cutka , -# - Edouard Gomez -# - Peter Ross -# Ported to x264 by Laurent Aimar -# -# $Id: Makefile,v 1.1 2004/06/03 19:29:33 fenrir Exp $ -############################################################################## - -include config.mak - -# Dll to build -DLL=x264vfw.dll - -# Installer executable -INST_EXE=x264vfw.exe - -# Current dir -DIR_CUR=$(shell pwd) - -# Path to include filen library and src -DIR_INC=$(DIR_CUR)/../../.. -DIR_LIB=$(DIR_CUR)/../../.. -DIR_SRC=$(DIR_CUR)/../.. - -# Sources -SRC_C= codec.c config.c driverproc.c -SRC_RES= resource.rc - -# Alias -RM= rm -rf -WINDRES=windres - -############################################################################## -# CFLAGS -############################################################################## - -# Constants which should not be modified -# The `mingw-runtime` package is required when building with -mno-cygwin -CFLAGS += -I$(DIR_SRC)/w32api -I$(DIR_INC) -CFLAGS += -D_WIN32_IE=0x0500 -CFLAGS += -mno-cygwin - -# Optional Compiler options -CFLAGS += -Wall -CFLAGS += -O3 - -############################################################################## -# Compiler flags for linking stage -############################################################################## - -LDFLAGS += -L$(DIR_LIB) -lx264 - -############################################################################## -# Rules -############################################################################## - -OBJECTS = $(SRC_C:.c=.obj) -OBJECTS+= $(SRC_RES:.rc=.obj) - -.SUFFIXES: .obj .rc .c - -DIR_BUILD= $(DIR_CUR)/bin -VPATH = $(DIR_SRC):$(DIR_BUILD) - -all: $(DLL) - -$(DIR_BUILD): - @echo " D: $(DIR_BUILD)" - @mkdir -p $(DIR_BUILD) - -.rc.obj: - @echo " W: $(@D)/$( -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=x264vfw - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "x264vfw.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "x264vfw.mak" CFG="x264vfw - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "x264vfw - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "x264vfw - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=xicl6.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "x264vfw - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "obj/Release" -# PROP Intermediate_Dir "obj/Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "VFW_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../../extras" /I "../../.." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "VFW_EXPORTS" /FR /YX /FD /c -# SUBTRACT CPP /Z -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x804 /d "NDEBUG" -# ADD RSC /l 0x804 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=xilink6.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 winmm.lib vfw32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"bin/x264vfw.dll" -# SUBTRACT LINK32 /debug - -!ELSEIF "$(CFG)" == "x264vfw - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "obj/Debug" -# PROP Intermediate_Dir "obj/Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "VFW_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../extras" /I "../../.." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "VFW_EXPORTS" /FR /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x804 /d "_DEBUG" -# ADD RSC /l 0x804 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=xilink6.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"bin/x264vfw.dll" /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "x264vfw - Win32 Release" -# Name "x264vfw - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\..\codec.c -# End Source File -# Begin Source File - -SOURCE=..\..\config.c -# End Source File -# Begin Source File - -SOURCE=..\..\driverproc.c -# End Source File -# Begin Source File - -SOURCE=..\..\driverproc.def -# End Source File -# Begin Source File - -SOURCE=..\..\resource.rc -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\resource.h -# End Source File -# Begin Source File - -SOURCE=..\..\x264vfw.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\..\build\win32\bin\libx264.lib -# End Source File -# End Target -# End Project diff --git a/vfw/build/win32/x264vfw.dsw b/vfw/build/win32/x264vfw.dsw deleted file mode 100644 index 7d24ef97..00000000 --- a/vfw/build/win32/x264vfw.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "x264vfw"=.\x264vfw.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/vfw/codec.c b/vfw/codec.c deleted file mode 100644 index c9c3a61f..00000000 --- a/vfw/codec.c +++ /dev/null @@ -1,453 +0,0 @@ -/***************************************************************************** - * codec.c: vfw x264 encoder - ***************************************************************************** - * Copyright (C) 2003 Laurent Aimar - * $Id: codec.c,v 1.1 2004/06/03 19:27:09 fenrir Exp $ - * - * Authors: Justin Clay - * Laurent Aimar - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. - *****************************************************************************/ - -#include "x264vfw.h" - -#include /* debug only */ -#include - -#define X264_MAX(a,b) ( (a)>(b) ? (a) : (b) ) -#define X264_MIN(a,b) ( (a)<(b) ? (a) : (b) ) - -/* get_csp: - * return a valid x264 CSP or X264_CSP_NULL if unsuported */ -static int get_csp( BITMAPINFOHEADER *hdr ) -{ - switch( hdr->biCompression ) - { - case FOURCC_I420: - case FOURCC_IYUV: - return X264_CSP_I420; - - case FOURCC_YV12: - return X264_CSP_YV12; - - case FOURCC_YUYV: - case FOURCC_YUY2: - return X264_CSP_YUYV; - - case BI_RGB: - { - int i_vflip = hdr->biHeight < 0 ? 0 : X264_CSP_VFLIP; - - if( hdr->biBitCount == 24 ) - return X264_CSP_BGR | i_vflip; - if( hdr->biBitCount == 32 ) - return X264_CSP_BGRA | i_vflip; - else - return X264_CSP_NONE; - } - - default: - return X264_CSP_NONE; - } -} - -/* Test that we can do the compression */ -LRESULT compress_query( CODEC *codec, BITMAPINFO *lpbiInput, BITMAPINFO *lpbiOutput ) -{ - BITMAPINFOHEADER *inhdr = &lpbiInput->bmiHeader; - BITMAPINFOHEADER *outhdr = &lpbiOutput->bmiHeader; - CONFIG *config = &codec->config; - - if( get_csp( inhdr ) == X264_CSP_NONE ) - return ICERR_BADFORMAT; - - if( lpbiOutput == NULL ) - return ICERR_OK; - - if( inhdr->biWidth != outhdr->biWidth || - inhdr->biHeight != outhdr->biHeight ) - return ICERR_BADFORMAT; - - /* We need x16 width/height */ - if( inhdr->biWidth % 16 != 0 || inhdr->biHeight % 16 != 0 ) - return ICERR_BADFORMAT; - - - if( inhdr->biCompression != mmioFOURCC( config->fcc[0], config->fcc[1], - config->fcc[2], config->fcc[3] ) ) - return ICERR_BADFORMAT; - - return ICERR_OK; -} - -/* */ -LRESULT compress_get_format( CODEC *codec, BITMAPINFO *lpbiInput, BITMAPINFO *lpbiOutput ) -{ - BITMAPINFOHEADER *inhdr = &lpbiInput->bmiHeader; - BITMAPINFOHEADER *outhdr = &lpbiOutput->bmiHeader; - CONFIG *config = &codec->config; - - if( get_csp( inhdr ) == X264_CSP_NONE ) - return ICERR_BADFORMAT; - - if( lpbiOutput == NULL ) - return sizeof(BITMAPINFOHEADER); - - memcpy( outhdr, inhdr, sizeof( BITMAPINFOHEADER ) ); - outhdr->biSize = sizeof( BITMAPINFOHEADER ); - outhdr->biSizeImage = compress_get_size( codec, lpbiInput, lpbiOutput ); - outhdr->biXPelsPerMeter = 0; - outhdr->biYPelsPerMeter = 0; - outhdr->biClrUsed = 0; - outhdr->biClrImportant = 0; - outhdr->biCompression = mmioFOURCC( config->fcc[0], config->fcc[1], - config->fcc[2], config->fcc[3] ); - - return ICERR_OK; -} - -/* */ -LRESULT compress_get_size( CODEC *codec, BITMAPINFO *lpbiInput, BITMAPINFO *lpbiOutput ) -{ - return 2 * lpbiOutput->bmiHeader.biWidth * lpbiOutput->bmiHeader.biHeight * 3; -} - -/* */ -LRESULT compress_frames_info(CODEC * codec, ICCOMPRESSFRAMES * icf ) -{ - codec->fincr = icf->dwScale; - codec->fbase = icf->dwRate; - codec->config.i_frame_total = icf->lFrameCount; - return ICERR_OK; -} - -static void x264_log_vfw( void *p_private, int i_level, const char *psz_fmt, va_list arg ) -{ - char error_msg[1024]; - int idx; - HWND *hCons = p_private; - - vsprintf( error_msg, psz_fmt, arg ); - - /* strip final linefeeds (required) */ - idx=strlen( error_msg ) - 1; - while( idx >= 0 && error_msg[idx] == '\n' ) - error_msg[idx--] = 0; - - if(!( *hCons ) ) { - *hCons = CreateDialog( g_hInst, MAKEINTRESOURCE( IDD_ERRCONSOLE ), NULL, - callback_err_console ); - //ShowWindow( *hCons, SW_SHOW ); - } - idx = SendDlgItemMessage( *hCons, IDC_CONSOLE, LB_ADDSTRING, 0, ( LPARAM )error_msg ); - - /* make sure that the last item added is visible (autoscroll) */ - if( idx >= 0 ) - SendDlgItemMessage( *hCons, IDC_CONSOLE, LB_SETTOPINDEX, ( WPARAM )idx, 0 ); - -} - -static void statsfilename_renumber( char *dest, char *src, int i_pass ) -{ - char *last_dot = strrchr( src, '.' ); - char *last_slash = X264_MAX( strrchr( src, '/' ), strrchr( src, '\\' ) ); - char pass_str[5]; - - sprintf( pass_str, "-%i", i_pass ); - strcpy( dest, src ); - if( last_slash < last_dot ) { - dest[ last_dot - src ] = 0; - strcat( dest, pass_str ); - strcat( dest, last_dot ); - } - else - { - strcat( dest, pass_str ); - } -} - -/* */ -LRESULT compress_begin(CODEC * codec, BITMAPINFO * lpbiInput, BITMAPINFO * lpbiOutput ) -{ - CONFIG *config = &codec->config; - x264_param_t param; - int pass_number; - - /* Destroy previous handle */ - if( codec->h != NULL ) - { - x264_encoder_close( codec->h ); - codec->h = NULL; - } - - /* Get default param */ - x264_param_default( ¶m ); - - param.rc.psz_stat_out = malloc (MAX_PATH); - param.rc.psz_stat_in = malloc (MAX_PATH); - param.i_threads = config->i_threads; - param.analyse.i_noise_reduction = config->i_noise_reduction; - - param.i_log_level = config->i_log_level - 1; - param.pf_log = x264_log_vfw; - param.p_log_private = malloc( sizeof( HWND ) ); - *( ( HWND * )param.p_log_private ) = NULL; /* error console window handle */ - codec->hCons = ( HWND * )param.p_log_private; - - param.analyse.b_psnr = 0; - - /* Set params: TODO to complete */ - param.i_width = lpbiInput->bmiHeader.biWidth; - param.i_height= lpbiInput->bmiHeader.biHeight; - - param.i_fps_num = codec->fbase; - param.i_fps_den = codec->fincr; - param.i_frame_total = config->i_frame_total; - - param.i_frame_reference = config->i_refmax; - param.i_keyint_min = config->i_keyint_min; - param.i_keyint_max = config->i_keyint_max; - param.i_scenecut_threshold = config->i_scenecut_threshold; - param.rc.i_qp_min = config->i_qp_min; - param.rc.i_qp_max = config->i_qp_max; - param.rc.i_qp_step = config->i_qp_step; - param.b_deblocking_filter = config->b_filter; - param.b_cabac = config->b_cabac; - if( config->b_cabac && config->i_trellis ) - param.analyse.i_trellis = 1; - - param.analyse.b_chroma_me = config->b_chroma_me; - param.rc.f_ip_factor = 1 + (float)config->i_key_boost / 100; - param.rc.f_pb_factor = 1 + (float)config->i_b_red / 100; - param.rc.f_qcompress = (float)config->i_curve_comp / 100; - param.vui.i_sar_width = config->i_sar_width; - param.vui.i_sar_height = config->i_sar_height; - - param.i_bframe = config->i_bframe; - if( config->i_bframe > 1 && config->b_b_wpred) - param.analyse.b_weighted_bipred = 1; - if( config->i_bframe > 1 && config->b_b_refs) - param.b_bframe_pyramid = 1; - param.b_bframe_adaptive = config->b_bframe_adaptive; - param.analyse.b_bidir_me = config->b_bidir_me; - param.i_bframe_bias = config->i_bframe_bias; - param.analyse.i_subpel_refine = config->i_subpel_refine + 1; /* 0..5 -> 1..6 */ - if (param.analyse.i_subpel_refine == 7) - { - param.analyse.i_subpel_refine = 6; - param.analyse.b_bframe_rdo = 1; - } - - param.analyse.i_me_method = config->i_me_method; - param.analyse.i_me_range = config->i_me_range; - - /* bframe prediction - gui goes alphabetically, so 1=SPATIAL, 2=TEMPORAL */ - switch(config->i_direct_mv_pred) { - case 0: param.analyse.i_direct_mv_pred = X264_DIRECT_PRED_SPATIAL; break; - case 1: param.analyse.i_direct_mv_pred = X264_DIRECT_PRED_TEMPORAL; break; - } - param.i_deblocking_filter_alphac0 = config->i_inloop_a; - param.i_deblocking_filter_beta = config->i_inloop_b; - param.analyse.inter = 0; - if( config->b_bsub16x16 ) - param.analyse.inter |= X264_ANALYSE_BSUB16x16; - if( config->b_psub16x16 ) - { - param.analyse.inter |= X264_ANALYSE_PSUB16x16; - if( config->b_psub8x8 ) - param.analyse.inter |= X264_ANALYSE_PSUB8x8; - } - if( config->b_i4x4 ) - param.analyse.inter |= X264_ANALYSE_I4x4; - if( config->b_i8x8 ) - param.analyse.inter |= X264_ANALYSE_I8x8; - param.analyse.b_transform_8x8 = config->b_dct8x8; - if( config->b_mixedref ) - param.analyse.b_mixed_references = 1; - - - switch( config->i_encoding_type ) - { - case 0: /* 1 PASS ABR */ - param.rc.i_rc_method = X264_RC_ABR; - param.rc.i_bitrate = config->bitrate; - break; - case 1: /* 1 PASS CQ */ - param.rc.i_rc_method = X264_RC_CQP; - param.rc.i_qp_constant = config->i_qp; - break; - default: - case 2: /* 2 PASS */ - { - for( pass_number = 1; pass_number < 99; pass_number++ ) - { - FILE *f; - statsfilename_renumber( param.rc.psz_stat_out, config->stats, pass_number ); - if( ( f = fopen( param.rc.psz_stat_out, "r" ) ) != NULL ) - { - fclose( f ); - if( config->i_pass == 1 ) - unlink( param.rc.psz_stat_out ); - } - else break; - } - - if( config->i_pass > pass_number ) - { - /* missing 1st pass statsfile */ - free( param.rc.psz_stat_out ); - free( param.rc.psz_stat_in ); - return ICERR_ERROR; - } - - param.rc.i_rc_method = X264_RC_ABR; - param.rc.i_bitrate = config->i_2passbitrate; - - if( config->i_pass == 1 ) - { - statsfilename_renumber( param.rc.psz_stat_out, config->stats, 1 ); - param.rc.b_stat_write = 1; - param.rc.f_rate_tolerance = 4; - if( config->b_fast1pass ) - { - /* adjust or turn off some flags to gain speed, if needed */ - param.analyse.i_subpel_refine = X264_MAX( X264_MIN( 3, param.analyse.i_subpel_refine - 1 ), 1 ); - param.i_frame_reference = ( param.i_frame_reference + 1 ) >> 1; - param.analyse.inter &= ( ~X264_ANALYSE_PSUB8x8 ); - param.analyse.inter &= ( ~X264_ANALYSE_BSUB16x16 ); - } - } - else - { - statsfilename_renumber( param.rc.psz_stat_in, config->stats, pass_number - 1 ); - param.rc.b_stat_read = 1; - if( config->b_updatestats ) - param.rc.b_stat_write = 1; - param.rc.f_rate_tolerance = 1; - } - - break; - } - } - - /* Open the encoder */ - codec->h = x264_encoder_open( ¶m ); - - free( param.rc.psz_stat_out ); - free( param.rc.psz_stat_in ); - - if( codec->h == NULL ) - return ICERR_ERROR; - - return ICERR_OK; -} - -/* */ -LRESULT compress_end(CODEC * codec) -{ - if( codec->h != NULL ) - { - x264_encoder_close( codec->h ); - codec->h = NULL; - } - - free( codec->hCons ); - codec->hCons = NULL; - return ICERR_OK; -} - -/* */ -LRESULT compress( CODEC *codec, ICCOMPRESS *icc ) -{ - BITMAPINFOHEADER *inhdr = icc->lpbiInput; - BITMAPINFOHEADER *outhdr = icc->lpbiOutput; - - x264_picture_t pic; - - int i_nal; - x264_nal_t *nal; - int i_out; - - int i; - - /* Init the picture */ - memset( &pic, 0, sizeof( x264_picture_t ) ); - pic.img.i_csp = get_csp( inhdr ); - - /* For now biWidth can be divided by 16 so no problem */ - switch( pic.img.i_csp & X264_CSP_MASK ) - { - case X264_CSP_I420: - case X264_CSP_YV12: - pic.img.i_plane = 3; - pic.img.i_stride[0] = inhdr->biWidth; - pic.img.i_stride[1] = - pic.img.i_stride[2] = inhdr->biWidth / 2; - - pic.img.plane[0] = (uint8_t*)icc->lpInput; - pic.img.plane[1] = pic.img.plane[0] + inhdr->biWidth * inhdr->biHeight; - pic.img.plane[2] = pic.img.plane[1] + inhdr->biWidth * inhdr->biHeight / 4; - break; - - case X264_CSP_YUYV: - pic.img.i_plane = 1; - pic.img.i_stride[0] = 2 * inhdr->biWidth; - pic.img.plane[0] = (uint8_t*)icc->lpInput; - break; - - case X264_CSP_BGR: - pic.img.i_plane = 1; - pic.img.i_stride[0] = 3 * inhdr->biWidth; - pic.img.plane[0] = (uint8_t*)icc->lpInput; - break; - - case X264_CSP_BGRA: - pic.img.i_plane = 1; - pic.img.i_stride[0] = 4 * inhdr->biWidth; - pic.img.plane[0] = (uint8_t*)icc->lpInput; - break; - - default: - return ICERR_BADFORMAT; - } - - /* encode it */ - x264_encoder_encode( codec->h, &nal, &i_nal, &pic, &pic ); - - /* create bitstream, unless we're dropping it in 1st pass */ - i_out = 0; - - if( codec->config.i_encoding_type != 2 || codec->config.i_pass > 1 ) { - for( i = 0; i < i_nal; i++ ) { - int i_size = outhdr->biSizeImage - i_out; - x264_nal_encode( (uint8_t*)icc->lpOutput + i_out, &i_size, 1, &nal[i] ); - - i_out += i_size; - } - } - - outhdr->biSizeImage = i_out; - - /* Set key frame only for IDR, as they are real synch point, I frame - aren't always synch point (ex: with multi refs, ref marking) */ - if( pic.i_type == X264_TYPE_IDR ) - *icc->lpdwFlags = AVIIF_KEYFRAME; - else - *icc->lpdwFlags = 0; - - return ICERR_OK; -} - diff --git a/vfw/config.c b/vfw/config.c deleted file mode 100644 index df494c46..00000000 --- a/vfw/config.c +++ /dev/null @@ -1,1098 +0,0 @@ -/***************************************************************************** - * config.c: vfw x264 encoder - ***************************************************************************** - * Copyright (C) 2003 Laurent Aimar - * $Id: config.c,v 1.1 2004/06/03 19:27:09 fenrir Exp $ - * - * Authors: Justin Clay - * Laurent Aimar - * Antony Boucher - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. - *****************************************************************************/ - -/************************************************************************** - * - * History: - * - * 2004.05.14 CBR encode mode support - * - **************************************************************************/ - -#include "x264vfw.h" -#include /* sprintf */ -#include - -#ifdef _MSC_VER -#define X264_VERSION "" -#else -#include "config.h" -#endif - -/* Registry */ -#define X264_REG_KEY HKEY_CURRENT_USER -#define X264_REG_PARENT "Software\\GNU" -#define X264_REG_CHILD "x264" -#define X264_REG_CLASS "config" - -/* window controls */ -#define BITRATE_MAX 5000 -#define QUANT_MAX 51 - -/* description */ -#define X264_NAME "x264" -#define X264_DEF_TEXT "Are you sure you want to load default values?" - -/* Registery handling */ -typedef struct -{ - char *reg_value; - int *config_int; - int default_int; -} reg_int_t; - -typedef struct -{ - char *reg_value; - char *config_str; - char *default_str; - int max_len; /* maximum string length, including the terminating NULL char */ -} reg_str_t; - -CONFIG reg; -HWND hTooltip; -HWND hTabs[8]; -static const reg_int_t reg_int_table[] = -{ - /* Main dialog */ - { "bitrate", ®.bitrate, 800 }, - { "quantizer", ®.i_qp, 26 }, - { "encoding_type", ®.i_encoding_type, 1 }, - { "passbitrate", ®.i_2passbitrate, 800 }, - { "pass_number", ®.i_pass, 1 }, - { "fast1pass", ®.b_fast1pass, 1 }, - { "updatestats", ®.b_updatestats, 1 }, - - /* Rate Control */ - { "key_boost", ®.i_key_boost, 40 }, - { "b_red", ®.i_b_red, 30 }, - { "curve_comp", ®.i_curve_comp, 60 }, - { "qp_min", ®.i_qp_min, 10 }, - { "qp_max", ®.i_qp_max, 51 }, - { "qp_step", ®.i_qp_step, 4 }, - { "scenecut", ®.i_scenecut_threshold, 40 }, - { "keyint_min", ®.i_keyint_min, 25 }, - { "keyint_max", ®.i_keyint_max, 250 }, - - /* MBs&Frames */ - { "dct8x8", ®.b_dct8x8, 1 }, - { "psub16x16", ®.b_psub16x16, 1 }, - { "bsub16x16", ®.b_bsub16x16, 1 }, - { "psub8x8", ®.b_psub8x8, 0 }, - { "i8x8", ®.b_i8x8, 1 }, - { "i4x4", ®.b_i4x4, 1 }, - { "bmax", ®.i_bframe, 2 }, - { "b_bias", ®.i_bframe_bias, 0 }, - { "b_refs", ®.b_b_refs, 0 }, - { "b_adapt", ®.b_bframe_adaptive, 1 }, - { "b_bidir_me", ®.b_bidir_me, 0 }, - { "b_wpred", ®.b_b_wpred, 1 }, - { "direct_pred", ®.i_direct_mv_pred, 1 }, - - /* analysis */ - { "subpel", ®.i_subpel_refine, 4 }, - { "me_method", ®.i_me_method, 1 }, - { "me_range", ®.i_me_range, 16 }, - { "chroma_me", ®.b_chroma_me, 1 }, - { "refmax", ®.i_refmax, 1 }, - { "mixedref", ®.b_mixedref, 0 }, - { "sar_width", ®.i_sar_width, 1 }, - { "sar_height", ®.i_sar_height, 1 }, - { "threads", ®.i_threads, 1 }, - { "cabac", ®.b_cabac, 1 }, - { "trellis", ®.i_trellis, 1 }, - { "noise_reduction",®.i_noise_reduction, 0 }, - { "loop_filter", ®.b_filter, 1 }, - { "inloop_a", ®.i_inloop_a, 0 }, - { "inloop_b", ®.i_inloop_b, 0 }, - { "log_level", ®.i_log_level, 1 } - -}; - -static const reg_str_t reg_str_table[] = -{ - { "fourcc", reg.fcc, "H264", 5 }, - { "statsfile", reg.stats, ".\\x264.stats", MAX_PATH-4 } // -4 because we add pass number -}; - -static void set_dlgitem_int(HWND hDlg, UINT item, int value) -{ - char buf[8]; - sprintf(buf, "%i", value); - SetDlgItemText(hDlg, item, buf); -} - - -/* Registry access */ - -void config_reg_load( CONFIG *config ) -{ - HKEY hKey; - DWORD i_size; - int i; - - RegOpenKeyEx( X264_REG_KEY, X264_REG_PARENT "\\" X264_REG_CHILD, - 0, KEY_READ, &hKey ); - - /* Read all integers */ - for( i = 0; i < sizeof( reg_int_table )/sizeof( reg_int_t); i++ ) - { - i_size = sizeof( int ); - if( RegQueryValueEx( hKey, reg_int_table[i].reg_value, 0, 0, - (LPBYTE)reg_int_table[i].config_int, - &i_size ) != ERROR_SUCCESS ) - *reg_int_table[i].config_int = reg_int_table[i].default_int; - } - - /* Read strings */ - for( i = 0; i < sizeof( reg_str_table )/sizeof( reg_str_t); i++ ) - { - i_size = reg_str_table[i].max_len; - if( RegQueryValueEx( hKey, reg_str_table[i].reg_value, 0, 0, - (LPBYTE)reg_str_table[i].config_str, - &i_size ) != ERROR_SUCCESS ) - lstrcpy( reg_str_table[i].config_str, - reg_str_table[i].default_str ); - } - - RegCloseKey( hKey ); - - memcpy( config, ®, sizeof( CONFIG ) ); -} - -void config_reg_save( CONFIG *config ) -{ - HKEY hKey; - DWORD i_size; - int i; - - if( RegCreateKeyEx( X264_REG_KEY, - X264_REG_PARENT "\\" X264_REG_CHILD, - 0, - X264_REG_CLASS, - REG_OPTION_NON_VOLATILE, - KEY_WRITE, - 0, &hKey, &i_size ) != ERROR_SUCCESS ) - return; - - memcpy( ®, config, sizeof( CONFIG ) ); - - /* Save all integers */ - for( i = 0; i < sizeof( reg_int_table )/sizeof( reg_int_t); i++ ) - { - RegSetValueEx( hKey, reg_int_table[i].reg_value, 0, REG_DWORD, - (LPBYTE)reg_int_table[i].config_int, sizeof( int ) ); - } - - /* Save strings */ - for( i = 0; i < sizeof( reg_str_table )/sizeof( reg_str_t); i++ ) - { - RegSetValueEx( hKey, reg_str_table[i].reg_value, 0, REG_SZ, - (LPBYTE)reg_str_table[i].config_str, - lstrlen(reg_str_table[i].config_str)+1 ); - } - - RegCloseKey( hKey ); -} - -void config_reg_defaults( CONFIG *config ) -{ - HKEY hKey; - - if(RegOpenKeyEx( X264_REG_KEY, X264_REG_PARENT, 0, KEY_ALL_ACCESS, &hKey )) { - return; - } - if( RegDeleteKey( hKey, X264_REG_CHILD ) ) { - return; - } - RegCloseKey( hKey ); - - /* Just in case */ - memset( config, 0, sizeof( CONFIG ) ); - - config_reg_load( config ); - config_reg_save( config ); -} - - -/* assigns tooltips */ - -BOOL CALLBACK enum_tooltips(HWND hWnd, LPARAM lParam) -{ - char help[500]; - - /* The tooltip for a control is named the same as the control itself */ - if (LoadString(g_hInst, GetDlgCtrlID(hWnd), help, 500)) - { - TOOLINFO ti; - - ti.cbSize = sizeof(TOOLINFO); - ti.uFlags = TTF_SUBCLASS | TTF_IDISHWND; - ti.hwnd = GetParent(hWnd); - ti.uId = (LPARAM)hWnd; - ti.lpszText = help; - - SendMessage(hTooltip, TTM_ADDTOOL, 0, (LPARAM)&ti); - } - - return TRUE; -} - - -/* Main window */ - -BOOL CALLBACK callback_main( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ) -{ - TCITEM tie; - CONFIG* config = (CONFIG*)GetWindowLong(hDlg, GWL_USERDATA); - - switch( uMsg ) - { - case WM_INITDIALOG : - { - RECT rect; - HWND hTabCtrl = GetDlgItem( hDlg, IDC_TAB1 ); - SetWindowLong( hDlg, GWL_USERDATA, lParam ); - config = (CONFIG*)lParam; - - // insert tabs in tab control - tie.mask = TCIF_TEXT; - tie.iImage = -1; - tie.pszText = "Bitrate"; TabCtrl_InsertItem(hTabCtrl, 0, &tie); - tie.pszText = "Rate Control"; TabCtrl_InsertItem(hTabCtrl, 1, &tie); - tie.pszText = "MBs&&Frames"; TabCtrl_InsertItem(hTabCtrl, 2, &tie); - tie.pszText = "More..."; TabCtrl_InsertItem(hTabCtrl, 3, &tie); - hTabs[0] = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_TAB_BITRATE), hDlg, (DLGPROC)callback_tabs, lParam); - hTabs[1] = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_TAB_RATECONTROL), hDlg, (DLGPROC)callback_tabs, lParam); - hTabs[2] = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_TAB_IPFRAMES), hDlg, (DLGPROC)callback_tabs, lParam); - hTabs[3] = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_TAB_MISC), hDlg, (DLGPROC)callback_tabs, lParam); - GetClientRect(hDlg, &rect); - TabCtrl_AdjustRect(hTabCtrl, FALSE, &rect); - MoveWindow(hTabs[0], rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top-40, TRUE); - MoveWindow(hTabs[1], rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top-40, TRUE); - MoveWindow(hTabs[2], rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top-40, TRUE); - MoveWindow(hTabs[3], rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top-40, TRUE); - - if ((hTooltip = CreateWindow(TOOLTIPS_CLASS, NULL, TTS_ALWAYSTIP, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - NULL, NULL, g_hInst, NULL))) - { - SetWindowPos(hTooltip, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE); - SendMessage(hTooltip, TTM_SETMAXTIPWIDTH, 0, 400); - EnumChildWindows(hDlg, enum_tooltips, 0); - } - - tabs_enable_items( hDlg, config ); - tabs_update_items( hDlg, config ); - ShowWindow( hTabs[0], SW_SHOW ); - BringWindowToTop( hTabs[0] ); - UpdateWindow( hDlg ); - break; - } - - case WM_NOTIFY: - { - NMHDR FAR *tem = (NMHDR FAR *)lParam; - if (tem->code == TCN_SELCHANGING) - { - HWND hTabCtrl = GetDlgItem( hDlg, IDC_TAB1 ); - int num = TabCtrl_GetCurSel(hTabCtrl); - ShowWindow( hTabs[num], SW_HIDE ); - UpdateWindow( hDlg ); - } - else if (tem->code == TCN_SELCHANGE) - { - HWND hTabCtrl = GetDlgItem( hDlg, IDC_TAB1 ); - int num = TabCtrl_GetCurSel(hTabCtrl); - ShowWindow( hTabs[num], SW_SHOW ); - BringWindowToTop( hTabs[num] ); - UpdateWindow( hDlg ); - } - break; - } - - case WM_COMMAND: - switch ( HIWORD( wParam ) ) - { - case BN_CLICKED : - switch( LOWORD( wParam ) ) - { - case IDOK : - config->b_save = TRUE; - EndDialog( hDlg, LOWORD(wParam) ); - break; - - case IDCANCEL : - config->b_save = FALSE; - EndDialog( hDlg, LOWORD(wParam) ); - break; - - case IDC_DEFAULTS : - if( MessageBox( hDlg, X264_DEF_TEXT, X264_NAME, MB_YESNO ) == IDYES ) - { - config_reg_defaults( config ); - tabs_enable_items( hDlg, config ); - tabs_update_items( hDlg, config ); - } - break; - } - } - - default : - return 0; - } - - return 1; -} - - -/* Tabs */ - -void tabs_enable_items( HWND hDlg, CONFIG * config ) -{ - char szTmp[1024]; - sprintf( szTmp, "Core %d%s, build %s %s", X264_BUILD, X264_VERSION, __DATE__, __TIME__ ); - SetDlgItemText( hTabs[0], IDC_BUILDREV, szTmp ); - - switch( config->i_encoding_type ) - { - case 0 : /* 1 Pass, Bitrate Based */ - SetDlgItemText( hTabs[0], IDC_BITRATELABEL, "Average Bitrate" ); - SetDlgItemText( hTabs[0], IDC_BITRATELOW, "0" ); - sprintf(szTmp, "%d", BITRATE_MAX); - SetDlgItemText( hTabs[0], IDC_BITRATEHIGH, szTmp ); - SendDlgItemMessage( hTabs[0], IDC_BITRATESLIDER, TBM_SETRANGE, TRUE, - (LPARAM) MAKELONG( 0, BITRATE_MAX ) ); - EnableWindow( GetDlgItem( hTabs[0], IDC_UPDATESTATS ), FALSE ); - EnableWindow( GetDlgItem( hTabs[0], IDC_STATSFILE ), FALSE ); - EnableWindow( GetDlgItem( hTabs[0], IDC_STATSFILE_BROWSE ), FALSE ); - EnableWindow( GetDlgItem( hTabs[1], IDC_CURVECOMP ), TRUE ); - EnableWindow( GetDlgItem( hTabs[1], IDC_QPMIN ), TRUE ); - EnableWindow( GetDlgItem( hTabs[1], IDC_QPMAX ), TRUE ); - EnableWindow( GetDlgItem( hTabs[1], IDC_QPSTEP ), TRUE ); - break; - - case 1 : /* 1 Pass, Quantizer Based */ - SetDlgItemText( hTabs[0], IDC_BITRATELABEL, "Quantizer" ); - SetDlgItemText( hTabs[0], IDC_BITRATELOW, "0 (High Quality)" ); - sprintf(szTmp, "(Low Quality) %d", QUANT_MAX); - SetDlgItemText( hTabs[0], IDC_BITRATEHIGH, szTmp ); - SendDlgItemMessage( hTabs[0], IDC_BITRATESLIDER, TBM_SETRANGE, TRUE, - (LPARAM) MAKELONG( 0, QUANT_MAX ) ); - EnableWindow( GetDlgItem( hTabs[0], IDC_UPDATESTATS ), FALSE ); - EnableWindow( GetDlgItem( hTabs[0], IDC_STATSFILE ), FALSE ); - EnableWindow( GetDlgItem( hTabs[0], IDC_STATSFILE_BROWSE ), FALSE ); - EnableWindow( GetDlgItem( hTabs[1], IDC_CURVECOMP ), FALSE ); - EnableWindow( GetDlgItem( hTabs[1], IDC_QPMIN ), FALSE ); - EnableWindow( GetDlgItem( hTabs[1], IDC_QPMAX ), FALSE ); - EnableWindow( GetDlgItem( hTabs[1], IDC_QPSTEP ), FALSE ); - break; - - case 2 : /* 2 Pass */ - SetDlgItemText( hTabs[0], IDC_BITRATELABEL, "Target Bitrate" ); - SetDlgItemText( hTabs[0], IDC_BITRATELOW, "0" ); - sprintf(szTmp, "%d", BITRATE_MAX); - SetDlgItemText( hTabs[0], IDC_BITRATEHIGH, szTmp ); - SendDlgItemMessage( hTabs[0], IDC_BITRATESLIDER, TBM_SETRANGE, TRUE, - (LPARAM) MAKELONG( 0, BITRATE_MAX ) ); - EnableWindow( GetDlgItem( hTabs[0], IDC_UPDATESTATS ), TRUE ); - EnableWindow( GetDlgItem( hTabs[0], IDC_STATSFILE ), TRUE ); - EnableWindow( GetDlgItem( hTabs[0], IDC_STATSFILE_BROWSE ), TRUE ); - EnableWindow( GetDlgItem( hTabs[1], IDC_CURVECOMP ), TRUE ); - EnableWindow( GetDlgItem( hTabs[1], IDC_QPMIN ), TRUE ); - EnableWindow( GetDlgItem( hTabs[1], IDC_QPMAX ), TRUE ); - EnableWindow( GetDlgItem( hTabs[1], IDC_QPSTEP ), TRUE ); - break; - } - - EnableWindow( GetDlgItem( hTabs[2], IDC_DIRECTPRED ), config->i_bframe > 0 ); - EnableWindow( GetDlgItem( hTabs[3], IDC_INLOOP_A ), config->b_filter ); - EnableWindow( GetDlgItem( hTabs[3], IDC_INLOOP_B ), config->b_filter ); - EnableWindow( GetDlgItem( hTabs[2], IDC_P4X4 ), config->b_psub16x16 ); - EnableWindow( GetDlgItem( hTabs[2], IDC_I8X8 ), config->b_dct8x8 ); - EnableWindow( GetDlgItem( hTabs[2], IDC_B8X8 ), config->i_bframe > 0 ); - EnableWindow( GetDlgItem( hTabs[2], IDC_BREFS ), config->i_bframe > 1 ); - EnableWindow( GetDlgItem( hTabs[2], IDC_WBPRED ), config->i_bframe > 1 ); - EnableWindow( GetDlgItem( hTabs[2], IDC_BADAPT ), config->i_bframe > 0 ); - EnableWindow( GetDlgItem( hTabs[2], IDC_BIDIR_ME ), config->i_bframe > 0 ); - EnableWindow( GetDlgItem( hTabs[2], IDC_BBIAS ), config->i_bframe > 0 && config->b_bframe_adaptive ); - EnableWindow( GetDlgItem( hTabs[2], IDC_BBIASSLIDER ), config->i_bframe > 0 && config->b_bframe_adaptive ); - EnableWindow( GetDlgItem( hTabs[1], IDC_PBRATIO ), config->i_bframe > 0 ); - EnableWindow( GetDlgItem( hTabs[3], IDC_MERANGE ), config->i_me_method > 1 ); - EnableWindow( GetDlgItem( hTabs[3], IDC_CHROMAME ), config->i_subpel_refine >= 4 ); - EnableWindow( GetDlgItem( hTabs[3], IDC_TRELLIS ), config->b_cabac ); - EnableWindow( GetDlgItem( hTabs[3], IDC_MIXEDREF ), config->i_refmax > 1 ); -} - -void tabs_update_items( HWND hDlg, CONFIG * config ) -{ - char fourcc[5]; - - /* update bitrate tab */ - if (SendMessage( GetDlgItem(hTabs[0],IDC_BITRATEMODE), CB_GETCOUNT, 0, 0 ) == 0) - { - SendDlgItemMessage(hTabs[0], IDC_BITRATEMODE, CB_ADDSTRING, 0, (LPARAM)"Single Pass - Bitrate"); - SendDlgItemMessage(hTabs[0], IDC_BITRATEMODE, CB_ADDSTRING, 0, (LPARAM)"Single Pass - Quantizer"); - SendDlgItemMessage(hTabs[0], IDC_BITRATEMODE, CB_ADDSTRING, 0, (LPARAM)"Multipass - First Pass"); - SendDlgItemMessage(hTabs[0], IDC_BITRATEMODE, CB_ADDSTRING, 0, (LPARAM)"Multipass - First Pass (fast)"); - SendDlgItemMessage(hTabs[0], IDC_BITRATEMODE, CB_ADDSTRING, 0, (LPARAM)"Multipass - Nth Pass"); - } - switch( config->i_encoding_type ) - { - case 0 : /* 1 Pass, Bitrate Based */ - SendDlgItemMessage(hTabs[0], IDC_BITRATEMODE, CB_SETCURSEL, 0, 0); - SetDlgItemInt( hTabs[0], IDC_BITRATEEDIT, config->bitrate, FALSE ); - SendDlgItemMessage(hTabs[0], IDC_BITRATESLIDER, TBM_SETPOS, TRUE, - config->bitrate ); - break; - case 1 : /* 1 Pass, Quantizer Based */ - SendDlgItemMessage(hTabs[0], IDC_BITRATEMODE, CB_SETCURSEL, 1, 0); - SetDlgItemInt( hTabs[0], IDC_BITRATEEDIT, config->i_qp, FALSE ); - SendDlgItemMessage(hTabs[0], IDC_BITRATESLIDER, TBM_SETPOS, TRUE, - config->i_qp ); - break; - case 2 : /* 2 Pass */ - if (config->i_pass >= 2) { - SendDlgItemMessage(hTabs[0], IDC_BITRATEMODE, CB_SETCURSEL, 4, 0); - } else if (config->b_fast1pass) { - SendDlgItemMessage(hTabs[0], IDC_BITRATEMODE, CB_SETCURSEL, 3, 0); - } else { - SendDlgItemMessage(hTabs[0], IDC_BITRATEMODE, CB_SETCURSEL, 2, 0); - } - SetDlgItemInt( hTabs[0], IDC_BITRATEEDIT, config->i_2passbitrate, FALSE ); - SendDlgItemMessage(hTabs[0], IDC_BITRATESLIDER, TBM_SETPOS, TRUE, - config->i_2passbitrate ); - break; - } - - CheckDlgButton( hTabs[0], IDC_UPDATESTATS, config->b_updatestats ? BST_CHECKED : BST_UNCHECKED ); - SetDlgItemText( hTabs[0], IDC_STATSFILE, config->stats ); - - /* update rate control tab */ - if (SendMessage( GetDlgItem(hTabs[2],IDC_DIRECTPRED), CB_GETCOUNT, 0, 0 ) == 0) - { - SendDlgItemMessage(hTabs[2], IDC_DIRECTPRED, CB_ADDSTRING, 0, (LPARAM)"Spatial"); - SendDlgItemMessage(hTabs[2], IDC_DIRECTPRED, CB_ADDSTRING, 0, (LPARAM)"Temporal"); - } - SetDlgItemInt( hTabs[1], IDC_QPMIN, config->i_qp_min, FALSE ); - SetDlgItemInt( hTabs[1], IDC_QPMAX, config->i_qp_max, FALSE ); - SetDlgItemInt( hTabs[1], IDC_QPSTEP, config->i_qp_step, FALSE ); - SetDlgItemInt( hTabs[1], IDC_IPRATIO, config->i_key_boost, FALSE ); - SetDlgItemInt( hTabs[1], IDC_PBRATIO, config->i_b_red, FALSE ); - SetDlgItemInt( hTabs[1], IDC_CURVECOMP, config->i_curve_comp, FALSE ); - - /* update debug tab */ - if (SendMessage( GetDlgItem(hTabs[3],IDC_LOG), CB_GETCOUNT, 0, 0 ) == 0) - { - SendDlgItemMessage(hTabs[3], IDC_LOG, CB_ADDSTRING, 0, (LPARAM)"None"); - SendDlgItemMessage(hTabs[3], IDC_LOG, CB_ADDSTRING, 0, (LPARAM)"Error"); - SendDlgItemMessage(hTabs[3], IDC_LOG, CB_ADDSTRING, 0, (LPARAM)"Warning"); - SendDlgItemMessage(hTabs[3], IDC_LOG, CB_ADDSTRING, 0, (LPARAM)"Info"); - SendDlgItemMessage(hTabs[3], IDC_LOG, CB_ADDSTRING, 0, (LPARAM)"Debug"); - } - SendDlgItemMessage(hTabs[3], IDC_LOG, CB_SETCURSEL, (config->i_log_level), 0); - - memcpy( fourcc, config->fcc, 4 ); - fourcc[4] = '\0'; - SetDlgItemText( hTabs[3], IDC_FOURCC, fourcc ); - - /* update misc. tab */ - SetDlgItemInt( hTabs[3], IDC_THREADEDIT, config->i_threads, FALSE ); - SetDlgItemInt( hTabs[3], IDC_NR, config->i_noise_reduction, FALSE ); - CheckDlgButton( hTabs[3],IDC_CABAC, - config->b_cabac ? BST_CHECKED : BST_UNCHECKED ); - CheckDlgButton( hTabs[3],IDC_TRELLIS, - config->i_trellis ? BST_CHECKED: BST_UNCHECKED ); - CheckDlgButton( hTabs[3],IDC_LOOPFILTER, - config->b_filter ? BST_CHECKED: BST_UNCHECKED ); - - SetDlgItemInt( hTabs[3], IDC_SAR_W, config->i_sar_width, FALSE ); - SetDlgItemInt( hTabs[3], IDC_SAR_H, config->i_sar_height, FALSE ); - - SendDlgItemMessage( hTabs[3], IDC_INLOOP_A, TBM_SETRANGE, TRUE, - (LPARAM) MAKELONG( -6, 6 ) ); - SendDlgItemMessage( hTabs[3], IDC_INLOOP_A, TBM_SETPOS, TRUE, - config->i_inloop_a ); - set_dlgitem_int( hTabs[3], IDC_LOOPA_TXT, config->i_inloop_a); - SendDlgItemMessage( hTabs[3], IDC_INLOOP_B, TBM_SETRANGE, TRUE, - (LPARAM) MAKELONG( -6, 6 ) ); - SendDlgItemMessage( hTabs[3], IDC_INLOOP_B, TBM_SETPOS, TRUE, - config->i_inloop_b ); - set_dlgitem_int( hTabs[3], IDC_LOOPB_TXT, config->i_inloop_b); - - /* update i/p-frames tab */ - CheckDlgButton( hTabs[2],IDC_P8X8, - config->b_psub16x16 ? BST_CHECKED: BST_UNCHECKED ); - CheckDlgButton( hTabs[2],IDC_P4X4, - config->b_psub8x8 ? BST_CHECKED: BST_UNCHECKED ); - CheckDlgButton( hTabs[2],IDC_I4X4, - config->b_i4x4 ? BST_CHECKED: BST_UNCHECKED ); - CheckDlgButton( hTabs[2],IDC_I8X8, - config->b_i8x8 ? BST_CHECKED: BST_UNCHECKED ); - CheckDlgButton( hTabs[2],IDC_DCT8X8, - config->b_dct8x8 ? BST_CHECKED: BST_UNCHECKED ); - - /* update b-frames tab */ - CheckDlgButton( hTabs[2],IDC_WBPRED, - config->b_b_wpred ? BST_CHECKED: BST_UNCHECKED ); - CheckDlgButton( hTabs[2],IDC_BADAPT, - config->b_bframe_adaptive ? BST_CHECKED: BST_UNCHECKED ); - CheckDlgButton( hTabs[2],IDC_BIDIR_ME, - config->b_bidir_me ? BST_CHECKED: BST_UNCHECKED ); - CheckDlgButton( hTabs[2],IDC_BREFS, - config->b_b_refs ? BST_CHECKED: BST_UNCHECKED ); - CheckDlgButton( hTabs[2],IDC_B8X8, - config->b_bsub16x16 ? BST_CHECKED: BST_UNCHECKED ); - SetDlgItemInt( hTabs[2], IDC_BFRAME, config->i_bframe, FALSE ); - SetDlgItemInt( hTabs[2], IDC_BBIAS, config->i_bframe_bias, TRUE ); - SendDlgItemMessage( hTabs[2], IDC_BBIASSLIDER, TBM_SETRANGE, TRUE, - (LPARAM) MAKELONG( -100, 100 ) ); - SendDlgItemMessage( hTabs[2], IDC_BBIASSLIDER, TBM_SETPOS, TRUE, - config->i_bframe_bias ); - SendDlgItemMessage(hTabs[2], IDC_DIRECTPRED, CB_SETCURSEL, (config->i_direct_mv_pred), 0); - - /* update scene-cuts tab */ - SetDlgItemInt( hTabs[1], IDC_KEYINTMIN, config->i_keyint_min, FALSE ); - SetDlgItemInt( hTabs[1], IDC_KEYINTMAX, config->i_keyint_max, FALSE ); - SetDlgItemInt( hTabs[1], IDC_SCENECUT, config->i_scenecut_threshold, TRUE ); - - /* update motion estimation tab */ - if (SendMessage( GetDlgItem(hTabs[3],IDC_ME_METHOD), CB_GETCOUNT, 0, 0 ) == 0) - { - SendDlgItemMessage(hTabs[3], IDC_ME_METHOD, CB_ADDSTRING, 0, (LPARAM)"Diamond Search"); - SendDlgItemMessage(hTabs[3], IDC_ME_METHOD, CB_ADDSTRING, 0, (LPARAM)"Hexagonal Search"); - SendDlgItemMessage(hTabs[3], IDC_ME_METHOD, CB_ADDSTRING, 0, (LPARAM)"Uneven Multi-Hexagon"); - SendDlgItemMessage(hTabs[3], IDC_ME_METHOD, CB_ADDSTRING, 0, (LPARAM)"Exhaustive Search"); - SendDlgItemMessage(hTabs[3], IDC_SUBPEL, CB_ADDSTRING, 0, (LPARAM)"1 (Fastest)"); - SendDlgItemMessage(hTabs[3], IDC_SUBPEL, CB_ADDSTRING, 0, (LPARAM)"2"); - SendDlgItemMessage(hTabs[3], IDC_SUBPEL, CB_ADDSTRING, 0, (LPARAM)"3"); - SendDlgItemMessage(hTabs[3], IDC_SUBPEL, CB_ADDSTRING, 0, (LPARAM)"4"); - SendDlgItemMessage(hTabs[3], IDC_SUBPEL, CB_ADDSTRING, 0, (LPARAM)"5 (High Quality)"); - SendDlgItemMessage(hTabs[3], IDC_SUBPEL, CB_ADDSTRING, 0, (LPARAM)"6 (RDO)"); - SendDlgItemMessage(hTabs[3], IDC_SUBPEL, CB_ADDSTRING, 0, (LPARAM)"6b (RDO on B-frames)"); - } - - SendDlgItemMessage(hTabs[3], IDC_ME_METHOD, CB_SETCURSEL, (config->i_me_method), 0); - SendDlgItemMessage(hTabs[3], IDC_SUBPEL, CB_SETCURSEL, (config->i_subpel_refine), 0); - SetDlgItemInt( hTabs[3], IDC_MERANGE, config->i_me_range, FALSE ); - CheckDlgButton( hTabs[3],IDC_CHROMAME, - config->b_chroma_me ? BST_CHECKED: BST_UNCHECKED ); - SetDlgItemInt( hTabs[3], IDC_REFFRAMES, config->i_refmax, FALSE ); - CheckDlgButton( hTabs[3],IDC_MIXEDREF, - config->b_mixedref ? BST_CHECKED: BST_UNCHECKED ); -} - -BOOL CALLBACK callback_tabs( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ) -{ - CONFIG* config = (CONFIG*)GetWindowLong(hDlg, GWL_USERDATA); - switch( uMsg ) - { - case WM_INITDIALOG : - - SetWindowLong( hDlg, GWL_USERDATA, lParam ); - config = (CONFIG*)lParam; - break; - - case WM_COMMAND: - - switch ( HIWORD( wParam ) ) - { - case BN_CLICKED : - - switch( LOWORD( wParam ) ) - { - case IDC_CABAC : - config->b_cabac = ( IsDlgButtonChecked( hTabs[3], IDC_CABAC ) == BST_CHECKED ); - break; - case IDC_TRELLIS : - config->i_trellis = ( IsDlgButtonChecked( hTabs[3], IDC_TRELLIS ) == BST_CHECKED ); - break; - case IDC_LOOPFILTER : - config->b_filter = ( IsDlgButtonChecked( hTabs[3], IDC_LOOPFILTER ) == BST_CHECKED ); - break; - case IDC_BREFS : - config->b_b_refs = ( IsDlgButtonChecked( hTabs[2], IDC_BREFS ) == BST_CHECKED ); - break; - case IDC_WBPRED : - config->b_b_wpred = ( IsDlgButtonChecked( hTabs[2], IDC_WBPRED ) == BST_CHECKED ); - break; - case IDC_BADAPT : - config->b_bframe_adaptive = ( IsDlgButtonChecked( hTabs[2], IDC_BADAPT ) == BST_CHECKED ); - break; - case IDC_BIDIR_ME : - config->b_bidir_me = ( IsDlgButtonChecked( hTabs[2], IDC_BIDIR_ME ) == BST_CHECKED ); - break; - case IDC_P8X8 : - config->b_psub16x16 = ( IsDlgButtonChecked( hTabs[2], IDC_P8X8 ) == BST_CHECKED ); - break; - case IDC_P4X4 : - config->b_psub8x8 = ( IsDlgButtonChecked( hTabs[2], IDC_P4X4 ) == BST_CHECKED ); - break; - case IDC_B8X8 : - config->b_bsub16x16 = ( IsDlgButtonChecked( hTabs[2], IDC_B8X8 ) == BST_CHECKED ); - break; - case IDC_I4X4 : - config->b_i4x4 = ( IsDlgButtonChecked( hTabs[2], IDC_I4X4 ) == BST_CHECKED ); - break; - case IDC_I8X8 : - config->b_i8x8 = ( IsDlgButtonChecked( hTabs[2], IDC_I8X8 ) == BST_CHECKED ); - break; - case IDC_DCT8X8 : - config->b_dct8x8 = ( IsDlgButtonChecked( hTabs[2], IDC_DCT8X8 ) == BST_CHECKED ); - break; - case IDC_MIXEDREF : - config->b_mixedref = ( IsDlgButtonChecked( hTabs[3], IDC_MIXEDREF ) == BST_CHECKED ); - break; - case IDC_CHROMAME : - config->b_chroma_me = ( IsDlgButtonChecked( hTabs[3], IDC_CHROMAME ) == BST_CHECKED ); - break; - case IDC_UPDATESTATS : - config->b_updatestats = ( IsDlgButtonChecked( hTabs[0], IDC_UPDATESTATS ) == BST_CHECKED ); - break; - case IDC_STATSFILE_BROWSE : - { - OPENFILENAME ofn; - char tmp[MAX_PATH]; - - GetDlgItemText( hTabs[0], IDC_STATSFILE, tmp, MAX_PATH ); - - memset( &ofn, 0, sizeof( OPENFILENAME ) ); - ofn.lStructSize = sizeof( OPENFILENAME ); - - ofn.hwndOwner = hDlg; - ofn.lpstrFilter = "Statsfile (*.stats)\0*.stats\0All files (*.*)\0*.*\0\0"; - ofn.lpstrFile = tmp; - ofn.nMaxFile = MAX_PATH-4; - ofn.Flags = OFN_PATHMUSTEXIST; - - if( config->i_pass == 1 ) - ofn.Flags |= OFN_OVERWRITEPROMPT; - else ofn.Flags |= OFN_FILEMUSTEXIST; - - if( ( config->i_pass == 1 && GetSaveFileName( &ofn ) ) || - ( config->i_pass > 1 && GetOpenFileName( &ofn ) ) ) - SetDlgItemText( hTabs[0], IDC_STATSFILE, tmp ); - } - break; - } - break; - - case EN_CHANGE : - - switch( LOWORD( wParam ) ) - { - case IDC_FOURCC : - GetDlgItemText( hTabs[3], IDC_FOURCC, config->fcc, 5 ); - break; - case IDC_NR : - config->i_noise_reduction = GetDlgItemInt( hTabs[3], IDC_NR, FALSE, FALSE ); - case IDC_THREADEDIT : - config->i_threads = GetDlgItemInt( hTabs[3], IDC_THREADEDIT, FALSE, FALSE ); - if (config->i_threads < 1) - { - config->i_threads = 1; - SetDlgItemInt( hTabs[3], IDC_THREADEDIT, config->i_threads, FALSE ); - } - else if (config->i_threads > 4) - { - config->i_threads = 4; - SetDlgItemInt( hTabs[3], IDC_THREADEDIT, config->i_threads, FALSE ); - } - break; - case IDC_BITRATEEDIT : - switch (config->i_encoding_type) - { - case 0: - config->bitrate = GetDlgItemInt( hTabs[0], IDC_BITRATEEDIT, FALSE, FALSE ); - SendDlgItemMessage( hTabs[0], IDC_BITRATESLIDER, TBM_SETPOS, TRUE, config->bitrate ); - break; - case 1: - config->i_qp = GetDlgItemInt( hTabs[0], IDC_BITRATEEDIT, FALSE, FALSE ); - SendDlgItemMessage( hTabs[0], IDC_BITRATESLIDER, TBM_SETPOS, TRUE, config->i_qp ); - break; - case 2: - config->i_2passbitrate = GetDlgItemInt( hTabs[0], IDC_BITRATEEDIT, FALSE, FALSE ); - SendDlgItemMessage( hTabs[0], IDC_BITRATESLIDER, TBM_SETPOS, TRUE, config->i_2passbitrate ); - break; - } - break; - case IDC_STATSFILE : - if( GetDlgItemText( hTabs[0], IDC_STATSFILE, config->stats, MAX_PATH ) == 0 ) - lstrcpy( config->stats, ".\\x264.stats" ); - break; - case IDC_KEYINTMIN : - config->i_keyint_min = GetDlgItemInt( hTabs[1], IDC_KEYINTMIN, FALSE, FALSE ); - break; - case IDC_KEYINTMAX : - config->i_keyint_max = GetDlgItemInt( hTabs[1], IDC_KEYINTMAX, FALSE, FALSE ); - break; - case IDC_SCENECUT : - config->i_scenecut_threshold = GetDlgItemInt( hTabs[1], IDC_SCENECUT, FALSE, TRUE ); - if( config->i_scenecut_threshold > 100 ) - { - config->i_scenecut_threshold = 100; - SetDlgItemInt( hTabs[1], IDC_SCENECUT, config->i_scenecut_threshold, TRUE ); - } else if ( config->i_scenecut_threshold < -1 ) - { - config->i_scenecut_threshold = -1; - SetDlgItemInt( hTabs[1], IDC_SCENECUT, config->i_scenecut_threshold, TRUE ); - } - break; - case IDC_QPMIN : - config->i_qp_min = GetDlgItemInt( hTabs[1], IDC_QPMIN, FALSE, FALSE ); - if( config->i_qp_min > 51 ) - { - config->i_qp_min = 51; - SetDlgItemInt( hTabs[1], IDC_QPMIN, config->i_qp_min, FALSE ); - } else if ( config->i_qp_min < 1 ) - { - config->i_qp_min = 1; - SetDlgItemInt( hTabs[1], IDC_QPMIN, config->i_qp_min, FALSE ); - } - break; - case IDC_QPMAX : - config->i_qp_max = GetDlgItemInt( hTabs[1], IDC_QPMAX, FALSE, FALSE ); - if( config->i_qp_max > 51 ) - { - config->i_qp_max = 51; - SetDlgItemInt( hTabs[1], IDC_QPMAX, config->i_qp_max, FALSE ); - } else if ( config->i_qp_max < 1 ) - { - config->i_qp_max = 1; - SetDlgItemInt( hTabs[1], IDC_QPMAX, config->i_qp_max, FALSE ); - } - break; - case IDC_QPSTEP : - config->i_qp_step = GetDlgItemInt( hTabs[1], IDC_QPSTEP, FALSE, FALSE ); - if( config->i_qp_step > 50 ) - { - config->i_qp_step = 50; - SetDlgItemInt( hTabs[1], IDC_QPSTEP, config->i_qp_step, FALSE ); - } else if ( config->i_qp_step < 1 ) - { - config->i_qp_step = 1; - SetDlgItemInt( hTabs[1], IDC_QPSTEP, config->i_qp_step, FALSE ); - } - break; - case IDC_SAR_W : - config->i_sar_width = GetDlgItemInt( hTabs[3], IDC_SAR_W, FALSE, FALSE ); - break; - case IDC_SAR_H : - config->i_sar_height = GetDlgItemInt( hTabs[3], IDC_SAR_H, FALSE, FALSE ); - break; - case IDC_REFFRAMES : - config->i_refmax = GetDlgItemInt( hTabs[3], IDC_REFFRAMES, FALSE, FALSE ); - if( config->i_refmax > 16 ) - { - config->i_refmax = 16; - SetDlgItemInt( hTabs[3], IDC_REFFRAMES, config->i_refmax, FALSE ); - } - break; - case IDC_MERANGE : - config->i_me_range = GetDlgItemInt( hTabs[3], IDC_MERANGE, FALSE, FALSE ); - if( config->i_me_range > 64 ) - { - config->i_me_range = 64; - SetDlgItemInt( hTabs[3], IDC_MERANGE, config->i_me_range, FALSE ); - } - break; - - case IDC_BFRAME : - config->i_bframe = GetDlgItemInt( hTabs[2], IDC_BFRAME, FALSE, FALSE ); - if( config->i_bframe > 5 ) - { - config->i_bframe = 5; - SetDlgItemInt( hTabs[2], IDC_BFRAME, config->i_bframe, FALSE ); - } - break; - case IDC_BBIAS : - config->i_bframe_bias = GetDlgItemInt( hTabs[2], IDC_BBIAS, FALSE, TRUE ); - SendDlgItemMessage(hTabs[2], IDC_BBIASSLIDER, TBM_SETPOS, 1, - config->i_bframe_bias); - if( config->i_bframe_bias > 100 ) - { - config->i_bframe_bias = 100; - SetDlgItemInt( hTabs[2], IDC_BBIAS, config->i_bframe_bias, TRUE ); - } else if ( config->i_bframe_bias < -100 ) - { - config->i_bframe_bias = -100; - SetDlgItemInt( hTabs[2], IDC_BBIAS, config->i_bframe_bias, TRUE ); - } - break; - case IDC_IPRATIO : - config->i_key_boost = GetDlgItemInt( hTabs[1], IDC_IPRATIO, FALSE, FALSE ); - if (config->i_key_boost < 0) - { - config->i_key_boost = 0; - SetDlgItemInt( hTabs[1], IDC_IPRATIO, config->i_key_boost, FALSE ); - } - else if (config->i_key_boost > 70) - { - config->i_key_boost = 70; - SetDlgItemInt( hTabs[1], IDC_IPRATIO, config->i_key_boost, FALSE ); - } - break; - case IDC_PBRATIO : - config->i_b_red = GetDlgItemInt( hTabs[1], IDC_PBRATIO, FALSE, FALSE ); - if (config->i_b_red < 0) - { - config->i_b_red = 0; - SetDlgItemInt( hTabs[1], IDC_PBRATIO, config->i_b_red, FALSE ); - } - else if (config->i_b_red > 60) - { - config->i_b_red = 60; - SetDlgItemInt( hTabs[1], IDC_PBRATIO, config->i_b_red, FALSE ); - } - break; - case IDC_CURVECOMP: - config->i_curve_comp = GetDlgItemInt( hTabs[1], IDC_CURVECOMP, FALSE, FALSE ); - if( config->i_curve_comp < 0 ) - { - config->i_curve_comp = 0; - SetDlgItemInt( hTabs[1], IDC_CURVECOMP, config->i_curve_comp, FALSE ); - } - else if( config->i_curve_comp > 100 ) - { - config->i_curve_comp = 100; - SetDlgItemInt( hTabs[1], IDC_CURVECOMP, config->i_curve_comp, FALSE ); - } - break; - } - break; - - case LBN_SELCHANGE : - - switch ( LOWORD( wParam ) ) - { - case IDC_DIRECTPRED: - config->i_direct_mv_pred = SendDlgItemMessage(hTabs[2], IDC_DIRECTPRED, CB_GETCURSEL, 0, 0); - break; - case IDC_SUBPEL: - config->i_subpel_refine = SendDlgItemMessage(hTabs[3], IDC_SUBPEL, CB_GETCURSEL, 0, 0); - break; - case IDC_ME_METHOD: - config->i_me_method = SendDlgItemMessage(hTabs[3], IDC_ME_METHOD, CB_GETCURSEL, 0, 0); - break; - case IDC_LOG: - config->i_log_level = SendDlgItemMessage(hTabs[3], IDC_LOG, CB_GETCURSEL, 0, 0); - break; - case IDC_BITRATEMODE: - switch(SendDlgItemMessage(hTabs[0], IDC_BITRATEMODE, CB_GETCURSEL, 0, 0)) - { - case 0: - config->i_encoding_type = 0; - break; - case 1: - config->i_encoding_type = 1; - break; - case 2: - config->i_encoding_type = 2; - config->i_pass = 1; - config->b_fast1pass = FALSE; - break; - case 3: - config->i_encoding_type = 2; - config->i_pass = 1; - config->b_fast1pass = TRUE; - break; - case 4: - config->i_encoding_type = 2; - config->i_pass = 2; - break; - } - tabs_update_items( hDlg, config ); - break; - } - break; - - case EN_KILLFOCUS : - - switch( LOWORD( wParam ) ) - { - case IDC_MERANGE : - config->i_me_range = GetDlgItemInt( hTabs[3], IDC_MERANGE, FALSE, FALSE ); - if( config->i_me_range < 4 ) - { - config->i_me_range = 4; - SetDlgItemInt( hTabs[3], IDC_MERANGE, config->i_me_range, FALSE ); - } - break; - } - break; - } - break; - - case WM_HSCROLL : - - if( (HWND) lParam == GetDlgItem( hTabs[0], IDC_BITRATESLIDER ) ) - { - switch (config->i_encoding_type) - { - case 0: - config->bitrate = SendDlgItemMessage( hTabs[0], IDC_BITRATESLIDER, TBM_GETPOS, 0, 0 ); - SetDlgItemInt( hTabs[0], IDC_BITRATEEDIT, config->bitrate, FALSE ); - break; - case 1: - config->i_qp = SendDlgItemMessage( hTabs[0], IDC_BITRATESLIDER, TBM_GETPOS, 0, 0 ); - SetDlgItemInt( hTabs[0], IDC_BITRATEEDIT, config->i_qp, FALSE ); - break; - case 2: - config->i_2passbitrate = SendDlgItemMessage( hTabs[0], IDC_BITRATESLIDER, TBM_GETPOS, 0, 0 ); - SetDlgItemInt( hTabs[0], IDC_BITRATEEDIT, config->i_2passbitrate, FALSE ); - break; - } - break; - } - else if( (HWND) lParam == GetDlgItem( hTabs[3], IDC_INLOOP_A ) ) - { - config->i_inloop_a = SendDlgItemMessage( hTabs[3], IDC_INLOOP_A, TBM_GETPOS, 0, 0 ); - set_dlgitem_int( hTabs[3], IDC_LOOPA_TXT, config->i_inloop_a); - } - else if( (HWND) lParam == GetDlgItem( hTabs[3], IDC_INLOOP_B ) ) - { - config->i_inloop_b = SendDlgItemMessage( hTabs[3], IDC_INLOOP_B, TBM_GETPOS, 0, 0 ); - set_dlgitem_int( hTabs[3], IDC_LOOPB_TXT, config->i_inloop_b); - } - else if( (HWND) lParam == GetDlgItem( hTabs[2], IDC_BBIASSLIDER ) ) - { - config->i_bframe_bias = SendDlgItemMessage( hTabs[2], IDC_BBIASSLIDER, TBM_GETPOS, 0, 0 ); - set_dlgitem_int( hTabs[2], IDC_BBIAS, config->i_bframe_bias); - } - break; - - default : - return 0; - } - - tabs_enable_items( hDlg, config ); - return 1; -} - - -/* About box */ - -BOOL CALLBACK callback_about( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ) -{ - switch( uMsg ) - { - case WM_INITDIALOG : - { - char temp[1024]; - sprintf( temp, "Core %d%s, build %s %s", X264_BUILD, X264_VERSION, __DATE__, __TIME__ ); - SetDlgItemText( hDlg, IDC_BUILD, temp ); - break; - } - - case WM_COMMAND: - if (LOWORD(wParam) == IDC_HOMEPAGE && HIWORD(wParam) == STN_CLICKED) - ShellExecute( hDlg, "open", X264_WEBSITE, NULL, NULL, SW_SHOWNORMAL ); - else if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) - EndDialog( hDlg, LOWORD(wParam) ); - break; - - default : - return 0; - } - - return 1; -} - - -/* Error console */ - -BOOL CALLBACK callback_err_console( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) -{ - switch( uMsg ) - { - case WM_INITDIALOG : - break; - case WM_DESTROY : - break; - case WM_COMMAND : - if( HIWORD( wParam ) == BN_CLICKED ) { - switch( LOWORD( wParam ) ) { - case IDOK : - DestroyWindow( hWnd ); - break; - case IDC_COPYCLIP : - if( OpenClipboard( hWnd ) ) - { - int i; - int num_lines = SendDlgItemMessage( hWnd, IDC_CONSOLE, - LB_GETCOUNT, 0, 0 ); - int text_size; - char *buffer; - HGLOBAL clipbuffer; - - if( num_lines <= 0 ) - break; - - /* calculate text size */ - for( i = 0, text_size = 0; i < num_lines; i++ ) - text_size += SendDlgItemMessage( hWnd, IDC_CONSOLE, - LB_GETTEXTLEN, ( WPARAM )i, 0 ); - - /* CR-LF for each line + terminating NULL */ - text_size += 2 * num_lines + 1; - - EmptyClipboard( ); - clipbuffer = GlobalAlloc( GMEM_MOVEABLE | GMEM_DDESHARE, - text_size ); - buffer = (char *)GlobalLock( clipbuffer ); - - /* concatenate lines of text in the global buffer */ - for( i = 0; i < num_lines; i++ ) - { - char msg_buf[1024]; - - SendDlgItemMessage( hWnd, IDC_CONSOLE, LB_GETTEXT, - ( WPARAM )i, ( LPARAM )msg_buf ); - strcat( msg_buf, "\r\n" ); - memcpy( buffer, msg_buf, strlen( msg_buf ) ); - buffer += strlen( msg_buf ); - } - *buffer = 0; /* null-terminate the buffer */ - - GlobalUnlock( clipbuffer ); - SetClipboardData( CF_TEXT, clipbuffer ); - CloseClipboard( ); - } - break; - default : - return 0; - } - break; - } - break; - - default : - return DefWindowProc( hWnd, uMsg, wParam, lParam ); - } - - return 0; -} - - diff --git a/vfw/driverproc.c b/vfw/driverproc.c deleted file mode 100644 index 518b70d3..00000000 --- a/vfw/driverproc.c +++ /dev/null @@ -1,220 +0,0 @@ -/***************************************************************************** - * drvproc.c: vfw x264 wrapper - ***************************************************************************** - * Copyright (C) 2003 Laurent Aimar - * $Id: driverproc.c,v 1.1 2004/06/03 19:27:09 fenrir Exp $ - * - * Authors: Justin Clay - * Laurent Aimar - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. - *****************************************************************************/ - -#include "x264vfw.h" - -/* Global dll instance */ -HINSTANCE g_hInst; - - -/* Calling back point for our DLL so we can keep track of the window in g_hInst */ -BOOL WINAPI DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) -{ - g_hInst = (HINSTANCE) hModule; - return TRUE; -} - -/* This little puppy handles the calls which vfw programs send out to the codec */ -LRESULT WINAPI DriverProc( DWORD dwDriverId, HDRVR hDriver, UINT uMsg, LPARAM lParam1, LPARAM lParam2 ) -{ - CODEC *codec = (CODEC *)dwDriverId; - - switch( uMsg ) - { - case DRV_LOAD: - case DRV_FREE: - return DRV_OK; - - case DRV_OPEN: - { - ICOPEN *icopen = (ICOPEN *)lParam2; - - if( icopen != NULL && icopen->fccType != ICTYPE_VIDEO ) - return DRV_CANCEL; - - if( ( codec = malloc( sizeof( CODEC ) ) ) == NULL ) - { - if( icopen != NULL ) - icopen->dwError = ICERR_MEMORY; - return 0; - } - - memset( codec, 0, sizeof( CODEC ) ); - config_reg_load( &codec->config ); - codec->h = NULL; - - if( icopen != NULL ) - icopen->dwError = ICERR_OK; - return (LRESULT)codec; - } - - case DRV_CLOSE: - /* From xvid: compress_end/decompress_end don't always get called */ - compress_end(codec); - free( codec ); - return DRV_OK; - - case DRV_DISABLE: - case DRV_ENABLE: - return DRV_OK; - - case DRV_INSTALL: - case DRV_REMOVE: - return DRV_OK; - - case DRV_QUERYCONFIGURE: - case DRV_CONFIGURE: - return DRV_CANCEL; - - /* info */ - case ICM_GETINFO: - { - ICINFO *icinfo = (ICINFO *)lParam1; - - /* return a description */ - icinfo->fccType = ICTYPE_VIDEO; - icinfo->fccHandler = FOURCC_X264; - icinfo->dwFlags = VIDCF_COMPRESSFRAMES | VIDCF_FASTTEMPORALC; - - icinfo->dwVersion = 0; - icinfo->dwVersionICM = ICVERSION; - - wcscpy( icinfo->szName, X264_NAME_L); - wcscpy( icinfo->szDescription, X264_DESC_L); - - return lParam2; /* size of struct */ - } - - case ICM_ABOUT: - if( lParam1 != -1 ) - { - DialogBoxParam(g_hInst, MAKEINTRESOURCE(IDD_ABOUT), (HWND)lParam1, callback_about, 0 ); - } - return ICERR_OK; - - case ICM_CONFIGURE: - if( lParam1 != -1 ) - { - CONFIG temp; - - codec->config.b_save = FALSE; - memcpy( &temp, &codec->config, sizeof(CONFIG) ); - - DialogBoxParam( g_hInst, MAKEINTRESOURCE(IDD_MAINCONFIG), (HWND)lParam1, callback_main, (LPARAM)&temp ); - - if( temp.b_save ) - { - memcpy( &codec->config, &temp, sizeof(CONFIG) ); - config_reg_save( &codec->config ); - } - } - return ICERR_OK; - - case ICM_GETSTATE: - if( (void*)lParam1 == NULL ) - { - return sizeof( CONFIG ); - } - memcpy( (void*)lParam1, &codec->config, sizeof( CONFIG ) ); - return ICERR_OK; - - case ICM_SETSTATE: - if( (void*)lParam1 == NULL ) - { - config_reg_load( &codec->config ); - return 0; - } - memcpy( &codec->config, (void*)lParam1, sizeof( CONFIG ) ); - return 0; - - /* not sure the difference, private/public data? */ - case ICM_GET: - case ICM_SET: - return ICERR_OK; - - - /* older-stype config */ - case ICM_GETDEFAULTQUALITY: - case ICM_GETQUALITY: - case ICM_SETQUALITY: - case ICM_GETBUFFERSWANTED: - case ICM_GETDEFAULTKEYFRAMERATE: - return ICERR_UNSUPPORTED; - - - /* compressor */ - case ICM_COMPRESS_QUERY: - return compress_query(codec, (BITMAPINFO *)lParam1, (BITMAPINFO *)lParam2); - - case ICM_COMPRESS_GET_FORMAT: - return compress_get_format(codec, (BITMAPINFO *)lParam1, (BITMAPINFO *)lParam2); - - case ICM_COMPRESS_GET_SIZE: - return compress_get_size(codec, (BITMAPINFO *)lParam1, (BITMAPINFO *)lParam2); - - case ICM_COMPRESS_FRAMES_INFO: - return compress_frames_info(codec, (ICCOMPRESSFRAMES *)lParam1); - - case ICM_COMPRESS_BEGIN: - return compress_begin(codec, (BITMAPINFO *)lParam1, (BITMAPINFO *)lParam2); - - case ICM_COMPRESS_END: - return compress_end(codec); - - case ICM_COMPRESS: - return compress(codec, (ICCOMPRESS *)lParam1); - - /* decompressor : not implemented */ - case ICM_DECOMPRESS_QUERY: - case ICM_DECOMPRESS_GET_FORMAT: - case ICM_DECOMPRESS_BEGIN: - case ICM_DECOMPRESS_END: - case ICM_DECOMPRESS: - case ICM_DECOMPRESS_GET_PALETTE: - case ICM_DECOMPRESS_SET_PALETTE: - case ICM_DECOMPRESSEX_QUERY: - case ICM_DECOMPRESSEX_BEGIN: - case ICM_DECOMPRESSEX_END: - case ICM_DECOMPRESSEX: - return ICERR_UNSUPPORTED; - - default: - if (uMsg < DRV_USER) - return DefDriverProc(dwDriverId, hDriver, uMsg, lParam1, lParam2); - else - return ICERR_UNSUPPORTED; - } -} - -void WINAPI Configure(HWND hwnd, HINSTANCE hinst, LPTSTR lpCmdLine, int nCmdShow) -{ - DWORD dwDriverId; - - dwDriverId = DriverProc(0, 0, DRV_OPEN, 0, 0); - if (dwDriverId != (DWORD)NULL) - { - DriverProc(dwDriverId, 0, ICM_CONFIGURE, (LPARAM)GetDesktopWindow(), 0); - DriverProc(dwDriverId, 0, DRV_CLOSE, 0, 0); - } -} diff --git a/vfw/driverproc.def b/vfw/driverproc.def deleted file mode 100644 index 9fd6676b..00000000 --- a/vfw/driverproc.def +++ /dev/null @@ -1,8 +0,0 @@ -; DriverProc.def : Declares the module parameters for the DLL. - -DESCRIPTION 'X264 H.264/AVC Video Codec' - -EXPORTS - DriverProc - Configure - diff --git a/vfw/installer/win.bmp b/vfw/installer/win.bmp deleted file mode 100644 index 5524eef945119e421d076d8fa9f8ded1205c1021..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 26494 zcmeI4OO7MC5kPZ*1k`{R1^5&`gI5VdK=sC`V|c5TODjve>RnyJ2k9f#VgP9;$A|IZ zFG;54F~%cyD;YlqpMqp&R-w^<`}@ECF;V*`T>k=}f5Ydmzf99F(@gen;Q#ZV_(KN0 zoTmx?PUkasa0L-Q=jrFqpWwLB-|2Qk2|n-#O>o)o_X{-Wf`nSDakPw3jfYK`bB4xt zlzN(G*<-Y7JQQ>MT>>%FDKxL89K za#D8o@I%;BUhry0w+?7yH%imwCgYhJR~*F+14Ry)q)rp%XICIu z?JNm~sm5bi9p=<51QytAiYZRd*(hWVCP{oT!N&Du=PDsNHAz9U+A=4{ zwmCIt&OEEnb2c$;6o$r{Q^Wpbe~Z(yP^7A{7S*%GsW~`MRMJGD-qo{#X~Q^B^prAi zvU{CVQpmxU0_K>$p6i^JGsLkWW@a1hPZB#ZHOvNaCcAdl(+1eLK^tl2WT}tSMkyw3 z&_XdGlsI{a5oD6)%sl=MDp5V0601w@U}gC&rjOI&yD<5@(;z>2BwNbJOp5uOWc4gC zut}o}5$f|ovz`{5QomtuAYJ= zIUQaQ#Z&2Jfal!vJThXGG7Oh``h}O2GOP9CDfbpv=gct6snlxmTu*=EIml)eNe7n& z34=ax&KyW{k!Z7uR8A#UiNZc`rl4+C7G*5F+nH!m6kp(+A=FPxvJFRf)1~%(#G}=rHQV3)X6y==R6sC;3Fcvzp zo9f2|D?}uma^}O-+-Z(PWqSyfAW&0ICLtWTNVM(-GoTd0#0aW#N}0m6)=9Ab)L{mc zIM8en=N#;UC%uM?K?2DUj2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l9GIa1F~ z%8_;Nr5veeH)i)a>Zk1I?5FIm=Llx!x{pwHat={;)^iNAXWa)WyEq3ad+Iri*|F}5 zS-c08jII09IOR$`XC_d}pqIE(TZ3~8X1$)owS{tJ-SPEz6J@QQdjn)CE!nDGt*0@L z{tl;7&xCW8DtGp9>L~c{*;d-G5?6kok2ocCzh6lRE|=364rI#UZI-e>XR^ec!Wp;Z z^h`OY%ZT4S33lq6|LzV6#e_4-IaS+>&*|nuk&>t_O8FShI3?t)VotrBNy>+C<~alB z?)doy;_hPHot$Y(}z=J#3rRzlUf&mlLi&)RQ_C^ZmJUkizpF zDhN&1eR^qgu7C#4?+5(y&}e@y-_HnlC+9cIiIv>JX`*$n*K?Q??oLh4dO<@y6HdH4 zwK(gbNjIa3#AqtDrIGdHKW}($ZB=d0Dp29;Ar#g17h!Y*c)PHtSja z!Oe4C7D!2rU>o}rw^@cr2FH1w=+r~f@D2+1&z1d&HLB%A--74pfae_>JVU9ipCg*C znAA8AJAATXqhj{d6J{)JIpN7kl`g!8xB@03ZK3L=b^k1_ zEbh;>#t%^#`G3iol((j4@AKtK4q1olSp!S#PtK$ucdE~N-dVt8__Ll#LGDz4KlS_% Dp19ST diff --git a/vfw/installer/x264-conf.nsi b/vfw/installer/x264-conf.nsi deleted file mode 100644 index bd805842..00000000 --- a/vfw/installer/x264-conf.nsi +++ /dev/null @@ -1,114 +0,0 @@ -; !packhdr "x264.dat" "upx.exe --best x264.dat" -; --------------------------------------------------------------------------- -; --------------------------------------------------------------------------- - -!define NAME "x264 H.264/AVC Video Codec" -!define OUTFILE "x264vfw.exe" -!define INPUT_PATH "" -!define VFW_FILE1 "x264vfw.dll" -!define VFW_FILE2 "x264vfw.ico" -!define UNINST_NAME "x264-uninstall.exe" -!define MUI_WELCOMEFINISHPAGE_BITMAP win.bmp -!define MUI_UNWELCOMEFINISHPAGE_BITMAP win.bmp -!define MUI_COMPONENTSPAGE_SMALLDESC -!include "MUI.nsh" -!include "Sections.nsh" -!include "LogicLib.nsh" - -; --------------------------------------------------------------------------- -; NOTE: this .NSI script is designed for NSIS v1.8+ -; --------------------------------------------------------------------------- - -Name "${NAME}" -OutFile "${OUTFILE}" -setcompressor /solid lzma - -SetOverwrite ifnewer -SetDatablockOptimize on ; (can be off) -CRCCheck on ; (can be off) -AutoCloseWindow false ; (can be true for the window go away automatically at end) -ShowInstDetails hide ; (can be show to have them shown, or nevershow to disable) -SetDateSave off ; (can be on to have files restored to their orginal date) - -!insertmacro MUI_PAGE_WELCOME -!insertmacro MUI_PAGE_INSTFILES - -!insertmacro MUI_UNPAGE_CONFIRM -!insertmacro MUI_UNPAGE_INSTFILES -!insertmacro MUI_UNPAGE_FINISH -!insertmacro MUI_LANGUAGE "English" - -; --------------------------------------------------------------------------- - -;Section "" -; MessageBox MB_YESNO "This will install ${NAME}. Do you wish to continue?" IDYES gogogo -; Abort -; gogogo: -;SectionEnd - -Section "-hidden section" -;Section "" ; (default section) - SetOutPath "$SYSDIR" - ; add files / whatever that need to be installed here. - File "${INPUT_PATH}${VFW_FILE1}" - File "${INPUT_PATH}${VFW_FILE2}" - - CreateDirectory $SMPROGRAMS\x264 - CreateShortcut "$SMPROGRAMS\x264\x264 configuration.lnk" $SYSDIR\rundll32.exe x264vfw.dll,Configure x264vfw.ico - CreateShortcut "$SMPROGRAMS\x264\x264 Uninstall.lnk" $SYSDIR\x264-uninstall.exe - - ; write out uninstaller - WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "DisplayName" "${NAME} (remove only)" - WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "UninstallString" '"$SYSDIR\${UNINST_NAME}"' - WriteUninstaller "$SYSDIR\${UNINST_NAME}" - - DeleteRegKey HKCU "Software\GNU\x264" - - WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows NT\CurrentVersion\Drivers32" "vidc.X264" "x264vfw.dll" - WriteINIStr system.ini drivers32 "vidc.X264" "x264vfw.dll" - WriteRegStr HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Control\MediaResources\icm\vidc.X264" "Description" "x264 H.264 Video Codec" - WriteRegStr HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Control\MediaResources\icm\vidc.X264" "Driver" "x264vfw.dll" - WriteRegStr HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Control\MediaResources\icm\vidc.X264" "FriendlyName" "x264" - - - -SectionEnd ; end of default section - - - -; --------------------------------------------------------------------------- - -; begin uninstall settings/section -UninstallText "This will uninstall ${NAME} from your system" - -Section Uninstall - - ; add delete commands to delete whatever files/registry keys/etc you installed here. - Delete /REBOOTOK "$SYSDIR\${VFW_FILE1}" - Delete /REBOOTOK "$SYSDIR\${VFW_FILE2}" - Delete "$SYSDIR\${UNINST_NAME}" - - DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" - DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows NT\CurrentVersion\Drivers32\vidc.X264" - DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Drivers32\vidc.X264" - DeleteRegKey HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Control\MediaResources\icm\vidc.X264" - DeleteINIStr system.ini drivers32 "vidc.X264" - Delete "$SMPROGRAMS\x264\x264 configuration.lnk" - Delete "$SMPROGRAMS\x264\x264 Uninstall.lnk" - RMDir "$SMPROGRAMS\x264" - - -SectionEnd ; end of uninstall section - -; --------------------------------------------------------------------------- - -Function un.onUninstSuccess - IfRebootFlag 0 NoReboot - MessageBox MB_OK \ - "A file couldn't be deleted. It will be deleted at next reboot." - NoReboot: -FunctionEnd - -; --------------------------------------------------------------------------- -; eof -; --------------------------------------------------------------------------- diff --git a/vfw/installer/x264vfw.ico b/vfw/installer/x264vfw.ico deleted file mode 100644 index f27337701a3f9088f0e26d5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sC!rZ{; z312JhRFK0u=%$-)LMsTU(A$Xn`S%9f6s{DFoqLM_7TSY8WR{)SC6DE32AgpKc?Kg zve>b%#51?j-xrV0Zm65n+PZw^%r&c5!};kYhHZA@#EFXan{U1uV7^KbW(ZCfkfX-z zf<8#`25M}B7y=vxebBjh?HG2B?$3;6h;bfZN`9lR>f)M`e0PlWgruc~+98YKTbuQk z67N7HG*BHKXsBP<*|}!<@|)MK!<0b(2tk@KaK)U0M==BmD23%57)6dcQ%%7`o>rZ6 z&S571LAIiYt8e8-#x-L@Wasr>^ z$^{#^+G?&j$dAoe@0D;mWPW7XvmAF0lF4|~ZofJ&Z>rDNTV6gf7VB+noIY;c;spzq zE?P8vNL{!P=Ta>51q&8nr^QEY;lhPDwc-E(QiPbmSVY(m6b1ppHw$jTHjYz4Yip~x zL1p}RwY^K@t>c5$d_2S_eVX4|*wZR@`1GtCpaF@}(^~BhM&l-{b*kGv#_t~!3UyRg zwnd|@H8rh?L|ao+TWjn8c%D~I@}owL0t00LNT26%(ZG4$*e2MT#GESPiE2tiTx0~_ z=+gY!sCrdUy-rkn)yy6hvs<7qh~joicWJf1vsij_az=YR?LHqaJc+WhnouZSSy_iG z%=xPg_MFDXMtrky0aAEuK6pf(COqQG1HvT;_Z=W9D=YK+{c@0G1q6GDxC4Cg2tMrL z>m6KE7T+nWdnh}JS54tHQwf;(W2O<(>2L*!eEG7ED@V6PWdrB7`8j5lfXSp2uSar9nX`k)$H6 z)+5UMYb?qGltt8K^@hc{-9Wks^9g_JS0=A#5XmGo4nr+S&1v@}biHW4YXznvXRW%05oH4B1K z5cHxbOT!7f%;ejprR#K=ul$s+lc<2)p+t2Ol|^b0&u0%Qy)b)7$WPfr`cqEx=S*mx o&y4;3g|Ih!!djQFK{LAUT0J|v>$^ZZW diff --git a/vfw/resource.h b/vfw/resource.h deleted file mode 100644 index 61e9d4e2..00000000 --- a/vfw/resource.h +++ /dev/null @@ -1,113 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by resource.rc -// -#define IDD_DIALOG1 101 -#define IDD_ABOUT 103 -#define IDD_ERRCONSOLE 104 -#define IDD_TAB_BITRATE 106 -#define IDD_MAINCONFIG 107 -#define IDB_LOGO 108 -#define IDD_TAB_IPFRAMES 109 -#define IDD_TAB_RATECONTROL 113 -#define IDD_TAB_MISC 114 -#define IDC_BITRATESLIDER 1002 -#define IDC_BITRATEEDIT 1003 -#define IDC_BITRATESLIDER2 1004 -#define IDC_QUANTSLIDER 1005 -#define IDC_CABAC 1006 -#define IDC_BITRATEEDIT2 1007 -#define IDC_QUANTEDIT 1008 -#define IDC_B8X8 1009 -#define IDC_2PASSBITRATE_S 1010 -#define IDC_LOOPFILTER 1011 -#define IDC_2PASSBITRATE 1012 -#define IDC_I4X4 1013 -#define IDC_BITRATELOW 1014 -#define IDC_P8X8 1015 -#define IDC_BITRATELOW2 1016 -#define IDC_P4X4 1017 -#define IDC_BITRATEHIGH 1018 -#define IDC_BFRAMES 1019 -#define IDC_BITRATEHIGH2 1020 -#define IDC_KEYINTMIN 1021 -#define IDC_BFRAMES2 1022 -#define IDC_KEYINTMAX 1023 -#define IDC_BITRATELOW3 1024 -#define IDC_EDIT3 1025 -#define IDC_REFFRAMES 1026 -#define IDC_BITRATEHIGH3 1027 -#define IDC_BFRAME 1028 -#define IDC_DEFAULTS 1029 -#define IDC_CHECK3 1030 -#define IDC_ADVANCED 1031 -#define IDC_RADIO1 1032 -#define IDC_RADIOBITRATE 1033 -#define IDC_MODE 1034 -#define IDC_RADIOQUALITY 1035 -#define IDC_RADIOQUANT 1036 -#define IDC_RADIOTWOPASS 1037 -#define IDC_USEADVANCED 1038 -#define IDC_ADVDEFAULTS 1039 -#define IDC_HOMEPAGE 1040 -#define IDC_X264 1041 -#define IDC_BUILD 1042 -#define IDC_FOURCC 1043 -#define IDC_SUBPEL 1044 -#define IDC_DIRECTPRED 1045 -#define IDC_2PASS1 1046 -#define IDC_2PASS2 1047 -#define IDC_INLOOP_A 1048 -#define IDC_LOOPA_TXT 1049 -#define IDC_FAST1PASS 1050 -#define IDC_IPRATIO 1051 -#define IDC_PBRATIO 1052 -#define IDC_CURVECOMP 1053 -#define IDC_UPDATESTATS 1054 -#define IDC_STATSFILE 1055 -#define IDC_STATSFILE_BROWSE 1056 -#define IDC_CONSOLE 1057 -#define IDC_COPYCLIP 1058 -#define IDC_BREFS 1059 -#define IDC_WBPRED 1060 -#define IDC_THREADS 1061 -#define IDC_THREADEDIT 1062 -#define IDC_SAR_W 1063 -#define IDC_SAR_H 1064 -#define IDC_I8X8 1065 -#define IDC_DCT8X8 1066 -#define IDC_NR 1067 -#define IDC_ME_METHOD 1068 -#define IDC_MIXEDREF 1069 -#define IDC_CHROMAME 1070 -#define IDC_MERANGE 1071 -#define IDC_BADAPT 1072 -#define IDC_BBIASSLIDER 1073 -#define IDC_BBIAS 1074 -#define IDC_QPMIN 1075 -#define IDC_QPMAX 1076 -#define IDC_QPSTEP 1077 -#define IDC_INLOOP_B 1078 -#define IDC_LOOPB_TXT 1079 -#define IDC_LOG 1080 -#define IDC_DEBUG 1084 -#define IDC_CPU_MMX 1086 -#define IDC_SCENECUT 1087 -#define IDC_TAB1 1089 -#define IDC_BITRATEMODE 1091 -#define IDC_BITRATELABEL 1092 -#define IDC_LOGO 1093 -#define IDC_BUILDREV 1095 -#define IDC_TRELLIS 1097 -#define IDC_BIDIR_ME 1098 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 109 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1101 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/vfw/resource.rc b/vfw/resource.rc deleted file mode 100644 index 5f0fe932..00000000 --- a/vfw/resource.rc +++ /dev/null @@ -1,314 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_MAINCONFIG DIALOGEX 0, 0, 204, 222 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "x264 Configuration" -FONT 8, "MS Sans Serif", 400, 0, 0x0 -BEGIN - DEFPUSHBUTTON "OK",IDOK,156,204,42,14 - CONTROL "",IDC_TAB1,"SysTabControl32",TCS_MULTILINE | WS_TABSTOP,0,0,204,200,WS_EX_TRANSPARENT - PUSHBUTTON "Load Defaults",IDC_DEFAULTS,6,204,54,14 - PUSHBUTTON "Cancel",IDCANCEL,108,204,42,14 -END - -IDD_TAB_BITRATE DIALOGEX 0, 0, 200, 188 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - CONTROL 108,IDC_LOGO,"Static",SS_BITMAP,31,12,136,39,WS_EX_CLIENTEDGE - COMBOBOX IDC_BITRATEMODE,30,66,138,66,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Average Bitrate (kbps)",IDC_BITRATELABEL,30,84,90,12 - CONTROL "",IDC_BITRATESLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,24,98,150,18 - EDITTEXT IDC_BITRATEEDIT,144,84,24,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "0",IDC_BITRATELOW,30,116,66,12 - RTEXT "5000",IDC_BITRATEHIGH,108,116,60,12 - CONTROL "Update Statsfile",IDC_UPDATESTATS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,138,72,12 - LTEXT "Statsfile name",IDC_STATIC,12,156,48,12,SS_CENTERIMAGE - EDITTEXT IDC_STATSFILE,60,156,102,12,ES_AUTOHSCROLL - PUSHBUTTON "...",IDC_STATSFILE_BROWSE,168,156,18,12 - CTEXT "BUILD",IDC_BUILDREV,7,52,186,8,SS_CENTERIMAGE | WS_DISABLED -END - -IDD_TAB_IPFRAMES DIALOGEX 0, 0, 200, 188 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Partitions",IDC_STATIC,6,2,186,90,WS_DISABLED - CONTROL "8x8 Transform",IDC_DCT8X8,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,30,11,60,12,WS_EX_TRANSPARENT - CONTROL "8x8, 8x16 and 16x8 P-frame search",IDC_P8X8,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,30,24,127,12,WS_EX_TRANSPARENT - CONTROL "8x8, 8x16 and 16x8 B-frame search",IDC_B8X8,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,30,37,127,12,WS_EX_TRANSPARENT - CONTROL "4x4, 4x8 and 8x4 P-frame search",IDC_P4X4,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,30,50,119,12,WS_EX_TRANSPARENT - CONTROL "8x8 Intra search",IDC_I8X8,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,30,63,66,12,WS_EX_TRANSPARENT - CONTROL "4x4 Intra search",IDC_I4X4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,30,76,66,12,WS_EX_TRANSPARENT - GROUPBOX "B Frames",IDC_STATIC,6,94,186,86,WS_DISABLED - LTEXT "Max consecutive",IDC_STATIC,30,103,60,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_BFRAME,126,103,24,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "Bias",IDC_STATIC,30,117,14,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - CONTROL "",IDC_BBIASSLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,48,117,72,12,WS_EX_TRANSPARENT - EDITTEXT IDC_BBIAS,126,117,24,12,ES_AUTOHSCROLL - CONTROL "Use as references",IDC_BREFS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,30,133,71,12,WS_EX_TRANSPARENT - CONTROL "Bidirectional ME",IDC_BIDIR_ME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,109,133,72,12,WS_EX_TRANSPARENT - CONTROL "Weighted biprediction",IDC_WBPRED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,78,145,82,12,WS_EX_TRANSPARENT - CONTROL "Adaptive",IDC_BADAPT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,30,145,43,12,WS_EX_TRANSPARENT - LTEXT "Direct mode",IDC_STATIC,30,161,42,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - COMBOBOX IDC_DIRECTPRED,114,161,54,67,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP -END - -IDD_TAB_RATECONTROL DIALOGEX 0, 0, 200, 188 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Bitrate",IDC_STATIC,6,2,186,53,WS_DISABLED - LTEXT "Keyframe boost (%)",IDC_STATIC,42,10,68,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - LTEXT "B-frames reduction (%)",IDC_STATIC,42,24,78,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - LTEXT "Bitrate variability (%)",IDC_STATIC,42,38,68,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_IPRATIO,126,10,24,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_PBRATIO,126,24,24,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_CURVECOMP,126,38,24,12,ES_AUTOHSCROLL | ES_NUMBER - GROUPBOX "Quantization Limits",IDC_STATIC,6,56,186,52,WS_DISABLED - LTEXT "Min QP",IDC_STATIC,42,64,24,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - LTEXT "Max QP",IDC_STATIC,42,78,26,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - LTEXT "Max QP Step",IDC_STATIC,42,92,43,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_QPMIN,126,64,24,12,ES_AUTOHSCROLL - EDITTEXT IDC_QPMAX,126,78,24,12,ES_AUTOHSCROLL - EDITTEXT IDC_QPSTEP,126,92,24,12,ES_AUTOHSCROLL - GROUPBOX "Scene Cuts",IDC_STATIC,6,110,186,56,WS_DISABLED - LTEXT "Scene Cut Threshold",IDC_STATIC,42,119,72,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - LTEXT "Min IDR-frame interval",IDC_STATIC,42,133,78,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - LTEXT "Max IDR-frame interval",IDC_STATIC,42,147,78,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_SCENECUT,126,119,24,12,ES_AUTOHSCROLL - EDITTEXT IDC_KEYINTMIN,126,133,24,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_KEYINTMAX,126,147,24,12,ES_AUTOHSCROLL | ES_NUMBER -END - -IDD_TAB_MISC DIALOGEX 0, 0, 200, 188 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - GROUPBOX "Motion Estimation",IDC_STATIC,7,2,186,82,WS_DISABLED - LTEXT "Partition decision",IDC_STATIC,30,12,60,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - COMBOBOX IDC_SUBPEL,90,12,84,77,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP - LTEXT "Method",IDC_STATIC,30,30,30,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - COMBOBOX IDC_ME_METHOD,84,30,90,67,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Range",IDC_STATIC,30,48,24,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_MERANGE,60,48,24,12,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "Chroma ME",IDC_CHROMAME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,126,48,48,12,WS_EX_TRANSPARENT - LTEXT "Max Ref. frames",IDC_STATIC,30,66,54,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - EDITTEXT IDC_REFFRAMES,88,66,24,12,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "Mixed Refs",IDC_MIXEDREF,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,126,66,48,12,WS_EX_TRANSPARENT - GROUPBOX "Debug",IDC_STATIC,94,91,96,46,WS_DISABLED - LTEXT "Log level",IDC_STATIC,100,101,36,12,SS_CENTERIMAGE - LTEXT "FourCC",IDC_STATIC,100,119,36,12,SS_CENTERIMAGE - COMBOBOX IDC_LOG,136,101,48,67,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_FOURCC,136,119,30,12,ES_AUTOHSCROLL - GROUPBOX "Misc. options",IDC_STATIC,7,86,186,95,WS_DISABLED - LTEXT "Sample AR",IDC_STATIC,10,101,36,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - CTEXT ":",IDC_STATIC,61,101,12,12,SS_CENTERIMAGE - EDITTEXT IDC_SAR_W,46,101,18,12,ES_AUTOHSCROLL | ES_NUMBER - EDITTEXT IDC_SAR_H,70,101,18,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "Threads",IDC_THREADS,10,119,30,12,SS_CENTERIMAGE - EDITTEXT IDC_THREADEDIT,46,119,18,12,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "CABAC",IDC_CABAC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,140,39,12,WS_EX_TRANSPARENT - CONTROL "Deblocking filter:",IDC_LOOPFILTER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,154,66,12 - CONTROL "Trellis",IDC_TRELLIS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,65,140,37,12,WS_EX_TRANSPARENT - LTEXT "Noise Reduction",IDC_STATIC,111,140,56,12,SS_CENTERIMAGE - EDITTEXT IDC_NR,168,140,21,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "Strength",IDC_STATIC,87,154,36,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - LTEXT "Threshold",IDC_STATIC,87,167,36,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - CONTROL "",IDC_INLOOP_A,"msctls_trackbar32",TBS_NOTICKS | WS_TABSTOP,123,155,42,12,WS_EX_TRANSPARENT - CONTROL "",IDC_INLOOP_B,"msctls_trackbar32",TBS_NOTICKS | WS_TABSTOP,123,167,42,12,WS_EX_TRANSPARENT - LTEXT "0",IDC_LOOPA_TXT,171,154,12,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT - LTEXT "0",IDC_LOOPB_TXT,171,167,12,12,SS_CENTERIMAGE,WS_EX_TRANSPARENT -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_MAINCONFIG, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 197 - TOPMARGIN, 7 - BOTTOMMARGIN, 215 - END - - IDD_TAB_BITRATE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 193 - TOPMARGIN, 7 - BOTTOMMARGIN, 181 - END - - IDD_TAB_IPFRAMES, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 193 - TOPMARGIN, 7 - BOTTOMMARGIN, 181 - END - - IDD_TAB_RATECONTROL, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 193 - TOPMARGIN, 7 - BOTTOMMARGIN, 181 - END - - IDD_TAB_MISC, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 193 - TOPMARGIN, 7 - BOTTOMMARGIN, 181 - HORZGUIDE, 179 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Bitmap -// - -IDB_LOGO BITMAP "x264.bmp" - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE -BEGIN - IDC_BADAPT "Use fewer B-frames if needed" - IDC_BBIAS "Influence how often B-frames are used" - IDC_BFRAME "Limit consecutive runs of B-frames" - IDC_BIDIR_ME "Jointly optimize both MVs in B-frames" - IDC_BREFS "Keep some B-frames as references" - IDC_DEFAULTS "Reset everything" - IDC_DIRECTPRED "B-Direct MV prediction mode" - IDC_KEYINTMIN "Minimum GOP size" - IDC_KEYINTMAX "Maximum GOP size" - IDC_MIXEDREF "Decide references on a per partition basis" - IDC_NR "DCT noise reduction amount" - IDC_SCENECUT "How aggressively to insert extra I-frames" - IDC_TRELLIS "Trellis quantization on the final MB" - IDC_WBPRED "Weighted prediction for B-frames" -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// English (Canada) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENC) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_CAN -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_ABOUT DIALOGEX 0, 0, 213, 130 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "About x264" -FONT 8, "MS Sans Serif", 0, 0, 0x0 -BEGIN - DEFPUSHBUTTON "OK",IDOK,158,109,48,14 - PUSHBUTTON "Visit Homepage",IDC_HOMEPAGE,7,109,77,14 - CTEXT "BUILD",IDC_BUILD,6,18,199,8 - CTEXT "x264 - H.264/MPEG-4 AVC codec",IDC_X264,6,6,199,8 - CTEXT "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation.",IDC_STATIC,6,78,199,26 - CTEXT "Copyright 2005 Laurent Aimar, Justin Clay, Min Chen,\nEric Petit, Måns Rullgård, Loren Merritt",IDC_STATIC,6,48,199,18 -END - -IDD_ERRCONSOLE DIALOG 0, 0, 264, 130 -STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION -CAPTION "x264 error console" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,68,110,48,14 - DEFPUSHBUTTON "Copy",IDC_COPYCLIP,148,110,48,14 - LISTBOX IDC_CONSOLE,6,8,251,95,LBS_NOINTEGRALHEIGHT | LBS_NOSEL -END - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // English (Canada) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/vfw/w32api/vfw.h b/vfw/w32api/vfw.h deleted file mode 100644 index 980353ae..00000000 --- a/vfw/w32api/vfw.h +++ /dev/null @@ -1,209 +0,0 @@ -#ifndef _INC_VFW -#define _INC_VFW - -#include - -#ifndef aviTWOCC -#define aviTWOCC(C0,C1) ((WORD)(BYTE)(C0)|((WORD)(BYTE)(C1) << 8)) -#endif - -#ifndef ICTYPE_VIDEO -#define ICTYPE_VIDEO mmioFOURCC('v', 'i', 'd', 'c') -#define ICTYPE_AUDIO mmioFOURCC('a', 'u', 'd', 'c') -#endif - -#ifndef ICERR_OK -#define ICERR_OK 0L -#define ICERR_DONTDRAW 1L -#define ICERR_NEWPALETTE 2L -#define ICERR_GOTOKEYFRAME 3L -#define ICERR_STOPDRAWING 4L - -#define ICERR_UNSUPPORTED -1L -#define ICERR_BADFORMAT -2L -#define ICERR_MEMORY -3L -#define ICERR_INTERNAL -4L -#define ICERR_BADFLAGS -5L -#define ICERR_BADPARAM -6L -#define ICERR_BADSIZE -7L -#define ICERR_BADHANDLE -8L -#define ICERR_CANTUPDATE -9L -#define ICERR_ABORT -10L -#define ICERR_ERROR -100L -#define ICERR_BADBITDEPTH -200L -#define ICERR_BADIMAGESIZE -201L - -#define ICERR_CUSTOM -400L -#endif - -#ifndef ICMODE_COMPRESS -#define ICMODE_COMPRESS 1 -#define ICMODE_DECOMPRESS 2 -#define ICMODE_FASTDECOMPRESS 3 -#define ICMODE_QUERY 4 -#define ICMODE_FASTCOMPRESS 5 -#define ICMODE_DRAW 8 -#endif - -#define AVIIF_LIST 0x00000001L -#define AVIIF_TWOCC 0x00000002L -#define AVIIF_KEYFRAME 0x00000010L - -#define ICCOMPRESS_KEYFRAME 0x00000001L - -typedef struct { - DWORD dwFlags; - LPBITMAPINFOHEADER lpbiOutput; - LPVOID lpOutput; - LPBITMAPINFOHEADER lpbiInput; - LPVOID lpInput; - LPDWORD lpckid; - LPDWORD lpdwFlags; - LONG lFrameNum; - DWORD dwFrameSize; - DWORD dwQuality; - LPBITMAPINFOHEADER lpbiPrev; - LPVOID lpPrev; -} ICCOMPRESS; - -#define ICCOMPRESSFRAMES_PADDING 0x00000001 - -typedef struct { - DWORD dwFlags; - LPBITMAPINFOHEADER lpbiOutput; - LPARAM lOutput; - LPBITMAPINFOHEADER lpbiInput; - LPARAM lInput; - LONG lStartFrame; - LONG lFrameCount; - LONG lQuality; - LONG lDataRate; - LONG lKeyRate; - DWORD dwRate; - DWORD dwScale; - DWORD dwOverheadPerFrame; - DWORD dwReserved2; - LONG (CALLBACK *GetData)(LPARAM,LONG,LPVOID,LONG); - LONG (CALLBACK *PutData)(LPARAM,LONG,LPVOID,LONG); -} ICCOMPRESSFRAMES; - -#define ICDECOMPRESS_HURRYUP 0x80000000L -#define ICDECOMPRESS_UPDATE 0x40000000L -#define ICDECOMPRESS_PREROLL 0x20000000L -#define ICDECOMPRESS_NULLFRAME 0x10000000L -#define ICDECOMPRESS_NOTKEYFRAME 0x08000000L - -typedef struct { - DWORD dwFlags; - LPBITMAPINFOHEADER lpbiInput; - LPVOID lpInput; - LPBITMAPINFOHEADER lpbiOutput; - LPVOID lpOutput; - DWORD ckid; -} ICDECOMPRESS; - -typedef struct { - DWORD dwSize; - DWORD fccType; - DWORD fccHandler; - DWORD dwVersion; - DWORD dwFlags; - LRESULT dwError; - LPVOID pV1Reserved; - LPVOID pV2Reserved; - DWORD dnDevNode; -} ICOPEN; - -#define ICM_USER (DRV_USER+0x0000) - -#define ICM_RESERVED ICM_RESERVED_LOW -#define ICM_RESERVED_LOW (DRV_USER+0x1000) -#define ICM_RESERVED_HIGH (DRV_USER+0x2000) - -#define ICM_GETSTATE (ICM_RESERVED+0) -#define ICM_SETSTATE (ICM_RESERVED+1) -#define ICM_GETINFO (ICM_RESERVED+2) -#define ICM_CONFIGURE (ICM_RESERVED+10) -#define ICM_ABOUT (ICM_RESERVED+11) -#define ICM_GETERRORTEXT (ICM_RESERVED+12) -#define ICM_GETFORMATNAME (ICM_RESERVED+20) -#define ICM_ENUMFORMATS (ICM_RESERVED+21) -#define ICM_GETDEFAULTQUALITY (ICM_RESERVED+30) -#define ICM_GETQUALITY (ICM_RESERVED+31) -#define ICM_SETQUALITY (ICM_RESERVED+32) -#define ICM_SET (ICM_RESERVED+40) -#define ICM_GET (ICM_RESERVED+41) - -#define ICM_FRAMERATE mmioFOURCC('F','r','m','R') -#define ICM_KEYFRAMERATE mmioFOURCC('K','e','y','R') - -typedef struct { - DWORD dwSize; - DWORD fccType; - DWORD fccHandler; - DWORD dwFlags; - DWORD dwVersion; - DWORD dwVersionICM; - WCHAR szName[16]; - WCHAR szDescription[128]; - WCHAR szDriver[128]; -} ICINFO; - -#define VIDCF_QUALITY 0x0001 -#define VIDCF_CRUNCH 0x0002 -#define VIDCF_TEMPORAL 0x0004 -#define VIDCF_COMPRESSFRAMES 0x0008 -#define VIDCF_DRAW 0x0010 -#define VIDCF_FASTTEMPORALC 0x0020 -#define VIDCF_FASTTEMPORALD 0x0080 -#define VIDCF_QUALITYTIME 0x0040 -#define VIDCF_FASTTEMPORAL (VIDCF_FASTTEMPORALC|VIDCF_FASTTEMPORALD) - -#define ICVERSION 0x0104 - -#define ICM_COMPRESS_GET_FORMAT (ICM_USER+4) -#define ICM_COMPRESS_GET_SIZE (ICM_USER+5) -#define ICM_COMPRESS_QUERY (ICM_USER+6) -#define ICM_COMPRESS_BEGIN (ICM_USER+7) -#define ICM_COMPRESS (ICM_USER+8) -#define ICM_COMPRESS_END (ICM_USER+9) - -#define ICM_DECOMPRESS_GET_FORMAT (ICM_USER+10) -#define ICM_DECOMPRESS_QUERY (ICM_USER+11) -#define ICM_DECOMPRESS_BEGIN (ICM_USER+12) -#define ICM_DECOMPRESS (ICM_USER+13) -#define ICM_DECOMPRESS_END (ICM_USER+14) -#define ICM_DECOMPRESS_SET_PALETTE (ICM_USER+29) -#define ICM_DECOMPRESS_GET_PALETTE (ICM_USER+30) - -#define ICM_DRAW_QUERY (ICM_USER+31) -#define ICM_DRAW_BEGIN (ICM_USER+15) -#define ICM_DRAW_GET_PALETTE (ICM_USER+16) -#define ICM_DRAW_UPDATE (ICM_USER+17) -#define ICM_DRAW_START (ICM_USER+18) -#define ICM_DRAW_STOP (ICM_USER+19) -#define ICM_DRAW_BITS (ICM_USER+20) -#define ICM_DRAW_END (ICM_USER+21) -#define ICM_DRAW_GETTIME (ICM_USER+32) -#define ICM_DRAW (ICM_USER+33) -#define ICM_DRAW_WINDOW (ICM_USER+34) -#define ICM_DRAW_SETTIME (ICM_USER+35) -#define ICM_DRAW_REALIZE (ICM_USER+36) -#define ICM_DRAW_FLUSH (ICM_USER+37) -#define ICM_DRAW_RENDERBUFFER (ICM_USER+38) -#define ICM_DRAW_START_PLAY (ICM_USER+39) -#define ICM_DRAW_STOP_PLAY (ICM_USER+40) -#define ICM_DRAW_SUGGESTFORMAT (ICM_USER+50) -#define ICM_DRAW_CHANGEPALETTE (ICM_USER+51) -#define ICM_DRAW_IDLE (ICM_USER+52) -#define ICM_GETBUFFERSWANTED (ICM_USER+41) -#define ICM_GETDEFAULTKEYFRAMERATE (ICM_USER+42) -#define ICM_DECOMPRESSEX_BEGIN (ICM_USER+60) -#define ICM_DECOMPRESSEX_QUERY (ICM_USER+61) -#define ICM_DECOMPRESSEX (ICM_USER+62) -#define ICM_DECOMPRESSEX_END (ICM_USER+63) -#define ICM_COMPRESS_FRAMES_INFO (ICM_USER+70) -#define ICM_COMPRESS_FRAMES (ICM_USER+71) -#define ICM_SET_STATUS_PROC (ICM_USER+72) - -#endif /* _INC_VFW */ diff --git a/vfw/x264.bmp b/vfw/x264.bmp deleted file mode 100644 index 39895a9d78e2badbebc4bf1f5b9b2a64a37ab69d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12366 zcmYkCdraJGdf$Hr%+*|sxfpvecbMTiGcW^l=D^&*!!SO>Ww;Du4CZFQU~UF;FaxYw zRmv)@6s1v=wo;R-*S{JyZ4yOl6Qxy?Hrb|X)M!_&x=FOzH0h?@?PjI+=&bF2zVG1e zK67RGF}&aRxqYAKdBdM2oR$%9j%C?-_wRW4dEBxJ&FA-fEvvF5`}hi<=#iJ-V-@6$ zSfzR6R$=~xbvtj$D!V;x734p)?vd zE7sETKeHZ8f5#e0|DM&K`nu(u|3mAumEX4RKm7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c10|s4?&UE z%)$kX1SwQl*%hS>>L|Kpd*tZzah4>tw7QLdo6d>CuHd|W_4?J(@zLIDT6~_8aAtA& z*|TR$i{=CjSlWzfWi==uMD_9iU-M<{BEhxf~vNmXs9SYSNK~n)-Uqn@(jzmFZ_G zhY+cbUSe~m<|U%R)RS}`ml4WDuy7{N9B%w^CoyL>lQ53FS!#evmDOiL>ZH-$M7xoa!qnDY9zs zKdjG=G^8!t&A=cEwSOW1w;hW`8hp6RFTQoM8MROe2CLfJJH?PVTSb-%Q< z@JBUMcBOQ1NweG~>QphKK?M@>D7&vWL+XH-=>Vk#LW7sSf@TF{syHSmCv>BU&+j~H zIPl7Q%@p_+)TnPjk(Fh+R#{<{dTc&_h)Pvu6UQ3KATO2OL4(H$&FiCWN?)Bs#HuJf z5Yp$&Y+MK8#3yy;l(P*uO9A63^F-~zow87>Fyl3;LM(!UozWo{M>EcJ<5U$&8&Z;# z!!a2&f+}=#x~Uj7chhF*GAb_Z5`Sv?tCY?KIaXO&L4N7o8XALYirk!<<%FR*q?+wB zLR8?7uV3n@rjA=NV9QEeM}rvG3P=U#h;QHGK(=oGUlhX%gh-vAA4yR`j;_*J8fB?H oDiKKDV?)Ny;K~REBfrqVm%*E+&ktC=X -#include -#include - -#include -#include - -#include - -#include "resource.h" - -/* Name */ -#define X264_NAME_L L"x264" -#define X264_DESC_L L"x264 - H264/AVC encoder" - -/* Codec fcc */ -#define FOURCC_X264 mmioFOURCC('X','2','6','4') - -/* yuv 4:2:0 planar */ -#define FOURCC_I420 mmioFOURCC('I','4','2','0') -#define FOURCC_IYUV mmioFOURCC('I','Y','U','V') -#define FOURCC_YV12 mmioFOURCC('Y','V','1','2') - -/* yuv 4:2:2 packed */ -#define FOURCC_YUY2 mmioFOURCC('Y','U','Y','2') -#define FOURCC_YUYV mmioFOURCC('Y','U','Y','V') - -#define X264_WEBSITE "http://videolan.org/x264.html" - -/* CONFIG: vfw config - */ -typedef struct -{ - /********** ATTENTION **********/ - int mode; /* Vidomi directly accesses these vars */ - int bitrate; - int desired_size; /* please try to avoid modifications here */ - char stats[MAX_PATH]; - /*******************************/ - int i_2passbitrate; - int i_pass; - - int b_fast1pass; /* turns off some flags during 1st pass */ - int b_updatestats; /* updates the statsfile during 2nd pass */ - - int i_frame_total; - - /* Our config */ - int i_refmax; - int i_keyint_max; - int i_keyint_min; - int i_scenecut_threshold; - int i_qp_min; - int i_qp_max; - int i_qp_step; - - int i_qp; - int b_filter; - - int b_cabac; - - int b_i8x8; - int b_i4x4; - int b_psub16x16; - int b_psub8x8; - int b_bsub16x16; - int b_dct8x8; - int b_mixedref; - - int i_bframe; - int i_subpel_refine; - int i_me_method; - int i_me_range; - int b_chroma_me; - int i_direct_mv_pred; - int i_threads; - - int i_inloop_a; - int i_inloop_b; - - int b_b_refs; - int b_b_wpred; - int i_bframe_bias; - int b_bframe_adaptive; - - int i_key_boost; - int i_b_red; - int i_curve_comp; - - int i_sar_width; - int i_sar_height; - - int i_log_level; - - /* vfw interface */ - int b_save; - /* fourcc used */ - char fcc[4+1]; - int i_encoding_type; - int i_trellis; - int b_bidir_me; - int i_noise_reduction; -} CONFIG; - -/* CODEC: vfw codec instance - */ -typedef struct -{ - CONFIG config; - - /* handle */ - x264_t *h; - - /* error console handle */ - HWND *hCons; - - /* XXX: needed ? */ - unsigned int fincr; - unsigned int fbase; -} CODEC; - -/* Compress functions */ -LRESULT compress_query(CODEC *, BITMAPINFO *, BITMAPINFO *); -LRESULT compress_get_format(CODEC *, BITMAPINFO *, BITMAPINFO *); -LRESULT compress_get_size(CODEC *, BITMAPINFO *, BITMAPINFO *); -LRESULT compress_frames_info(CODEC *, ICCOMPRESSFRAMES *); -LRESULT compress_begin(CODEC *, BITMAPINFO *, BITMAPINFO *); -LRESULT compress_end(CODEC *); -LRESULT compress(CODEC *, ICCOMPRESS *); - - -/* config functions */ -void config_reg_load( CONFIG * config ); -void config_reg_save( CONFIG * config ); -static void tabs_enable_items( HWND hDlg, CONFIG * config ); -static void tabs_update_items( HWND hDlg, CONFIG * config ); - -/* Dialog callbacks */ -BOOL CALLBACK callback_main ( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ); -BOOL CALLBACK callback_tabs( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ); -BOOL CALLBACK callback_about( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ); -BOOL CALLBACK callback_err_console( HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ); - -/* Dll instance */ -extern HINSTANCE g_hInst; - -#if defined(_DEBUG) -#include /* vsprintf */ -#define DPRINTF_BUF_SZ 1024 -static __inline void DPRINTF(char *fmt, ...) -{ - va_list args; - char buf[DPRINTF_BUF_SZ]; - - va_start(args, fmt); - vsprintf(buf, fmt, args); - OutputDebugString(buf); -} -#else -static __inline void DPRINTF(char *fmt, ...) { } -#endif - - -#endif - -- 2.40.0