Fiona Glaser [Sun, 6 Jul 2008 18:59:15 +0000 (12:59 -0600)]
Various optimizations and cosmetics
Update AUTHORS file with Gabriel and me
update XCHG macro to work correctly in if statements
Add new lookup tables for block_idx and fdec/fenc addresses
Slightly faster array_non_zero_count_mmx (patch by holger)
Eliminate branch in analyse_intra
Unroll loops in and clean up chroma encode
Convert some for loops to do/while loops for speed improvement
Do explicit write-combining on --me tesa mvsad_t struct
Shrink --me esa zero[] array
Speed up bime by reducing size of visited[][][] array
Fiona Glaser [Sun, 6 Jul 2008 17:15:19 +0000 (11:15 -0600)]
Resolve floating point exception with frame_init_lowres mmx
In some cases, the mmx version of frame_init_lowres could leave the FPU uninitialized for use in ratecontrol, resulting in floating point exceptions.
Since frame_init_lowres is such a time-consuming function, an emms was just put at the end, since it costs almost nothing compared to the total time of frame_init_lowres.
Eric Petit [Fri, 4 Jul 2008 09:31:32 +0000 (11:31 +0200)]
Update my email address
Fiona Glaser [Fri, 4 Jul 2008 02:05:00 +0000 (20:05 -0600)]
Update file headers throughout x264
Update "Authors" lists based on actual authorship; highest is most important
Update copyright notices and remove old CVS tags from file headers
Add file headers to GTK and other sections missing them
Update FSF address
Other header-related cosmetics
Fiona Glaser [Thu, 3 Jul 2008 02:59:24 +0000 (20:59 -0600)]
denoise_dct asm
Loren Merritt [Thu, 3 Jul 2008 02:55:10 +0000 (20:55 -0600)]
cosmetics in permutation macros
SWAP can now take mmregs directly, rather than just their numbers
Fiona Glaser [Wed, 2 Jul 2008 16:43:57 +0000 (10:43 -0600)]
Fix bug in adaptive quantization
In some cases adaptive quantization did not correctly calculate the variance.
Bug reported by MasterNobody
Loren Merritt [Sun, 29 Jun 2008 06:00:03 +0000 (00:00 -0600)]
lowres_init asm
rounding is changed for asm convenience. this makes the c version slower, but there's no way around that if all the implementations are to have the same results.
Fiona Glaser [Wed, 2 Jul 2008 05:42:39 +0000 (23:42 -0600)]
Optimizations and cosmetics in macroblock.c
If an i4x4 dct block has no coefficients, don't bother with dequant/zigzag/idct. Not useful for larger sizes because the odds of an empty block are much lower.
Cosmetics in i16x16 to be more consistent with other similar functions.
Add an SSD threshold for chroma in probe_skip to improve speed and minimize time spent on chroma skip analysis.
Rename lambda arrays to lambda_tab for consistency.
Gabriel Bouvigne [Fri, 27 Jun 2008 03:09:55 +0000 (21:09 -0600)]
some asm functions require aligned stack. disable these when compiling with msvc/icc.
Fiona Glaser [Tue, 24 Jun 2008 21:27:41 +0000 (15:27 -0600)]
Move bitstream end check to macroblock level
Additionally, instead of silently truncating the frame upon reaching the end of the buffer, reallocate a larger buffer instead.
Fiona Glaser [Tue, 24 Jun 2008 18:23:50 +0000 (12:23 -0600)]
Convert NNZ to raster order and other optimizations
Converting NNZ to raster order simplifies a lot of the load/store code and allows more use of write-combining.
More use of write-combining throughout load/save code in common/macroblock.c
GCC has aliasing issues in the case of stores to 8-bit heap-allocated arrays; dereferencing the pointer once avoids this problem and significantly increases performance.
More manual loop unrolling and such.
Move all packXtoY functions to macroblock.h so any function can use them.
Add pack8to32.
Minor optimizations to encoder/macroblock.c
Loren Merritt [Thu, 12 Jun 2008 09:00:23 +0000 (03:00 -0600)]
mc_chroma_sse2/ssse3
Loren Merritt [Thu, 12 Jun 2008 14:43:41 +0000 (08:43 -0600)]
checkasm --bench=function_name
Loren Merritt [Thu, 12 Jun 2008 07:39:22 +0000 (01:39 -0600)]
interleave psnr/ssim computation with reference frame filtering, to improve cache coherency
Fiona Glaser [Sun, 15 Jun 2008 17:59:25 +0000 (11:59 -0600)]
Add more inline asm and a runtime check for MMXEXT support
x264 will now terminate gracefully rather than SIGILL when run on a machine with no MMXEXT support.
A configure option is now available to build x264 without assembly support for support on such old CPUs as the Pentium 2, K6, etc.
Fiona Glaser [Sun, 15 Jun 2008 17:51:36 +0000 (11:51 -0600)]
Use aligned memcpy for x264_me_t struct and cosmetics
Fiona Glaser [Sun, 15 Jun 2008 17:50:17 +0000 (11:50 -0600)]
Cosmetics and loop unrolling
GCC is not very good at loop unrolling in cases where it can perform constant propagation, so the unrolling unfortunately has to be done manually.
Fiona Glaser [Thu, 12 Jun 2008 15:17:49 +0000 (09:17 -0600)]
Fix regression in 64-bit in r882
i_mvc needs to be 64-bit when used with a 64-bit memory pointer
Fiona Glaser [Thu, 12 Jun 2008 14:09:22 +0000 (08:09 -0600)]
More tweaks to me.c
Added inline MMX version of UMH's predictor difference test
Various cosmetics throughout me.c
Removed a C99-ism introduced in r878.
Fiona Glaser [Thu, 12 Jun 2008 00:23:00 +0000 (18:23 -0600)]
Fix regression in r736
r736 added intra RD refinement to B-frames; however, it is possible for subme=7 to be used without b-rdo.
This means intra RD isn't run, and therefore it is possible for intra chroma analysis to not have been run, since update_cache was never called for an intra block, and chroma ME is not required even at subme=7.
r801, which removed a memset, made this worse because previously the chroma prediction mode was at least initialized to zero; now it was not initialized at all.
Therefore, --no-chroma-me, --subme 7, and no --b-rdo had the potential to crash.
This change restricts intra RD refinement to only be run when --b-rdo is enabled (sensible to begin with), thus preventing a crash in this case.
Fiona Glaser [Wed, 11 Jun 2008 03:37:57 +0000 (21:37 -0600)]
Fix regression in r850
Bug resulted in rare incorrect chroma encoding
Gabriel Bouvigne [Wed, 11 Jun 2008 00:40:52 +0000 (18:40 -0600)]
Cosmetics in VBV handling
Fiona Glaser [Wed, 11 Jun 2008 00:34:46 +0000 (18:34 -0600)]
Tweaks and cosmetics in me.c
Use write-combining for predictor checking and other tweaks.
Fiona Glaser [Fri, 6 Jun 2008 20:59:10 +0000 (14:59 -0600)]
Partially inline trellis quantization
Inlining trellis into the 4x4/8x8 trellis wrappers increases trellis speed by about 5-10% through constant propagation.
Fiona Glaser [Fri, 6 Jun 2008 18:32:57 +0000 (12:32 -0600)]
Various cosmetic changes.
Fiona Glaser [Sat, 7 Jun 2008 04:57:33 +0000 (22:57 -0600)]
avg_weight_sse2
Loren Merritt [Sat, 7 Jun 2008 05:31:22 +0000 (23:31 -0600)]
many changes to which asm functions are enabled on which cpus.
with Phenom, 3dnow is no longer equivalent to "sse2 is slow", so make a new flag for that.
some sse2 functions are useful only on Core2 and Phenom, so make a "sse2 is fast" flag for that.
some ssse3 instructions didn't become useful until Penryn, so yet another flag.
disable sse2 completely on Pentium M and Core1, because it's uniformly slower than mmx.
enable some sse2 functions on Athlon64 that always were faster and we just didn't notice.
remove mc_luma_sse3, because the only cpu that has lddqu (namely Pentium 4D) doesn't have "sse2 is fast".
don't print mmx1, sse1, nor 3dnow in the detected cpuflags, since we don't really have any such functions. likewise don't print sse3 unless it's used (Pentium 4D).
Loren Merritt [Sat, 7 Jun 2008 05:30:37 +0000 (23:30 -0600)]
enable ssse3 phadd satd on Penryn.
Loren Merritt [Sat, 7 Jun 2008 04:59:37 +0000 (22:59 -0600)]
benchmark most of the asm functions (checkasm --bench).
Fiona Glaser [Thu, 5 Jun 2008 17:32:05 +0000 (11:32 -0600)]
Cosmetic: fix C99-ism
Fiona Glaser [Thu, 5 Jun 2008 03:28:48 +0000 (21:28 -0600)]
Use a gaussian window for cplxblur
Cplxblur was originally intended to use a gaussian window, but in its current form did not. This change provides a tiny improvement to 2pass ratecontrol.
Loren Merritt [Mon, 2 Jun 2008 15:47:50 +0000 (09:47 -0600)]
cosmetics
Loren Merritt [Mon, 2 Jun 2008 15:40:49 +0000 (09:40 -0600)]
nasm compatible NX stack
Loren Merritt [Mon, 2 Jun 2008 14:57:59 +0000 (08:57 -0600)]
CQP is incompatible with AQ
Fiona Glaser [Sat, 24 May 2008 19:10:21 +0000 (13:10 -0600)]
memzero_aligned_mmx
BugMaster [Sat, 24 May 2008 07:09:07 +0000 (01:09 -0600)]
binmode stdin on mingw, not just msvc
Fiona Glaser [Sat, 24 May 2008 03:22:29 +0000 (21:22 -0600)]
omit redundant mc after non-rdo dct size decision, and in b-direct rdo
Fiona Glaser [Wed, 9 Apr 2008 22:46:51 +0000 (16:46 -0600)]
allow fractional CRF values with AQ.
Noboru Asai [Mon, 2 Jun 2008 15:12:29 +0000 (09:12 -0600)]
fix some uninitialized partitions in rdo
Gabriel Bouvigne [Mon, 2 Jun 2008 18:53:01 +0000 (12:53 -0600)]
2-pass VBV support and improved VBV handling
Dramatically improves 1-pass VBV ratecontrol (especially CBR) and provides support for VBV in 2-pass mode. This consists of a series of functions that attempts to find overflows and underflows in the VBV from the first-pass statsfile and fix them before encoding.
1-pass VBV code partially by Fiona Glaser.
Alexander Strange [Mon, 2 Jun 2008 18:16:51 +0000 (12:16 -0600)]
Fix noise reduction in threaded mode.
Previously enabling noise reduction with threads had no effect.
Note that this is not an optimal solution; each thread still tracks noise reducation separately (unlike in single-threaded mode).
Loren Merritt [Wed, 21 May 2008 02:15:41 +0000 (20:15 -0600)]
fix a crash on win32 with threads.
r852 introduced an assumption in deblock that the stack is aligned.
Loren Merritt [Tue, 20 May 2008 09:58:08 +0000 (03:58 -0600)]
remove nasm version check. a feature check is all that's needed.
silence stderr in yasm version check.
Loren Merritt [Sun, 18 May 2008 14:33:34 +0000 (08:33 -0600)]
cosmetics in cabac
Fiona Glaser [Sun, 18 May 2008 13:14:28 +0000 (07:14 -0600)]
faster residual_write_cabac
Loren Merritt [Sun, 18 May 2008 12:23:57 +0000 (06:23 -0600)]
change DEBUG_DUMP_FRAME to run-time --dump-yuv
Loren Merritt [Sat, 17 May 2008 09:39:59 +0000 (03:39 -0600)]
x264_median_mv_mmxext
this is the first non-runtime-detected use of mmxext, but it has to be inlined
Loren Merritt [Sun, 20 Apr 2008 09:18:19 +0000 (03:18 -0600)]
factor duplicated code out of deblock chroma mmx
Loren Merritt [Tue, 15 Apr 2008 23:52:32 +0000 (17:52 -0600)]
deblock_luma_intra_mmx
vmrsss [Sat, 17 May 2008 06:50:22 +0000 (00:50 -0600)]
write aspect ratio in mp4
Fiona Glaser [Fri, 16 May 2008 04:44:12 +0000 (22:44 -0600)]
omit delta_quant in i16x16 blocks with no residual
(all other block types were already covered, but i16x16 cbp is special)
Fiona Glaser [Thu, 15 May 2008 12:01:01 +0000 (06:01 -0600)]
explicit write combining, because gcc fails at optimizing consecutive memory accesses
Fiona Glaser [Thu, 15 May 2008 11:41:43 +0000 (05:41 -0600)]
force unroll macroblock_load_pic_pointers
and a few other minor optimizations
Fiona Glaser [Thu, 15 May 2008 11:14:53 +0000 (05:14 -0600)]
quant_2x2_dc_ssse3
Fiona Glaser [Sat, 17 May 2008 06:47:31 +0000 (00:47 -0600)]
r836 borked lossless cabac nnz
Henry Bent [Thu, 8 May 2008 01:49:14 +0000 (19:49 -0600)]
use elf instead of a.out on netbsd
Ning Xin [Wed, 7 May 2008 23:18:44 +0000 (17:18 -0600)]
fix x264_realloc when not using libc realloc.
Loren Merritt [Mon, 5 May 2008 22:28:24 +0000 (16:28 -0600)]
don't pretend to support win64. remove all related code.
it hasn't worked since probably some time in 2005, and won't ever be fixed unless someone steps up to maintain it.
Loren Merritt [Mon, 5 May 2008 22:25:19 +0000 (16:25 -0600)]
cosmetics: replace last instances of parm# asm macros with r#
Loren Merritt [Mon, 28 Apr 2008 09:12:29 +0000 (03:12 -0600)]
remove DEBUG_BENCHMARK
Fiona Glaser [Sun, 27 Apr 2008 09:10:28 +0000 (03:10 -0600)]
faster probe_skip
Loren Merritt [Tue, 22 Apr 2008 23:16:25 +0000 (17:16 -0600)]
drop support for pre-SSE3 assemblers
Loren Merritt [Fri, 25 Apr 2008 06:33:12 +0000 (00:33 -0600)]
s/x264_cpu_restore/x264_emms/
no point in giving it a generic name when it's not generic
Fiona Glaser [Sun, 27 Apr 2008 08:37:37 +0000 (02:37 -0600)]
faster cabac_mb_cbp_luma
ported from ffmpeg
Fiona Glaser [Sat, 26 Apr 2008 03:41:40 +0000 (21:41 -0600)]
remove some redundant nnz counts
move some nnz counts from macroblock_encode to cavlc if cabac doesn't need them
Fiona Glaser [Sat, 26 Apr 2008 02:43:57 +0000 (20:43 -0600)]
compute missing nnz count in subme7 cavlc
Fiona Glaser [Fri, 25 Apr 2008 07:47:47 +0000 (01:47 -0600)]
remove a division in macroblock-level bookkeeping
Fiona Glaser [Fri, 25 Apr 2008 00:55:30 +0000 (18:55 -0600)]
omit P/B-skip mc from macroblock_encode if the pixels haven't been overwritten since probe_skip
Loren Merritt [Thu, 24 Apr 2008 11:17:04 +0000 (05:17 -0600)]
earlier termination in SEA if mvcost exceeds residual
Loren Merritt [Tue, 22 Apr 2008 10:00:24 +0000 (04:00 -0600)]
remove void* arithmetic from r821
Guillaume Poirier [Fri, 25 Apr 2008 09:29:09 +0000 (11:29 +0200)]
Fix define of illegal function identifiers (as defined in section "7.1.3 Reserved identiers" of C99 spec)
Guillaume Poirier [Fri, 25 Apr 2008 08:50:48 +0000 (10:50 +0200)]
Fix define of illegal identifier (as defined in section "7.1.3 Reserved identiers" of C99 spec) "__UNUSED__", and use the one defined in common/osdep.h, i.e. "UNUSED"
based on a patch by Diego Biurrun
Guillaume Poirier [Thu, 24 Apr 2008 12:46:11 +0000 (14:46 +0200)]
more consistent include name (in line with other PPC includes)
Guillaume Poirier [Thu, 24 Apr 2008 12:44:24 +0000 (14:44 +0200)]
fix illegal identifiers in multiple inclusion guards
patch by Diego Biurrun % diego A biurrun P de %
Fiona Glaser [Tue, 22 Apr 2008 06:38:37 +0000 (00:38 -0600)]
AQ now treats perfectly flat blocks as low energy, rather than retaining previous block's QP.
fixes occasional blocking in fades.
Loren Merritt [Sun, 20 Apr 2008 18:19:46 +0000 (12:19 -0600)]
checkasm cabac
Loren Merritt [Sun, 20 Apr 2008 08:39:31 +0000 (02:39 -0600)]
s/movdqa/movaps/g
Loren Merritt [Mon, 21 Apr 2008 00:25:53 +0000 (18:25 -0600)]
--asm to allow testing of different versions of asm without recompile
Loren Merritt [Sat, 12 Apr 2008 07:40:28 +0000 (01:40 -0600)]
copy left neighbor pixels directly from previous mb instead of main plane
Fiona Glaser [Wed, 9 Apr 2008 22:30:34 +0000 (16:30 -0600)]
cacheline split workaround for mc_luma
Guillaume Poirier [Wed, 16 Apr 2008 08:46:15 +0000 (10:46 +0200)]
add "SECTION_RODATA" before "SECTION .text" to setup the fakegot label used in macho binaries.
This fixes compilation with --enable-pic
Requires Yasm 0.7.0 or newer
Patch by Dave Lee % davelee P com A gmail P com %
Loren Merritt [Sun, 13 Apr 2008 16:29:15 +0000 (10:29 -0600)]
more hpel fixes
Gabriel Bouvigne [Thu, 10 Apr 2008 14:59:19 +0000 (08:59 -0600)]
update msvc projectfile
Loren Merritt [Sat, 12 Apr 2008 00:48:30 +0000 (18:48 -0600)]
r810 borked hpel_filter_sse2 on unaligned buffers
Loren Merritt [Thu, 10 Apr 2008 09:17:53 +0000 (03:17 -0600)]
threads=auto on multicore now implies thread input, just like explicit thread numbers already did
Loren Merritt [Wed, 9 Apr 2008 02:16:50 +0000 (20:16 -0600)]
dct4 sse2
Loren Merritt [Tue, 8 Apr 2008 18:19:23 +0000 (12:19 -0600)]
faster x86_32 dct8
Loren Merritt [Mon, 7 Apr 2008 16:22:03 +0000 (10:22 -0600)]
macros to deal with macros that permute their arguments
Loren Merritt [Mon, 7 Apr 2008 14:24:40 +0000 (08:24 -0600)]
mmx cachesplit sad of non-square sizes checked height instead of width
Loren Merritt [Fri, 4 Apr 2008 07:07:40 +0000 (01:07 -0600)]
sfence after nontemporal stores
Loren Merritt [Wed, 2 Apr 2008 17:22:43 +0000 (11:22 -0600)]
simplify hpel filter asm (move control flow to C) and add sse2, ssse3 versions
Loren Merritt [Fri, 4 Apr 2008 02:46:36 +0000 (20:46 -0600)]
more mmx/xmm macros (mova, movu, movh)
Fiona Glaser [Wed, 2 Apr 2008 11:06:02 +0000 (05:06 -0600)]
improve handling of cavlc dct coef overflows
support large coefs in high profile, and clip to allowed range in baseline/main
Guillaume Poirier [Mon, 31 Mar 2008 08:50:45 +0000 (10:50 +0200)]
fix shared libs on MacOSX
based on a patch by İsmail Dönmez
Loren Merritt [Mon, 31 Mar 2008 08:27:53 +0000 (02:27 -0600)]
typo in r803
Loren Merritt [Mon, 31 Mar 2008 00:08:28 +0000 (18:08 -0600)]
fix a crash on mp4 muxing with invalid params
Fiona Glaser [Sun, 30 Mar 2008 23:58:41 +0000 (17:58 -0600)]
variance-based psy adaptive quantization
new options: --aq-mode --aq-strength
AQ is enabled by default
Zuxy Meng [Sun, 30 Mar 2008 00:04:23 +0000 (18:04 -0600)]
fix naming of .dll on mingw
Loren Merritt [Sat, 29 Mar 2008 23:53:36 +0000 (17:53 -0600)]
don't distinguish between mingw and cygwin