1. 28 Jul, 2009 1 commit
    • Fiona Glaser's avatar
      Faster bidir_rd plus some bugfixes · b08410d0
      Fiona Glaser authored
      Cache chroma MC during refine_bidir_rd and use both the luma and chroma caches to skip MC in macroblock_encode.
      Fix incorrect call to rd_cost_part; refine_bidir_rd output was incorrect for i8>0.
      Remove some redundant clips.
      ~12% faster refine_bidir_rd.
      b08410d0
  2. 26 Jul, 2009 1 commit
    • Fiona Glaser's avatar
      Add QPRD support as subme=10 · 4304c427
      Fiona Glaser authored
      Refactor trellis lambda selection to be done in analyse_init instead of in trellis.
      This will allow for more easy adaption of lambda later on; for now it allows constant lambda across variable QPs.
      QPRD is only available with adaptive quantization enabled and generally improves SSIM and visual quality.
      Additionally, weight the SSD values from RD based on the relative QP offset for chroma; helps visually at high QPs where chroma has a lower QP than luma.
      This fixes some visual artifacts created by QPRD at high QPs.
      Note that this generally hurts PSNR and SSIM, and so is only on when psy-RD is on.
      4304c427
  3. 10 Jul, 2009 1 commit
  4. 03 Jul, 2009 1 commit
    • Fiona Glaser's avatar
      Early termination for chroma encoding · 205a032c
      Fiona Glaser authored
      Faster chroma encoding by terminating early if heuristics indicate that the block will be DC-only.
      This works because the vast majority of inter chroma blocks have no coefficients at all, and those that do are almost always DC-only.
      Add two new helper DSP functions for this: dct_dc_8x8 and var2_8x8.  mmx/sse2/ssse3 versions of each.
      Early termination is disabled at very low QPs due to it not being useful there.
      Performance increase is ~1-2% without trellis, up to 5-6% with trellis=2.
      Increase is greater with lower bitrates.
      205a032c
  5. 18 Apr, 2009 1 commit
  6. 27 Mar, 2009 1 commit
  7. 09 Feb, 2009 1 commit
  8. 03 Feb, 2009 1 commit
  9. 30 Jan, 2009 1 commit
    • Fiona Glaser's avatar
      Massive overhaul of nnz/cbp calculation · e394bd60
      Fiona Glaser authored
      Modify quantization to also calculate array_non_zero.
      PPC assembly changes by gpoirior.
      New quant asm includes some small tweaks to quant and SSE4 versions using ptest for the array_non_zero.
      Use this new feature of quant to merge nnz/cbp calculation directly with encoding and avoid many unnecessary calls to dequant/zigzag/decimate/etc.
      Also add new i16x16 DC-only iDCT with asm.
      Since intra encoding now directly calculates nnz, skip_intra now backs up nnz/cbp as well.
      Output should be equivalent except when using p4x4+RDO because of a subtlety involving old nnz values lying around.
      Performance increase in macroblock_encode: ~18% with dct-decimate, 30% without at CRF 25.
      Overall performance increase 0-6% depending on encoding settings.
      e394bd60
  10. 27 Jan, 2009 1 commit
    • Fiona Glaser's avatar
      Much faster chroma encoding and other opts · 83d805fe
      Fiona Glaser authored
      ~15% faster chroma encode by reorganizing CBP calculation and adding special-case idct_dc function, since most coded chroma blocks are DC-only.
      Small optimization in cache_save (skip_bp)
      Fix array_non_zero to not violate strict aliasing (should eliminate miscompilation issues in the future)
      Add in automatic substitutions for some asm instructions that have an equivalent smaller representation.
      83d805fe
  11. 11 Dec, 2008 2 commits
    • Fiona Glaser's avatar
      More small speed tweaks to macroblock.c · e0779152
      Fiona Glaser authored
      e0779152
    • Fiona Glaser's avatar
      Much faster CAVLC residual coding · 99448f6c
      Fiona Glaser authored
      Use a VLC table for common levelcodes instead of constructing them on-the-spot
      Branchless version of i_trailing calculation (2x faster on Nehalem)
      Completely remove array_non_zero_count and instead use the count calculated in level/run coding.  Note: this slightly changes output with subme > 7 due to different nonzero counts being stored during qpel RD.
      99448f6c
  12. 28 Nov, 2008 1 commit
    • Fiona Glaser's avatar
      Significantly faster CABAC and CAVLC residual coding and bit cost calculation · c1d73389
      Fiona Glaser authored
      Early-terminate in residual writing using stored nnz counts
      To allow the above, store nnz counts for luma and chroma DC
      Add assembly functions to find the last nonzero coefficient in a block
      Overall ~1.9% faster at subme9+8x8dct+qp25 with CAVLC, ~0.7% faster with CABAC
      Note this changes output slightly with CABAC RDO because it requires always storing correct nnz values during RDO, which wasn't done before in cases it wasn't useful.
      CAVLC output should be equivalent.
      c1d73389
  13. 27 Nov, 2008 1 commit
  14. 10 Nov, 2008 2 commits
    • Fiona Glaser's avatar
      Faster chroma encoding · be121180
      Fiona Glaser authored
      9-12% faster chroma encode.
      Move all functions for handling chroma DC that don't have assembly versions to macroblock.c and inline them, along with a few other tweaks.
      be121180
    • Fiona Glaser's avatar
      Various cosmetics and minor fixes · ae51235d
      Fiona Glaser authored
      Disable hadamard_ac sse2/ssse3 under stack_mod4
      Fix one MSVC compilation warning
      Fix compilation in debug mode in certain cases on x64
      Remove eval.c from MSVC project
      Fix crash when VBV is used in CQP mode
      Patches by MasterNobody
      ae51235d
  15. 22 Oct, 2008 2 commits
  16. 18 Oct, 2008 2 commits
  17. 28 Sep, 2008 1 commit
    • Fiona Glaser's avatar
      Replace High 4:4:4 profile lossless with High 4:4:4 Predictive. · a9e86d24
      Fiona Glaser authored
      This improves lossless compression by about 4-25% depending on source.
      The benefit is generally higher for intra-only compression.
      Also add support for 8x8dct and i8x8 blocks in lossless mode; this improves compression very slightly.
      In some rare cases 8x8dct can hurt compression in lossless mode, but its usually helpful, albeit marginally.
      Note that 8x8dct is only available with CABAC as it is never useful with CAVLC.
      High 4:4:4 Predictive replaced the previous profile in a 2007 revision to the H.264 standard.
      The only known compliant decoder for this profile is the latest version of CoreAVC.
      As I write this, JM does not actually correctly decode this profile.
      Hopefully this lack of support will soon change with this commit, as x264 will be (to my knowledge) the first compliant encoder.
      a9e86d24
  18. 15 Sep, 2008 1 commit
  19. 27 Aug, 2008 1 commit
    • Fiona Glaser's avatar
      Activate trellis in p8x8 qpel RD · 8de7dbbe
      Fiona Glaser authored
      Also clean up macroblock.c with some refactoring
      Note that this change significantly reduces subme7+trellis2 performance, but improves quality.
      Issue originally reported by Alex_W.
      8de7dbbe
  20. 21 Aug, 2008 2 commits
  21. 09 Aug, 2008 1 commit
  22. 30 Jul, 2008 1 commit
  23. 16 Jul, 2008 1 commit
  24. 06 Jul, 2008 1 commit
    • Fiona Glaser's avatar
      Various optimizations and cosmetics · c9c7edf3
      Fiona Glaser authored
      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
      c9c7edf3
  25. 04 Jul, 2008 1 commit
    • Fiona Glaser's avatar
      Update file headers throughout x264 · bdbd4fe7
      Fiona Glaser authored
      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
      bdbd4fe7
  26. 03 Jul, 2008 1 commit
  27. 02 Jul, 2008 1 commit
    • Fiona Glaser's avatar
      Optimizations and cosmetics in macroblock.c · a59f4a7b
      Fiona Glaser authored
      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.
      a59f4a7b
  28. 24 Jun, 2008 1 commit
    • Fiona Glaser's avatar
      Convert NNZ to raster order and other optimizations · ec3d0955
      Fiona Glaser authored
      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
      ec3d0955
  29. 03 Jun, 2008 1 commit
  30. 17 May, 2008 3 commits
  31. 14 May, 2008 1 commit
  32. 27 Apr, 2008 2 commits