From 60748aeb17bb91bbfd2fd9fb028adc5255c5eeff Mon Sep 17 00:00:00 2001 From: Jason Garrett-Glaser Date: Sat, 2 Oct 2010 23:12:41 -0700 Subject: [PATCH] Remove some old unused stuff in the build tree Regression test (hasn't been updated since svn). Doxy (was never used). --- Doxyfile | 269 ---------------------------------- Makefile | 17 --- tools/regression-test.pl | 302 --------------------------------------- 3 files changed, 588 deletions(-) delete mode 100644 Doxyfile delete mode 100755 tools/regression-test.pl diff --git a/Doxyfile b/Doxyfile deleted file mode 100644 index 13e912f9..00000000 --- a/Doxyfile +++ /dev/null @@ -1,269 +0,0 @@ -# Doxyfile 1.4.2 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = x264 -PROJECT_NUMBER = -OUTPUT_DIRECTORY = dox/ -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -USE_WINDOWS_ENCODING = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = ./ -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -DISTRIBUTE_GROUP_DOC = NO -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = YES -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = YES -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ./ -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.d \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.idl \ - *.odl \ - *.cs \ - *.php \ - *.php3 \ - *.inc \ - *.m \ - *.mm \ - *.dox \ - *.C \ - *.CC \ - *.C++ \ - *.II \ - *.I++ \ - *.H \ - *.HH \ - *.H++ \ - *.CS \ - *.PHP \ - *.PHP3 \ - *.M \ - *.MM -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = * -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = YES -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = NO -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = NO -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = YES -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1024 -MAX_DOT_GRAPH_DEPTH = 1000 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO diff --git a/Makefile b/Makefile index 0cd7b82d..ebf1f621 100644 --- a/Makefile +++ b/Makefile @@ -228,20 +228,3 @@ etags: TAGS TAGS: etags $(SRCS) - -dox: - doxygen Doxyfile - -ifeq (,$(VIDS)) -test: - @echo 'usage: make test VIDS="infile1 infile2 ..."' - @echo 'where infiles are anything that x264 understands,' - @echo 'i.e. YUV with resolution in the filename, y4m, or avisynth.' -else -test: - perl tools/regression-test.pl --version=head,current --options='$(OPT0)' --options='$(OPT1)' --options='$(OPT2)' $(VIDS:%=--input=%) -endif - -testclean: - rm -f test/*.log test/*.264 - $(foreach DIR, $(wildcard test/x264-r*/), cd $(DIR) ; make clean ; cd ../.. ;) diff --git a/tools/regression-test.pl b/tools/regression-test.pl deleted file mode 100755 index b9a4f14f..00000000 --- a/tools/regression-test.pl +++ /dev/null @@ -1,302 +0,0 @@ -#!/bin/env perl - -# regression-test.pl: tests different versions of x264 -# by Alex Izvorski & Loren Merrit 2007 -# GPL - -$^W=1; - -use Getopt::Long; -use File::Path; -use File::Copy; -use File::Basename; - -# prerequisites: -# - perl > 5.8.0 -# - svn -# - net access -# - linux/unix -# - gcc - -# the following require a make testclean -# - changing x264 option sets and or adding/removing option sets -# - changing configure options -# - changing CFLAGS or other variables that affect compilation -# - a newer head revision - -# the following do not require a make testclean, but may cause some tests to be rerun unnecessarily: -# - adding/removing input files -# - adding/removing versions - -@versions = (); -@input_files = (); -@option_sets = (); - -GetOptions ("version=s" => \@versions, - "input=s" => \@input_files, - "options=s" => \@option_sets, - ); - -# TODO check inputs -# TODO some way to give make options -# TODO some way to give configure options - -if (scalar(@versions) == 0) -{ - @versions = ('rHEAD', 'current'); -} - -if (scalar(@option_sets) == 0 || - scalar(@input_files) == 0) -{ - print "Regression test for x264\n"; - print "Usage:\n perl tools/regression-test.pl --version=623 --version=624 --input=football_720x480p.yuv --input=foreman_352x288p.yuv --options='--me=dia --subme=2 --no-cabac'\n"; - print "Any number of versions, option sets, and input files may be given.\n"; - print "Versions may be any svn revision, a comma-separated list of revisions, or 'current' for the version in the current directory.\n"; - exit; -} - -mkpath("test"); - -@versions = map { split m![,\s]\s*! } @versions; - -foreach my $version (@versions) -{ - $version =~ s!^head$!rHEAD!i; - $version =~ s!^current$!current!i; - $version =~ s!^(\d+)$!r$1!; - - if (-e "test/x264-$version/x264" && ($version ne "current")) - { - print("have version: $version\n"); - next; - } - print("building version: $version\n"); - if ($version eq "current") - { - system("(./configure && make) &> test/build.log"); - mkpath("test/x264-$version"); - if (! -e "x264") { print("build failed \n"); exit 1; } - copy("x264", "test/x264-$version/x264"); - chmod(0755, "test/x264-$version/x264"); - next; - } - system("svn checkout -$version svn://svn.videolan.org/x264/trunk/ test/x264-$version >/dev/null"); - chdir("test/x264-$version"); - system("(./configure && make) &> build.log"); - chdir("../.."); - if (! -e "test/x264-$version/x264") { print("build failed \n"); exit 1; } -} - -$any_diff = 0; -foreach my $i (0 .. scalar(@option_sets)-1) -{ - $opt = $option_sets[$i]; - print("options: $opt \n"); - foreach my $j (0 .. scalar(@input_files)-1) - { - my $file = $input_files[$j]; - print("input file: $file \n"); - - my $outfile = basename($file); - $outfile =~ s!\.yuv$!!; - $outfile = "test/opt$i-$outfile$j"; - - foreach my $k (0 .. scalar(@versions)-1) - { - my $version = $versions[$k]; - - if (-e "$outfile-$version.log" && ($version ne "current")) - { - print("have results for version: $version\n"); - } - else - { - print("running version: $version \n"); - # verbose option is required for frame-by-frame comparison - system("test/x264-$version/x264 --verbose $opt $file -o $outfile-$version.264 > $outfile-$version.log 2>&1"); - } - - # TODO check for crashes - # TODO if (read_file("$outfile-$version.log") =~ m!could not open input file!) ... - # TODO check decompression with jm - # TODO dump (and check) frames - - if ($k > 0) - { - my $baseversion = $versions[$k - 1]; - print("comparing $version with $baseversion: "); - $is_diff = 0; - $is_diff ||= compare_logs("$outfile-$version.log", "$outfile-$baseversion.log"); - $is_diff ||= compare_raw264("$outfile-$version.264", "$outfile-$baseversion.264"); - if (! $is_diff) { print("identical \n"); } - $any_diff ||= $is_diff; - } - } - } -} - -print "\n"; -if (! $any_diff) { print "no differences found\n"; } -else { print "some differences found\n"; exit 1; } - - -sub compare_logs -{ - my ($log1, $log2) = @_; - - my $logdata1 = read_file($log1); - my $logdata2 = read_file($log2); - - # FIXME comparing versions with different log output format will fail - $logdata1 = join("\n", grep { m!frame=! } split(m!\n!, $logdata1)); - $logdata2 = join("\n", grep { m!frame=! } split(m!\n!, $logdata2)); - - my $is_diff = 0; - if ($logdata1 ne $logdata2) - { - print("log files differ \n"); - $is_diff = 1; - } - - my $stats1 = parse_log_overall_stats($log1); - my $stats2 = parse_log_overall_stats($log2); - - if ($stats1->{psnr_y} != $stats2->{psnr_y}) - { - printf("psnr change: %+f dB \n", $stats1->{psnr_y} - $stats2->{psnr_y}); - $is_diff = 1; - } - if ($stats1->{bitrate} != $stats2->{bitrate}) - { - printf("bitrate change: %+f kb/s \n", $stats1->{bitrate} - $stats2->{bitrate}); - $is_diff = 1; - } - - #arbitrarily set cutoff to 3% change - #$speed_change_min = 0.03; - #if (abs($stats1->{fps} - $stats2->{fps}) > $speed_change_min * ($stats1->{fps} + $stats2->{fps})/2) - #{ - # printf("speed change: %+f fps \n", $stats1->{fps} - $stats2->{fps}); - # $is_diff = 1; - #} - - return $is_diff; - - # TODO compare frame by frame PSNR/SSIM, record improved or unimproved ranges - #parse_log_frame_stats($log1); - #parse_log_frame_stats($log2); - - # TODO compare actual run times -} - -sub compare_raw264 -{ - my ($raw1, $raw2) = @_; - - # FIXME this may use a lot of memory - my $rawdata1 = read_file($raw1); - my $rawdata2 = read_file($raw2); - - # remove first NAL, it is a version-specific SEI NAL - my $pat = chr(0).chr(0).chr(1); - $rawdata1 =~ s!^.*?$pat.*?$pat!$pat!; - $rawdata2 =~ s!^.*?$pat.*?$pat!$pat!; - - if ($rawdata1 ne $rawdata2) - { - print("compressed files differ \n"); - return 1; - } - - return 0; -} - -sub parse_log_frame_stats -{ - my ($log) = @_; - my $logtext = read_file($log); - - my @frames = (); - while ($logtext =~ m!x264 \[debug]: (frame=.*)!g) - { - my $line = $1; - if ($line !~ m!frame=\s*(\d+)\s* QP=\s*(\d+)\s* NAL=(\d+)\s* Slice:(\w)\s* Poc:(\d+)\s* I:(\d+)\s* P:(\d+)\s* SKIP:(\d+)\s* size=(\d+) bytes PSNR Y:(\d+\.\d+) U:(\d+\.\d+) V:(\d+\.\d+)!) - { - print "error: unparseable log line: $line \n"; next; - } - - my $frame = - +{ - num=>$1, - qp=>$2, - nal=>$3, - slice=>$4, - poc=>$5, - count_i=>$6, - count_p=>$7, - count_skip=>$8, - size=>$9, - psnr_y=>$10, - psnr_u=>$11, - psnr_v=>$12, - }; - - if ($line =~ m!SSIM Y:(\d+\.\d+)!) - { - $frame->{ssim} = $1; - } - - push(@frames, $frame); - } - - return @frames; -} - -sub parse_log_overall_stats -{ - my ($log) = @_; - my $logtext = read_file($log); - - if ($logtext !~ m!x264 \[info\]: PSNR Mean Y:(\d+\.\d+) U:(\d+\.\d+) V:(\d+\.\d+) Avg:(\d+\.\d+) Global:(\d+\.\d+) kb/s:(\d+\.\d+)!) - { - print "error: unparseable log summary info \n"; return +{}; - } - my $stats = - +{ - psnr_y=>$1, - psnr_u=>$2, - psnr_v=>$3, - psnr_avg=>$4, - psnr_global=>$5, - bitrate=>$6, - }; - - if ($logtext !~ m!encoded (\d+) frames, (\d+\.\d+) fps!) - { - print "error: unparseable log summary info \n"; return +{}; - } - $stats->{num_frames} = $1; - $stats->{fps} = $2; - - return $stats; -} - -sub read_file -{ - my ($file) = @_; - open(F, $file) || die "could not open $file: $!"; - undef $/; - my $data = ; - $/ = "\n"; - close(F); - return $data; -} - -sub write_file -{ - my ($file, $data) = @_; - open(F, ">".$file) || die "could not open $file: $!"; - print F $data; - close(F); -} -- 2.47.3