1. 30 Jan, 2012 9 commits
    • John Koleszar's avatar
      RTCD: finalize removal of old RTCD system · 8aae2460
      John Koleszar authored
      This is the final commit in the series converting to the new RTCD
      system. It removes the encoder csystemdependent files and the remaining
      global function pointers that didn't conform to the old RTCD system.
      
      Change-Id: I9649706f1bb89f0cbf431ab0e3e7552d37be4d8e
      8aae2460
    • John Koleszar's avatar
      RTCD: add arnr functions · 109b69a7
      John Koleszar authored
      This commit continues the process of converting to the new RTCD
      system. It removes the last of the VP8_ENCODER_RTCD struct references.
      
      Change-Id: I2a44f52d7cccf5177e1ca98a028ead570d045395
      109b69a7
    • John Koleszar's avatar
      RTCD: add motion search functions · 0b0bc8d0
      John Koleszar authored
      This commit continues the process of converting to the new RTCD
      system.
      
      Change-Id: Ia5828b7ecc80db55b21916704aa3d54cbb98f625
      0b0bc8d0
    • John Koleszar's avatar
      RTCD: add quantizer functions · 61311e61
      John Koleszar authored
      This commit continues the process of converting to the new RTCD
      system.
      
      Change-Id: Iba9df4c03a508e51c37201c621be43523fae87d9
      61311e61
    • John Koleszar's avatar
      RTCD: add FDCT functions · 510e0ab4
      John Koleszar authored
      This commit continues the process of converting to the new RTCD
      system.
      
      Change-Id: I3f9c07db65eb206f6363d21bdb80e871570da767
      510e0ab4
    • John Koleszar's avatar
      RTCD: add variance functions · 83a91e78
      John Koleszar authored
      This commit continues the process of converting to the new RTCD
      system.
      
      Change-Id: Ie5c1aa480637e98dc3918fb562ff45c37a66c538
      83a91e78
    • John Koleszar's avatar
      RTCD: add subpixel functions · f103dcef
      John Koleszar authored
      This commit continues the process of converting to the new RTCD
      system.
      
      Change-Id: I6c519ab61e4f4e0ebcc796f2df061f945c48cefe
      f103dcef
    • John Koleszar's avatar
      RTCD: add postproc functions · 2a8f57f5
      John Koleszar authored
      This commit continues the process of converting to the new RTCD
      system.
      
      Change-Id: If54eb5cb5d1b0cac6c4c0633a9e99c93ca860ba2
      2a8f57f5
    • John Koleszar's avatar
      New RTCD implementation · a910049a
      John Koleszar authored
      This is a proof of concept RTCD implementation to replace the current
      system of nested includes, prototypes, INVOKE macros, etc. Currently
      only the decoder specific functions are implemented in the new system.
      Additional functions will be added in subsequent commits.
      
      Overview:
        RTCD "functions" are implemented as either a global function pointer
        or a macro (when only one eligible specialization available).
        Functions which have RTCD specializations are listed using a simple
        DSL identifying the function's base name, its prototype, and the
        architecture extensions that specializations are available for.
      
      Advantages over the old system:
        - No INVOKE macros. A call to an RTCD function looks like an ordinary
          function call.
        - No need to pass vtables around.
        - If there is only one eligible function to call, the function is
          called directly, rather than indirecting through a function pointer.
        - Supports the notion of "required" extensions, so in combination with
          the above, on x86_64 if the best function available is sse2 or lower
          it will be called directly, since all x86_64 platforms implement
          sse2.
        - Elides all references to functions which will never be called, which
          could reduce binary size. For example if sse2 is required and there
          are both mmx and sse2 implementations of a certain function, the
          code will have no link time references to the mmx code.
        - Significantly easier to add a new function, just one file to edit.
      
      Disadvantages:
        - Requires global writable data (though this is not a new requirement)
        - 1 new generated source file.
      
      Change-Id: Iae6edab65315f79c168485c96872641c5aa09d55
      a910049a
  2. 24 Jan, 2012 1 commit
    • John Koleszar's avatar
      Revert "Multithreaded encoder, late sync loopfilter" · 630d3b95
      John Koleszar authored
      This commit is incomplete, as it does not synchronize the loop filter
      before returning a handle to the reconstructed frame in
      vpx_codec_get_preview_frame(), which can cause (false?) failures
      when running the test_reconstruct_buffer test.
      
      This may be related to a bug that does cause visible artifacts, which
      is also under investigation.
      
      This reverts commit 380d64ec.
      
      Change-Id: Iad710941e7731d44fc2bde63bc63d6763cc4629e
      630d3b95
  3. 20 Jan, 2012 1 commit
    • Fritz Koenig's avatar
      Disconnect ARM tgt_isa from dsp extensions · 89210284
      Fritz Koenig authored
      A processor with ARMv7 instructions does not
      necessarily have NEON dsp extensions.  This CL
      has the added side effect of allowing the ability
      to enable/disable the dsp extensions cleanly.
      
      Change-Id: Ie1e879b8fe131885bc3d4138a0acc9ffe73a36df
      89210284
  4. 18 Jan, 2012 1 commit
    • Jeff Faust's avatar
      Simplify an assignment statement · 15c29afe
      Jeff Faust authored
      Separated a double assignment that looked suspiciously like an
      assignment and equality typo.
      
      Change-Id: I7813979e9d7ea2539afb3c8ae6074f9df5ebdf52
      15c29afe
  5. 14 Jan, 2012 1 commit
    • Adrian Grange's avatar
      Fixed bugs in multi-layer code related to changing params · e479379a
      Adrian Grange authored
      When running multi-layer (ML) encodes and dynamically
      changing coding parameters on the fly (e.g. frame
      duration/rate, bandwidths allocated to each layer)
      the encoder would not produce sensible output.
      
      In certain cases the rate targeting would be
      hideously inaccurate.
      
      These fixes make it possible to change these coding
      parameters correctly and to maintain accurate control
      of the rate targeting.
      
      I also added the specification of the input timebase
      into the test program, vp8_scalable_patterns.c.
      
      Patch 2: Moved declaration to appease MS compiler)
      
      Change-Id: Ic8bb5a16daa924bb64974e740696e040d07ae363
      e479379a
  6. 22 Dec, 2011 4 commits
    • John Koleszar's avatar
      Remove unnecessary ternary constructs · 0c2b2c79
      John Koleszar authored
      The code had a number of constructs like (condition)?1:0,
      which is redundant with C's semantics. In the cases where a boolean
      operator was used in the condition, simply remove the ternary part.
      Otherwise adjust the surrounding expression to remove the condition
      (eg, for rounding up. See pickinter.c and rdopt.c)
      
      Change-Id: Icb2372defa3783cf31857d90b2630d06b2c7e1be
      0c2b2c79
    • John Koleszar's avatar
      Remove legacy integer types · f56918ba
      John Koleszar authored
      Remove BOOL, INTn, UINTn, etc, in favor of C99-style fixed width
      types.
      
      Change-Id: I396636212fb5edd6b347d43cc940186d8cd1e7b5
      f56918ba
    • John Koleszar's avatar
      Use lookup tables for mode_check_freq · aa8650dd
      John Koleszar authored
      Mostly cosmetic. Trying for a more compact representation of speed
      selection thresholds.
      
      Change-Id: I339e7840049b91ad569aabbdc9c702a496110d3b
      aa8650dd
    • John Koleszar's avatar
      Use lookup tables for thresh_mult · efb4783d
      John Koleszar authored
      Mostly cosmetic. Trying for a more compact representation of speed
      selection thresholds.
      
      Change-Id: Icaebea632c7bb71ca8e07b4def04a046d4515e27
      efb4783d
  7. 21 Dec, 2011 3 commits
  8. 16 Dec, 2011 1 commit
    • John Koleszar's avatar
      Avoid heap allocation of firstpass stats · 26c6a44c
      John Koleszar authored
      The total_stats, this_frame_stats, and total_left_stats structures
      were previously create by a heap allocation, despite being of fixed
      size. These structures were allocated and deallocated during
      {de,}allocate_compressor_data, which is reinvoked whenever the frame
      size changes. Unfortunately, this clobbers the total_stats and
      total_left_stats data.
      
      Historically, these were variable size at one time, due to the first
      pass motion map, which necessitated their being created by a unique
      heap allocation. However, this bug with the total_stats being
      clobbered has probably been present since that initial implementation.
      
      These structures are instead moved to be stored within the struct
      twopass_rc directly, rather than being heap allocated separately.
      
      Change-Id: I7f9e519e25c58b92969071f0e99fa80307e0682b
      26c6a44c
  9. 14 Dec, 2011 1 commit
  10. 10 Dec, 2011 1 commit
  11. 07 Dec, 2011 1 commit
    • Attila Nagy's avatar
      Reduce mem copies in encoder loopfilter level picking · e570b040
      Attila Nagy authored
      Do the test filtering in the existing backup frame buffer instead of
      the original. Copy the original data into extra buffer before doing
      the  filtering. This way there is no need to restore the original
      unfiltered  frame at the end of level picking process.
      
      This came up in some discussions with Johann. Thanks!
      
      Change-Id: I495f4301d983854673276c34ec0ddf9a9d622122
      e570b040
  12. 05 Dec, 2011 1 commit
    • Yunqing Wang's avatar
      Multiple-resolution encoder · aa7335e6
      Yunqing Wang authored
      The example encoder down-samples the input video frames a number of
      times with a down-sampling factor, and then encodes and outputs
      bitstreams with different resolutions.
      
      Support arbitrary down-sampling factor, and down-sampling factor
      can be different for each encoding level.
      
      For example, the encoder can be tested as follows.
      1. Configure with multi-resolution encoding enabled:
      ../libvpx/configure --target=x86-linux-gcc --disable-codecs
      --enable-vp8 --enable-runtime_cpu_detect --enable-debug
      --disable-install-docs --enable-error-concealment
      --enable-multi-res-encoding
      2. Run make
      3. Encode:
      If input video is 1280x720, run:
      ./vp8_multi_resolution_encoder 1280 720 input.yuv 1.ivf 2.ivf 3.ivf 1
      (output: 1.ivf(1280x720); 2.ivf(640x360); 3.ivf(320x180).
      The last parameter is set to 1/0 to show/not show PSNR.)
      4. Decode:
      ./simple_decoder 1.ivf 1.yuv
      ./simple_decoder 2.ivf 2.yuv
      ./simple_decoder 3.ivf 3.yuv
      5. View video:
      mplayer 1.yuv -demuxer rawvideo -rawvideo w=1280:h=720 -loop 0 -fps 30
      mplayer 2.yuv -demuxer rawvideo -rawvideo w=640:h=360 -loop 0 -fps 30
      mplayer 3.yuv -demuxer rawvideo -rawvideo w=320:h=180 -loop 0 -fps 30
      
      The encoding parameters can be modified in vp8_multi_resolution_encoder.c,
      for example, target bitrate, frame rate...
      
      Modified API. John helped a lot with that. Thanks!
      
      Change-Id: I03be9a51167eddf94399f92d269599fb3f3d54f5
      aa7335e6
  13. 23 Nov, 2011 1 commit
    • Attila Nagy's avatar
      Fix encoder partitioned output on ARM · 97259b46
      Attila Nagy authored
      API was not returning correct partition sizes on arm targets.
      The armv5 token packing functions were not storing the information to the
      partition size table.
      As a fix, have one boolcoder instance allocated for each partition so
      that partition sizes are internally available after all partitions
      were encoded. This will also allow more flexibility in producing
      several partitions in parallel.
      
      Use buffer validation (overflow check) in all ARM bitpacking
      functions.
      
      Change-Id: I31c8a11d8a7613676f0ff50928cb2a2ab14fd169
      97259b46
  14. 18 Nov, 2011 2 commits
    • John Koleszar's avatar
      Speed selection support for disabled reference frames · e55974bf
      John Koleszar authored
      There was an implicit reference frame test order (typically LAST,
      GOLD, ARF) in the mode selection logic, but this doesn't provide the
      expected results when some reference frames are disabled. For
      instance, in real-time mode, the speed selection logic often disables
      the ARF modes. So if the user disables the LAST and GOLD frames, the
      encoder was always choosing INTRA, when in reality searching the ARF
      in this case has the same speed penalty as searching LAST would have
      had.
      
      Instead, introduce the notion of a reference frame search order. This
      patch preserves the former priorities, so if a frame is disabled, the
      other frames bump up a slot to take its place. This patch lays the
      groundwork for doing something smarter in the frame test order, for
      example considering temporal distance or looking at the frames used by
      nearby blocks.
      
      Change-Id: I1199149f8662a408537c653d2c021c7f1d29a700
      e55974bf
    • Attila Nagy's avatar
      Validate encoder buffer writes for single token partition · c84d42f8
      Attila Nagy authored
      Extend buffer write validation (overflow check) to single token
      partition packing, both mb and row based functions.
      
      Change-Id: I36e19b7d37fc43712d05c70e3ad223d3eb5b973d
      c84d42f8
  15. 11 Nov, 2011 1 commit
    • John Koleszar's avatar
      avoid resetting framerate during vpx_codec_enc_config_set() · bdd35c13
      John Koleszar authored
      The calculated frame_rate is a state variable in the codec, and
      shouldn't be maintained in the configuration struct. Move it to the
      main part of cpi so that it isn't clobbered when the configuration
      struct is updated. The initial framerate estimate is moved from the
      vp8_cx_iface.c wrapper into the body of init_config() in onyx_if.c, so
      that it is only called once and not reset on every call to
      vp8_change_config().
      
      Change-Id: I8d9a3d1283330d1ee297d07e9d78d1f2875f2465
      bdd35c13
  16. 08 Nov, 2011 2 commits
    • Adrian Grange's avatar
      Additional clipping of buffer level to maximum buffer size · fa25a31e
      Adrian Grange authored
      Added additional check of buffer level against maximum
      buffer size.
      
      Change-Id: Iaf1fbaf008601161e402b43ce82c3dbc129bf740
      fa25a31e
    • Adrian Grange's avatar
      Added check to make sure maximum buffer size not exceeded · 9dc95b0a
      Adrian Grange authored
      Added code to clip the buffer level to the maximum buffer
      size. Without this the buffer level would increase
      unchecked.
      
      This bug was found when encoding an essentially static
      scene at 2Mb/s. The encoder is unable to generate frames
      consistent with the high data-rate because Q bottoms out
      at Qmin.
      
      As frames generated are consistently undersized the buffer
      level increases and does not get checked against the
      maximum size specified by the user (or default).
      
      Change-Id: Id8a3c6323d3246da50f7cb53ddbf78b5528032c6
      9dc95b0a
  17. 20 Oct, 2011 1 commit
    • James Berry's avatar
      Fix: check cx_data buffer prior to write · bc715113
      James Berry authored
      check to make sure that cx_data buffer has enough room before
      writting to it, prior behavior did not which could result in a crash.
      
      Change-Id: I3fab6f2bc4a96d7c675ea81acd39ece121738b28
      bc715113
  18. 11 Oct, 2011 2 commits
    • Adrian Grange's avatar
      Added rate-targeted temporal scalability · 217591fd
      Adrian Grange authored
      Added the ability to create rate-targeted, temporally
      scalable, VP8 compatible bitstreams.
      
      The application vp8_scalable_patterns.c demonstrates how
      to use this capability. Users can create output bitstreams
      containing upto 5 temporally separable streams encoded
      as a single VP8 bitstream.
      (previously abandoned as:
      I92d1483e887adb274d07ce9e567e4d0314881b0a)
      
      Change-Id: I156250a3fe930be57c069d508c41b6a7a4ea8d6a
      217591fd
    • John Koleszar's avatar
      Reset FPU state after calc_plane_error() · 07ba4119
      John Koleszar authored
      Fixes a MMX/SSE2 mismatch when building with --enable-internal-stats.
      
      Change-Id: I0c50a1f246f6916b7a5fc6f36864ceb362f25520
      07ba4119
  19. 30 Sep, 2011 1 commit
    • Paul Wilkins's avatar
      CQ and two pass rate control. · b6e27d5f
      Paul Wilkins authored
      Changes to the selection of Q limits for two pass
      and two pass CQ mode.
      
      Allowance made for Mode and motion vector costs.
      Some refactoring of common code.
      
      For Derf and YT sets CQ mode average improvement
      circa 1% (SSIM and Global PSNR).
      
      Some increased tendency to undershoot even when
      user CQ not reached.
      
      Patch2: Removed some test code accidentally merged.
      
      Change-Id: Icf74d13af77437c08602571dc7a97e747cce5066
      b6e27d5f
  20. 29 Sep, 2011 1 commit
    • Attila Nagy's avatar
      Multithreaded encoder, late sync loopfilter · 380d64ec
      Attila Nagy authored
      Sync with loopfilter thread just at the beginning of next frame encoding.
      This returns control to application faster and allows a better multicore scaling.
      When PSNR packets are generated the final filtered frame is needed imediatly
      so we cannot delay the sync.
      
      Change-Id: I288d97b5e331d41d6f5bb49d97986fa12ac6f066
      380d64ec
  21. 25 Aug, 2011 1 commit
    • Yunqing Wang's avatar
      Minor modification on key frame decision · 1f20202e
      Yunqing Wang authored
      This change makes sure that no key frame recoding in real-time mode
      even if CONFIG_REALTIME_ONLY is not configured.
      
      Change-Id: Ifc34141f3217a6bb63cc087d78b111fadb35eec2
      1f20202e
  22. 19 Aug, 2011 1 commit
    • Alpha Lam's avatar
      Copy less when active map is in use · 4e8d35a4
      Alpha Lam authored
      When active map is specified and the current frame is not a key frame,
      golden frame nor a altref frame then copy only those active regions.
      
      This significantly reduces encoding time by as much as 19% on the test
      system where realtime encoding is used. This is particularly useful
      when the frame size is large (e.g. 2560x1600) and there's only a few
      action macroblocks.
      
      Change-Id: If394a813ec2df5a0201745d1348dbde4278f7ad4
      4e8d35a4
  23. 12 Aug, 2011 1 commit
    • John Koleszar's avatar
      Revert "Improved 1-pass CBR rate control" · e9613170
      John Koleszar authored
      This reverts commit b5ea2fbc. Further
      testing showed noticable keyframe popping in some cases, reverting this
      for now to give time for a proper fix.
      
      Conflicts:
      
      	vp8/encoder/onyx_if.c
      	vp8/encoder/ratectrl.c
      
      Change-Id: I159f53d1bf0e24c035754ab3ded8ccfd58fd04af
      e9613170
  24. 03 Aug, 2011 1 commit
    • John Koleszar's avatar
      Fix source buffer selection · 238dae86
      John Koleszar authored
      This patch fixes a bug in the interaction between the recode loop and
      spatial resampling. If the codec was in a spatial resampling state,
      and a subsequent iteration of the recode loop disables resampling,
      then the source buffer must be reset to the unscaled source.
      
      Change-Id: I4e4cd47b943f6cd26a47449dc7f4255b38e27c77
      238dae86