1. 10 Nov, 2010 2 commits
    • Fritz Koenig's avatar
      postproc : Re-work posproc calling to allow more flags. · 647df00f
      Fritz Koenig authored
      Debugging in postproc needs more flags to allow for specific
      block types to be turned on or off in the visualizations.
      
      Must be enabled with --enable-postproc-visualizer during
      configuration time.
      
      Change-Id: Ia74f357ddc3ad4fb8082afd3a64f62384e4fcb2d
      647df00f
    • Paul Wilkins's avatar
      Tuning for the more exact quantizer. · 6adbe090
      Paul Wilkins authored
      Small changes to the default zero bin and rounding tables.
      Though the tables are currently the same for the Y1 and Y2 cases
      I have left them as separate tables in case we want to tune this later.
      
      There is now some adjustment of the zbin based on the prediction mode.
      Previously this was restricted to an adjustment for gf/arf 0,0 MV.
      
      The exact quantizer now marginal outperforms and is the default.
      
      The overall average gain is about 0.5%
      
      Change-Id: I5e4353f3d5326dde4e86823684b236a1e9ea7f47
      6adbe090
  2. 05 Nov, 2010 1 commit
    • John Koleszar's avatar
      improve average framerate calculation · f7e187d3
      John Koleszar authored
      Change Ice204e86 identified a problem with bitrate undershoot due to
      low precision in the timestamps passed to the library. This patch
      takes a different approach by calculating the duration of this frame
      and passing it to the library, rather than using a fixed duration
      and letting the library average it out with higher precision
      timestamps. This part of the fix only applies to vpxenc.
      
      This patch also attempts to fix the problem for generic applications
      that may have made the same mistake vpxenc did. Instead of
      calculating this frame's duration by the difference of this frame's
      and the last frame's start time, we use the end times instead. This
      allows the framerate calculation to scavenge "unclaimed" time from
      the last frame. For instance:
      
        start |  end  | calculated duration
        ======+=======+====================
          0ms    33ms   33ms
         33ms    66ms   33ms
         66ms    99ms   33ms
        100ms   133ms   34ms
      
      Change-Id: I92be4b3518e0bd530e97f90e69e75330a4c413fc
      f7e187d3
  3. 27 Oct, 2010 2 commits
    • Yunqing Wang's avatar
      Full search SAD function optimization in SSE4.1 · 71ecb5d7
      Yunqing Wang authored
      Use mpsadbw, and calculate 8 sad at once. Function list:
      vp8_sad16x16x8_sse4
      vp8_sad16x8x8_sse4
      vp8_sad8x16x8_sse4
      vp8_sad8x8x8_sse4
      vp8_sad4x4x8_sse4
      
      (test clip: tulip)
      For best quality mode, this gave encoder a 5% performance boost.
      For good quality mode with speed=1, this gave encoder a 3%
      performance boost.
      
      Change-Id: I083b5a39d39144f88dcbccbef95da6498e490134
      71ecb5d7
    • John Koleszar's avatar
      Add half-pixel variance RTCD functions · 209d82ad
      John Koleszar authored
      NEON has optimized 16x16 half-pixel variance functions, but they
      were not part of the RTCD framework. Add these functions to RTCD,
      so that other platforms can make use of this optimization in the
      future and special-case ARM code can be removed.
      
      A number of functions were taking two variance functions as
      parameters. These functions were changed to take a single
      parameter, a pointer to a struct containing all the variance
      functions for that block size. This provides additional flexibility
      for calling additional variance functions (the half-pixel special
      case, for example) and by initializing the table for all block sizes,
      we don't have to construct this function pointer table for each
      macroblock.
      
      Change-Id: I78289ff36b2715f9a7aa04d5f6fbe3d23acdc29c
      209d82ad
  4. 25 Oct, 2010 3 commits
    • Martin Ettl's avatar
      Fix leaked file descriptor with ENTROPY_STATS · c3fd2c4e
      Martin Ettl authored
      cppcheck found a leaked file descriptor in the debugging code
      enabled by defining ENTROPY_STATS. Fixes issue #60.
      
      Change-Id: I0c1d0669cb94d44fed77860f97b82763be06b7cb
      c3fd2c4e
    • Timothy B. Terriberry's avatar
      Add runtime CPU detection support for ARM. · b71962fd
      Timothy B. Terriberry authored
      The primary goal is to allow a binary to be built which supports
       NEON, but can fall back to non-NEON routines, since some Android
       devices do not have NEON, even if they are otherwise ARMv7 (e.g.,
       Tegra).
      The configure-generated flags HAVE_ARMV7, etc., are used to decide
       which versions of each function to build, and when
       CONFIG_RUNTIME_CPU_DETECT is enabled, the correct version is chosen
       at run time.
      In order for this to work, the CFLAGS must be set to something
       appropriate (e.g., without -mfpu=neon for ARMv7, and with
       appropriate -march and -mcpu for even earlier configurations), or
       the native C code will not be able to run.
      The ASFLAGS must remain set for the most advanced instruction set
       required at build time, since the ARM assembler will refuse to emit
       them otherwise.
      I have not attempted to make any changes to configure to do this
       automatically.
      Doing so will probably require the addition of new configure options.
      
      Many of the hooks for RTCD on ARM were already there, but a lot of
       the code had bit-rotted, and a good deal of the ARM-specific code
       is not integrated into the RTCD structs at all.
      I did not try to resolve the latter, merely to add the minimal amount
       of protection around them to allow RTCD to work.
      Those functions that were called based on an ifdef at the calling
       site were expanded to check the RTCD flags at that site, but they
       should be added to an RTCD struct somewhere in the future.
      The functions invoked with global function pointers still are, but
       these should be moved into an RTCD struct for thread safety (I
       believe every platform currently supported has atomic pointer
       stores, but this is not guaranteed).
      
      The encoder's boolhuff functions did not even have _c and armv7
       suffixes, and the correct version was resolved at link time.
      The token packing functions did have appropriate suffixes, but the
       version was selected with a define, with no associated RTCD struct.
      However, for both of these, the only armv7 instruction they actually
       used was rbit, and this was completely superfluous, so I reworked
       them to avoid it.
      The only non-ARMv4 instruction remaining in them is clz, which is
       ARMv5 (not even ARMv5TE is required).
      Considering that there are no ARM-specific configs which are not at
       least ARMv5TE, I did not try to detect these at runtime, and simply
       enable them for ARMv5 and above.
      
      Finally, the NEON register saving code was completely non-reentrant,
       since it saved the registers to a global, static variable.
      I moved the storage for this onto the stack.
      A single binary built with this code was tested on an ARM11 (ARMv6)
       and a Cortex A8 (ARMv7 w/NEON), for both the encoder and decoder,
       and produced identical output, while using the correct accelerated
       functions on each.
      I did not test on any earlier processors.
      
      Change-Id: I45cbd63a614f4554c3b325c45d46c0806f009eaa
      b71962fd
    • Johann's avatar
      isolate new temporal filtering code · e81e30c2
      Johann authored
      onyx_if is getting pretty big. split out the temporal code to make it
      easier to look at.
      
      Change-Id: I207c3a94c90e91b32e3ea5e1836a53b7a990fabd
      e81e30c2
  5. 21 Oct, 2010 1 commit
    • John Koleszar's avatar
      Move firstpass motion map to stats packet · bb7dd5b1
      John Koleszar authored
      The first implementation of the firstpass motion map for motion
      compensated temporal filtering created a file, fpmotionmap.stt,
      in the current working directory. This was not safe for multiple
      encoder instances. This patch merges this data into the first pass
      stats packet interface, so that it is handled like the other
      (numerical) firstpass stats.
      
      The new stats packet is defined as follows:
          Numerical Stats (16 doubles) -- 128 bytes
          Motion Map                   -- 1 byte / Macroblock
          Padding                      -- to align packet to 8 bytes
      
      The fpmotionmap.stt file can still be generated for debugging
      purposes in the same way that the textual version of the stats
      are available (defining OUTPUT_FPF in firstpass.c)
      
      Change-Id: I083ffbfd95e7d6a42bb4039ba0e81f678c8183ca
      bb7dd5b1
  6. 15 Oct, 2010 1 commit
    • Yaowu Xu's avatar
      change to make use of more trellis quantization · 2e53e9e5
      Yaowu Xu authored
      when a subsequent frame is encoded as an alt reference frame, it is
      unlikely that any mb in current frame will be used as reference for
      future frames, so we can enable quantization optimization even when
      the RD constant is slightly rate-biased. The change has an overall
      benefit between 0.1% to 0.2% bit savings on the test sets based on
      vpxssim scores.
      
      Change-Id: I9aa7bc5cd573ea84e3ee655d2834c18c4460ceea
      2e53e9e5
  7. 14 Oct, 2010 1 commit
  8. 11 Oct, 2010 1 commit
    • Timothy B. Terriberry's avatar
      Remove INTRARDOPT #define and intra_rd_opt option. · dd08db93
      Timothy B. Terriberry authored
      This is just eliminating some cruft.
      Although a number of variables are declared only when INTRARDOPT
       is defined, they are used elsewhere without that protection, and
       no longer just for intra RDO.
      The intra_rd_opt flag was hard-coded to 1 and never checked.
      
      Change-Id: I83a81554ecee8053e7b4ccd8aa04e18fa60f8e4f
      dd08db93
  9. 02 Oct, 2010 1 commit
    • Paul Wilkins's avatar
      Tune effect of motion on KF/GF boost in two pass; · 788c0eb5
      Paul Wilkins authored
      This code adjust the impact of the amount and speed of motion
      on GF and KF boost.
      
      Sections with lots of slow motion will tend to have a
      somewhat bigger boost and sections with fast motion may
      have less.
      
      There is a knock on effect to the selection of the active
      quantizer range.
      
      This will likely require further tuning but helps with a couple
      of particularly bad edge cases.
      
      Change-Id: Ic2449cda7305672b69acf42fc0a845b77ac98d40
      788c0eb5
  10. 01 Oct, 2010 1 commit
  11. 29 Sep, 2010 4 commits
    • John Koleszar's avatar
      Rename mode_ref_lf_test_function · 7e5e3151
      John Koleszar authored
      This function graduated from being a test func to something that's on
      by default. Rename it and remove some spurious comments that confuse
      its status.
      
      Change-Id: I689695a3ad29c35e9a72a43ec93766733ac6c20b
      7e5e3151
    • John Koleszar's avatar
      Fix loopfilter delta zero transitions · b9be7a46
      John Koleszar authored
      Loopfilter deltas are initialized to zero on keyframes in the decoder.
      The values then persist from the previous frame unless an update bit
      is set in the bitstream. This data is not included in the entropy
      data saved by the 'refresh entropy' bit in the bitstream, so it is
      effectively an additional contextual element beyond the 3 ref-frames
      and the entropy data.
      
      The encoder was treating this delta update bit as update-if-nonzero,
      meaning that the value would be refreshed even if it hadn't changed,
      and more significantly, if the correct value for the delta changed
      to zero, the update wouldn't be sent, and the decoder would preserve
      the last (presumably non-zero) value.
      
      This patch updates the encoder to send an update only if the value
      has changed from the previously transmitted value. It also forces the
      value to be transmitted in error resilient mode, to account for lost
      context in the event of lost frames.
      
      Change-Id: I56671d5b42965d0166ac226765dbfce3e5301868
      b9be7a46
    • Paul Wilkins's avatar
      Change to coefficient optimization rules. · 7288cdf7
      Paul Wilkins authored
      Allow coefficient optimization for good quality speed 0.
      
      Change-Id: Id0cb363df6823c6798671584fbba097916a7df2c
      7288cdf7
    • Paul Wilkins's avatar
      Control of active min quantizer for two pass. · ff3068d6
      Paul Wilkins authored
      Create  look up tables for controlling the active quantizer range.
      Some initial tuning to improve quality circa 0.5% on test set.
      Clean up of some stats output code
      
      Change-Id: Ia698a8525f8b8129a503cadace3ee73fe888f543
      ff3068d6
  12. 28 Sep, 2010 1 commit
  13. 27 Sep, 2010 1 commit
  14. 24 Sep, 2010 1 commit
    • John Koleszar's avatar
      disable compilation of debugging code · 8ca779ab
      John Koleszar authored
      This patch avoids compiling some debugging code in onyx_if.c. The most
      significant fix is to avoid generating code for vp8_write_yuv_frame,
      which is never called. Some other code was removed by the dead code
      elimination performed by the compiler, and this patch does it with the
      preprocessor instead. There are advantages both ways.
      
      Change-Id: I044fd43179d2e947553f0d6f2cad5b40907ac458
      8ca779ab
  15. 09 Sep, 2010 2 commits
    • John Koleszar's avatar
      Fix GF interval for non-lagged ARFs · edcbb1c1
      John Koleszar authored
      When ARFs are enabled in non-lagged compress modes, the GF interval
      was being reset to zero. Non-lagged ARF updates were enabled in commit
      63ccfbd5, but this incorrect GF interval caused a quality regression.
      
      Change-Id: I615c3b493f4ce2127044f4e68d0bcb07d6b730c3
      edcbb1c1
    • John Koleszar's avatar
      Use WebM in copyright notice for consistency · c2140b8a
      John Koleszar authored
      Changes 'The VP8 project' to 'The WebM project', for consistency
      with other webmproject.org repositories.
      
      Fixes issue #97.
      
      Change-Id: I37c13ed5fbdb9d334ceef71c6350e9febed9bbba
      c2140b8a
  16. 08 Sep, 2010 2 commits
    • Jim Bankoski's avatar
      Skip unnecessary search of identical frames · 69ae8f47
      Jim Bankoski authored
      vp8_get_compressed_data() was defeating logic in
      encode_frame_to_datarate() that determined the reference buffers to
      search and forcing all frames to be eligible to search. In cases
      where buffers have identical contents, this is unnecessary extra
      work.
      
      Change-Id: I9e667ac39128ae32dc455a3db4c62e3efce6f114
      69ae8f47
    • Jim Bankoski's avatar
      Enable ARFs for non-lagged compress · 63ccfbd5
      Jim Bankoski authored
      ARFs were explicitly disabled except in lagged compress mode. New
      ARF logic allows for the ARF buffer to hold an older golden frame,
      which does not require lagged compress.
      
      Change-Id: I1dff82b6f53e8311f1e0514b1794ae05919d5f79
      63ccfbd5
  17. 03 Sep, 2010 1 commit
    • Scott LaVarnway's avatar
      Reduced the size of MB_MODE_INFO · 0de458f6
      Scott LaVarnway authored
      Moved partition_bmi and partition_count out of MB_MODE_INFO and
      placed into MACROBLOCK.  Also reduced the size of other members
      of the MB_MODE_INFO struct.  For 1080p, the memory was reduced
      by 1,209,516 bytes.  The decoder performance appeared to improve
      by 3% for the clip used.
      Note:  The main goal for this change is to improve the decoder
      performance.  The encoder will be revisited at a later date for
      further structure cleanup.
      
      Change-Id: I4733621292ee9cc3fffa4046cb3fd4d99bd14613
      0de458f6
  18. 31 Aug, 2010 1 commit
    • Paul Wilkins's avatar
      Improved Force Key Frame Behaviour · c239a1b6
      Paul Wilkins authored
      These changes improve the behaviour of the code with
      forced key frames sent in by a calling application.
      
      The sizing of the frames is still suboptimal for two pass in
      particular but the behaviour is much better than it was.
      
      Change-Id: I35fae610c67688ccc69d11f385e87dfc884e65a1
      c239a1b6
  19. 20 Aug, 2010 1 commit
    • John Koleszar's avatar
      increase rate control buffer level precision · 8e7ebacb
      John Koleszar authored
      The external API exposes the RC initial/optimal/full buffer level in
      milliseconds, but this value was truncated internally to seconds. This
      patch allows the use of the full precision during the conversion from
      time to bits.
      
      Change-Id: If8dd2a87614c05747f81432cbe75dd9e6ed2f04e
      8e7ebacb
  20. 13 Aug, 2010 1 commit
    • John Koleszar's avatar
      move segmentation_common to encoder · 80d3923a
      John Koleszar authored
      vp8_update_gf_useage_maps() is only used by the encoder. This patch
      fixes the ability to build in decode-only or encode-only
      configurations.
      
      Change-Id: I3a5211428e539886ba998e09e8abd747ac55c9aa
      80d3923a
  21. 11 Aug, 2010 2 commits
  22. 23 Jul, 2010 2 commits
    • Fritz Koenig's avatar
      Swap alt/gold/new/last frame buffer ptrs instead of copying. · 0ce39012
      Fritz Koenig authored
      At the end of the decode, frame buffers were being copied.
      The frames are not updated after the copy, they are just
      for reference on later frames.  This change allows multiple
      references to the same frame buffer instead of copying it.
      
      Changes needed to be made to the encoder to handle this.  The
      encoder is still doing frame buffer copies in similar places
      where pointer reference could be done.
      
      Change-Id: I7c38be4d23979cc49b5f17241ca3a78703803e66
      0ce39012
    • Paul Wilkins's avatar
      80 character line length on Arnr LUT · d576690b
      Paul Wilkins authored
      Tweaked table to fit to 80 characters.
      
      Change-Id: Ie6ba80e0b31b33e23d2bf78599abe223369fcefb
      d576690b
  23. 19 Jul, 2010 2 commits
    • Paul Wilkins's avatar
      ARNR Lookup Table. · 0ba32632
      Paul Wilkins authored
      Change submitted for Adrian Grange. Convert threshold
      calculation in ARNR filter to a lookup table.
      
      Change-Id: I12a4bbb96b9ce6231ce2a6ecc2d295610d49e7ec
      0ba32632
    • Paul Wilkins's avatar
      Rate control fix for ARNR filtered frames. · bf18069c
      Paul Wilkins authored
      Previously we had assumed that it was necessary to give a full frame's
      bit allocation to the alt ref frame if it has been created through temporal
      filtering. This is not the case. The active max quantizer control
      insures that sufficient bits are allocated if needed and allocating a
      full frame's worth of bits creates an excessive overhead for the ARF.
      
      Change-Id: I83c95ed7bc7ce0e53ccae6ff32db5a97f145937a
      bf18069c
  24. 16 Jul, 2010 1 commit
  25. 28 Jun, 2010 1 commit
    • Adrian Grange's avatar
      Fixed buffer selection for UV in AltRef filtering · aa8fe0d2
      Adrian Grange authored
      Corrected setting of "which_buffer" for U & V cases to match that
      used for Y, i.e. to refer to the temporally most recent frame of
      those to be filtered.
      
      Change-Id: Idf94b287ef47a05f060da3e61134a0b616adcb6b
      aa8fe0d2
  26. 24 Jun, 2010 1 commit
    • Yaowu Xu's avatar
      Redo the forward 4x4 dct · d0dd01b8
      Yaowu Xu authored
      The new fdct lowers the round trip sum squared error for a
      4x4 block ~0.12. or ~0.008/pixel. For reference, the old
      matrix multiply version has average round trip error 1.46
      for a 4x4 block.
      
      Thanks to "derf" for his suggestions and references.
      
      Change-Id: I5559d1e81d333b319404ab16b336b739f87afc79
      d0dd01b8
  27. 21 Jun, 2010 2 commits
    • agrange's avatar
      Fix breakout thresh computation for golden & AltRef frames · a08df455
      agrange authored
      1. Unavailability of each reference frame type should be tested
      independently,
      2. Also, only the VP8_GOLD_FLAG needs to be tested before setting
      golden frame specific thresholds, and only VP8_ALT_FLAG needs
      testing before setting thresholds relevant to the AltRef frame.
      (Raised by gbvalor, in response to Issue 47)
      
      Change-Id: I6a06fc2a6592841d85422bc1661e33349bb6c3b8
      a08df455
    • agrange's avatar
      Changed unary operator from ! to ~ · daa5d0eb
      agrange authored
      Since the intent is
      to reset the appropriate bit in ref_frame_flags not to
      test a logic condition. Prior result would always have
      been ref_frame_flags being set to 0.
      (Issue reported by dgohman, issue 47)
      
      Change-Id: I2c12502ed74c73cf38e98c9680e0249c29e16433
      daa5d0eb