1. 07 Dec, 2012 1 commit
    • Ronald S. Bultje's avatar
      32x32 transform for superblocks. · c456b35f
      Ronald S. Bultje authored
      This adds Debargha's DCT/DWT hybrid and a regular 32x32 DCT, and adds
      code all over the place to wrap that in the bitstream/encoder/decoder/RD.
      
      Some implementation notes (these probably need careful review):
      - token range is extended by 1 bit, since the value range out of this
        transform is [-16384,16383].
      - the coefficients coming out of the FDCT are manually scaled back by
        1 bit, or else they won't fit in int16_t (they are 17 bits). Because
        of this, the RD error scoring does not right-shift the MSE score by
        two (unlike for 4x4/8x8/16x16).
      - to compensate for this loss in precision, the quantizer is halved
        also. This is currently a little hacky.
      - FDCT and IDCT is double-only right now. Needs a fixed-point impl.
      - There are no default probabilities for the 32x32 transform yet; I'm
        simply using the 16x16 luma ones. A future commit will add newly
        generated probabilities for all transforms.
      - No ADST version. I don't think we'll add one for this level; if an
        ADST is desired, transform-size selection can scale back to 16x16
        or lower, and use an ADST at that level.
      
      Additional notes specific to Debargha's DWT/DCT hybrid:
      - coefficient scale is different for the top/left 16x16 (DCT-over-DWT)
        block than for the rest (DWT pixel differences) of the block. Therefore,
        RD error scoring isn't easily scalable between coefficient and pixel
        domain. Thus, unfortunately, we need to compute the RD distortion in
        the pixel domain until we figure out how to scale these appropriately.
      
      Change-Id: I00386f20f35d7fabb19aba94c8162f8aee64ef2b
      c456b35f
  2. 29 Nov, 2012 1 commit
  3. 27 Nov, 2012 1 commit
    • John Koleszar's avatar
      Add vp9_ prefix to all vp9 files · fcccbcbb
      John Koleszar authored
      Support for gyp which doesn't support multiple objects in the same
      static library having the same basename.
      
      Change-Id: Ib947eefbaf68f8b177a796d23f875ccdfa6bc9dc
      fcccbcbb
  4. 25 Nov, 2012 1 commit
  5. 13 Nov, 2012 1 commit
    • Yunqing Wang's avatar
      Optimize 8x8 dequant and idct · e60478d4
      Yunqing Wang authored
      Similar to 16x16 dequant and idct, based on the value of eobs, the
      8x8 dequant and idct calculation was simplified to improve decorder
      performance.
      
      Combined vp9_dequant_idct_add_8x8 and vp9_dequant_dc_idct_add_8x8
      to eliminate duplicate code.
      
      Change-Id: Ia58e50ab27f7012b7379c495837c9c0b5ba9cf7f
      e60478d4
  6. 08 Nov, 2012 1 commit
    • Yunqing Wang's avatar
      Optimize 16x16 dequant and idct · 6c17c9fa
      Yunqing Wang authored
      As suggested by Yaowu, simplified 16x16 dequant and idct. In decoder,
      after detoken step, we know the number of non-zero dct coefficients
      (eobs) in a macroblock. Idct calculation can be skipped or simplified
      based on eobs, which improves the decoder performance.
      
      Change-Id: I9ffa1cb134bcb5a7d64fcf90c81871a96d1b4018
      6c17c9fa
  7. 06 Nov, 2012 1 commit
  8. 01 Nov, 2012 3 commits
  9. 31 Oct, 2012 3 commits
  10. 30 Oct, 2012 1 commit
    • Yunqing Wang's avatar
      Convert the transforms to integer forms. · 8a9e4e8a
      Yunqing Wang authored
      Converted the forward and inverse transforms to integer forms.
      
      Modify #define TEST_INT 1/0
      in the code to call integer/float version of transforms.
      
      The tests showed that average OVERALL PSNR loss was less than 0.1%.
      
      Change-Id: I1dfa4eeab6412597e3b970ce299cf0e116a917e6
      8a9e4e8a
  11. 22 Oct, 2012 1 commit
  12. 19 Oct, 2012 1 commit
    • Deb Mukherjee's avatar
      Some cleanups and fixes. · f3208f36
      Deb Mukherjee authored
      Separates the logic on transform type selection previously spread out
      over a number of files into a separate function. Currently the tx_type
      field in b_mode_info is not used, but still left in there to eventually
      use for signaling the transform type in the bitstream.
      
      Also, now for tx_type = DCT_DCT, the regular integer DCT is used, as
      opposed to the floating point DCT used in conjuction with hybrid
      transform.
      
      Results change somewhat due to the transform change, but are within
      reasonable limits. The hd/std-hd sets are slightly up, while derf/yt
      are slightly down.
      
      Change-Id: I5776840c2239ca2da31ca6cfd7fd1148dc5f9e0f
      f3208f36
  13. 11 Oct, 2012 1 commit
  14. 05 Oct, 2012 1 commit
    • Paul Wilkins's avatar
      Fix SIMD unsafe use of floating point. · 81c60419
      Paul Wilkins authored
      This commit fixes unsafe simd / floating point interactions arising
      from the current hybrid and 16x16 transform implementation.
      These led to a raft of bugs and issues when the project was
      built using VS2008 for Win32 though they did not show up with
      the unix builds.
      
      Gerrit makes a meal out of presenting the fix but all I have actually
      done is indent the body of each function that uses floating point by
      one level and bracket with emms instructions using  the function
      vp8_clear_system_state(). See below.
      
      function () {
        vp8_clear_system_state();
        {
        ... function body
        }
        vp8_clear_system_state();
      }
      
      This is almost certainly over the top in terms of number of emms
      instructions but is a temporary measure pending implementation of
      integer variants of each function to replace the floating point.
      
      Limited testing suggests that this fixes the problems that arose for
      Win32 VS2008 when the hybrid or 16x16 transforms were enabled.
      
      Change-Id: I7c9a72bd79315246ed880578dec51e2b7c178442
      81c60419
  15. 30 Aug, 2012 1 commit
    • Jingning Han's avatar
      hybrid transform of 16x16 dimension · de6dfa6b
      Jingning Han authored
      Enable ADST/DCT of dimension 16x16 for I16X16 modes. This change provides
      benefits mostly for hd sequences.
      
      Set up the framework for selectable transform dimension.
      
      Also allowing quantization parameter threshold to control the use
      of hybrid transform (This is currently disabled by setting threshold
      always above the quantization parameter. Adaptive thresholding can
      be built upon this, which will further improve the coding performance.)
      
      The coding performance gains (with respect to the codec that has all
      other configuration settings turned on) are
      
      derf:   0.013
      yt:     0.086
      hd:     0.198
      std-hd: 0.501
      
      Change-Id: Ibb4263a61fc74e0b3c345f54d73e8c73552bf926
      de6dfa6b
  16. 21 Aug, 2012 1 commit
  17. 13 Aug, 2012 1 commit
  18. 07 Aug, 2012 2 commits
    • Yaowu Xu's avatar
      A bit of temporary relief on encoder slowness · 0b17ea6f
      Yaowu Xu authored
      The commit replaces run-time initialization of cosine constants with
      static constant values, which provides ~30% relief on slow speed. The
      real solution, however will be to implement integer versions of those
      functions that current use float/double.
      
      Change-Id: Ie3ff1793509653d78dd1aeaf88cc6737da1bc55f
      0b17ea6f
    • Jingning Han's avatar
      Refactoring hybrid transform coding · 66f440f1
      Jingning Han authored
      The forward and inverse hybrid transforms are now performed using
      single function modules, where the dimension is sent as argument.
      
      Added an inline function clip8b to clip the reconstruction pixels
      into range of 0-255.
      
      Change-Id: Id7d870b3e1aefc092721c80c0af6f641eb5f3747
      66f440f1
  19. 03 Aug, 2012 2 commits
    • Jingning Han's avatar
      Replacing the 8x8 DCT with 8x8 ADST/DCT for I8x8 · fcbff9ee
      Jingning Han authored
      Fixed the code review comments.
      
      Under the htrans8x8 experiment the 8X8 DCT in the
      I8X8 mode is replaced with a combination of 8X8 ADST and
      DCT.
      
      Overall coding gains with the htrans8x8 experiment are:
      derf:   0.486
      std-hd: 1.040
      hd:     1.063
      yt:     0.506
      
      Note that part of the gain comes from bigger transforms
      (8x8 instead of 4x4) and part comes from replacing the DCT
      wth the ADST.
      
      Change-Id: I92ca6bbfce11b4165d612b81d9adfad4d010c775
      fcbff9ee
    • Daniel Kang's avatar
      16x16 DCT blocks. · fed8a183
      Daniel Kang authored
      Set on all 16x16 intra/inter modes
      
      Features:
      - Butterfly fDCT/iDCT
      - Loop filter does not filter internal edges with 16x16
      - Optimize coefficient function
      - Update coefficient probability function
      - RD
      - Entropy stats
      - 16x16 is a config option
      
      Have not tested with experiments.
      
      hd:     2.60%
      std-hd: 2.43%
      yt:     1.32%
      derf:   0.60%
      
      Change-Id: I96fb090517c30c5da84bad4fae602c3ec0c58b1c
      fed8a183
  20. 19 Jul, 2012 1 commit
    • Jingning Han's avatar
      Adds hybrid transform · 9824230f
      Jingning Han authored
      Adds ADST/DCT hybrid transform coding for Intra4x4 mode.
      The ADST is applied to directions in which the boundary
      pixels are used for prediction, while DCT applied to
      directions without corresponding boundary prediction.
      
      Adds enum TX_TYPE in b_mode_infor to indicate the transform
      type used.
      
      Make coding style consistent with google style.
      Fixed the commented issues.
      
      Experimental results in terms of bit-rate reduction:
      derf:   0.731%
      yt:     0.982%
      std-hd: 0.459%
      hd:     0.725%
      
      Will be looking at 8x8 transforms next.
      
      Change-Id: I46dbd7b80dbb3e8856e9c34fbc58cb3764a12fcf
      9824230f
  21. 17 Jul, 2012 1 commit
  22. 29 Jun, 2012 1 commit
    • Hui Su's avatar
      Add lossless compression mode. · e44ee38a
      Hui Su authored
      This commit adds lossless compression capability to the experimental
      branch. The lossless experiment can be enabled using --enable-lossless
      in configure. When the experiment is enabled, the encoder will use
      lossless compression mode by command line option --lossless, and the
      decoder automatically recognizes a losslessly encoded clip and decodes
      accordingly.
      
      To achieve the lossless coding, this commit has changed the following:
          1. To encode at lossless mode, encoder forces the use of unit
      quantizer, i.e, Q 0, where effective quantization is 1. Encoder also
      disables the usage of 8x8 transform and allows only 4x4 transform;
          2. At Q 0, the first order 4x4  DCT/IDCT have been switched over
      to a pair of forward and inverse Walsh-Hadamard Transform
      (http://goo.gl/EIsfy),  with proper scaling applied to match the range
      of the original 4x4 DCT/IDCT pair;
          3. At Q 0, the second order remains to use the previous
      walsh-hadamard transform pair. However, to maintain the reversibility
      in second order transform at Q 0, scaling down is applied to first
      order DC coefficients prior to forward transform, and scaling up is
      applied to the second order output prior to quantization. Symmetric
      upscaling and downscaling are added around inverse second order
      transform;
          4. At lossless mode, encoder also disables a number of minor
      features to ensure no loss is introduced, these features includes:
              a. Trellis quantization optimization
              b. Loop filtering
              c. Aggressive zero-binning, rounding and zero-bin boosting
              d. Mode based zero-bin boosting
      
      Lossless coding test was performed on all clips within the derf set,
      to verify that the commit has achieved lossless compression for all
      clips. The average compression ratio is around 2.57 to 1.
      (http://goo.gl/dEShs)
      
      Change-Id: Ia3aba7dd09df40dd590f93b9aba134defbc64e34
      e44ee38a
  23. 19 Jun, 2012 1 commit
  24. 10 May, 2012 1 commit
    • Yaowu Xu's avatar
      Reversible WHT pair · 7968d29f
      Yaowu Xu authored
      This commit changed the forward and the inverse 4x4 Walsh Hadamard
      transform to a new pair, where the inverse transform can pefectly
      reconstuct the input to forward transform. It also does so without
      changing the input and output value range. Even more, it does not
      change the complexity of the transforms.
      
      While it was not expected to improve the results of our current test,
      it does improve std-hd set by 0.2% on all metrics. No change on derf.
      
      Change-Id: Ie4f23ddd3a0f3c5fbe97fb58399f860031f99337
      7968d29f
  25. 15 Mar, 2012 1 commit
    • Yaowu Xu's avatar
      WebM Experimental Codec Branch Snapshot · 6035da54
      Yaowu Xu authored
      This is a code snapshot of experimental work currently ongoing for a
      next-generation codec.
      
      The codebase has been cut down considerably from the libvpx baseline.
      For example, we are currently only supporting VBR 2-pass rate control
      and have removed most of the code relating to coding speed, threading,
      error resilience, partitions and various other features.  This is in
      part to make the codebase easier to work on and experiment with, but
      also because we want to have an open discussion about how the bitstream
      will be structured and partitioned and not have that conversation
      constrained by past work.
      
      Our basic working pattern has been to initially encapsulate experiments
      using configure options linked to #IF CONFIG_XXX statements in the
      code. Once experiments have matured and we are reasonably happy that
      they give benefit and can be merged without breaking other experiments,
      we remove the conditional compile statements and merge them in.
      
      Current changes include:
      * Temporal coding experiment for segments (though still only 4 max, it
        will likely be increased).
      * Segment feature experiment - to allow various bits of information to
        be coded at the segment level. Features tested so far include mode
        and reference frame information, limiting end of block offset and
        transform size, alongside Q and loop filter parameters, but this set
        is very fluid.
      * Support for 8x8 transform - 8x8 dct with 2nd order 2x2 haar is used
        in MBs using 16x16 prediction modes within inter frames.
      * Compound prediction (combination of signals from existing predictors
        to create a new predictor).
      * 8 tap interpolation filters and 1/8th pel motion vectors.
      * Loop filter modifications.
      * Various entropy modifications and changes to how entropy contexts and
        updates are handled.
      * Extended quantizer range matched to transform precision improvements.
      
      There are also ongoing further experiments that we hope to merge in the
      near future: For example, coding of motion and other aspects of the
      prediction signal to better support larger image formats, use of larger
      block sizes (e.g. 32x32 and up) and lossless non-transform based coding
      options (especially for key frames). It is our hope that we will be
      able to make regular updates and we will warmly welcome community
      contributions.
      
      Please be warned that, at this stage, the codebase is currently slower
      than VP8 stable branch as most new code has not been optimized, and
      even the 'C' has been deliberately written to be simple and obvious,
      not fast.
      
      The following graphs have the initial test results, numbers in the
      tables measure the compression improvement in terms of percentage. The
      build has  the following optional experiments configured:
      --enable-experimental --enable-enhanced_interp --enable-uvintra
      --enable-high_precision_mv --enable-sixteenth_subpel_uv
      
      CIF Size clips:
      http://getwebm.org/tmp/cif/
      HD size clips:
      http://getwebm.org/tmp/hd/
      (stable_20120309 represents encoding results of WebM master branch
      build as of commit#7a159071)
      
      They were encoded using the following encode parameters:
      --good --cpu-used=0 -t 0 --lag-in-frames=25 --min-q=0 --max-q=63
      --end-usage=0 --auto-alt-ref=1 -p 2 --pass=2 --kf-max-dist=9999
      --kf-min-dist=0 --drop-frame=0 --static-thresh=0 --bias-pct=50
      --minsection-pct=0 --maxsection-pct=800 --sharpness=0
      --arnr-maxframes=7 --arnr-strength=3(for HD,6 for CIF)
      --arnr-type=3
      
      Change-Id: I5c62ed09cfff5815a2bb34e7820d6a810c23183c
      6035da54
  26. 01 Mar, 2012 1 commit
  27. 16 Feb, 2012 4 commits
    • Yaowu Xu's avatar
      a bit code clean-up · 47d545f1
      Yaowu Xu authored
      Removed some transform code that is not in use.
      
      Change-Id: I9489af7e23d9d7fe052feb6c8bbafa62ebbda39c
      47d545f1
    • Yaowu Xu's avatar
      optmized rounding for transforms · efa9abd0
      Yaowu Xu authored
      the changes are still temporary, the final transforms, especially
      inverse ones should take in account both accuracy, complexity, and
      sign-bias, which should be decided at a later time.
      
      Change-Id: I116b0c70b25f5ee324ae5713d4564f5d0aa27151
      efa9abd0
    • Yaowu Xu's avatar
      re-scaled 2nd order haar transform · 62a78f03
      Yaowu Xu authored
      During the work of extend_qrange, we have rolled a factor of 2 from
      quantization/dequatnization into 2nd order walsh-hadamard transform.
      This commit does the same for the 2nd order haar transform. so they
      can share the same quantizaiton process as the 2nd order WHT.
      
      Change-Id: I734af4a20ea8149a01b5b1971a065092977dfe33
      62a78f03
    • Yaowu Xu's avatar
      moved scaling from dequantization to inverse transform for T8x8 · 454c7abc
      Yaowu Xu authored
      Previously, the scaling related to extended quantize range happens in
      dequantization stage, which implies the coefficients form forward
      transform are in different scale(4x) from dequantization coefficients
      This worked fine when there was not distortion computation done based
      on 8x8 transform, but it completely wracked the distortion estimation
      based on transform coefficients and dequantized transform coefficients
      introduced in commit f64725a0 for macroblocks using 8x8 transform.
      This commit fixed the issue by moving the scaling into the stage of
      inverse 8x8 transform.
      
      TODO: Test&Verify the transform/quantization pipeline accuracy.
      
      Change-Id: Iff77b36a965c2a6b247e59b9c59df93eba5d60e2
      454c7abc
  28. 09 Feb, 2012 1 commit
  29. 25 Nov, 2011 1 commit
    • Scott LaVarnway's avatar
      Modified the inverse walsh to output directly · 4a91541c
      Scott LaVarnway authored
      to the dqcoeff or qcoeff buffer.  The encoder would
      populate the dc coeffs of the y blocks as a separate
      stage (recon_dcblock) and the decoder would use a special
      version of the idct.  This change eliminates the extra copy
      and reduces the code footprint.
      
      [Tero] Added needed changes to armv6 and NEON assembly.
      
      Change-Id: I83202ffdbaf83f6e5dd69f4ba2519fcf0b13b3ba
      4a91541c
  30. 09 Nov, 2011 1 commit
  31. 08 Nov, 2011 1 commit