]> granicus.if.org Git - libvpx/log
libvpx
12 years agoFTFY: support wordwrapping commit messages
John Koleszar [Wed, 28 Mar 2012 23:41:16 +0000 (16:41 -0700)]
FTFY: support wordwrapping commit messages

It's common for commit messages to be wrapped at odd places. git-gui
is often to blame. Adds support for automatically fixing up these
messages if running ftfy --amend, and adds a new option --msg-only for
fixing only the commit message.

Change-Id: Ia7ea529f8cb7395d34d9b39f1192598e9a1e315b

12 years agoFTFY: an automated style corrector
John Koleszar [Tue, 27 Mar 2012 23:28:41 +0000 (16:28 -0700)]
FTFY: an automated style corrector

This is a utility for applying a limited amount of style correction on
a change-by-change basis. Rather than a big-bang reformatting, this
tool attempts to only correct the style in diff hunks that you touch.
This should make the cosmetic changes small enough that we can mix them
with functional changes without destroying the diffs, and there's an
escape hatch for separating the reformatting to a second commit for
purists and cases where it hurts readability.

At this time, the script requires a clean working tree, so run it after
you've commited your changes. Run without arguments, the style
corrections will be applied and left unstaged in your working copy. It
also supports the --amend option, which will automatically amend your
HEAD with the corrected style, and --commit, which will create a new
change dependent on your HEAD that contains only the whitespace changes.

There are a number of ways this could be applied in an automated manner
if this proves to be useful, either on a project-wide or per-user
basis. This doesn't buy anything in terms of real code quality, the
intent here would be to keep formatting nits out of review comments in
favor of more meaningful ones and help people whose habitual style
doesn't match the baseline.

Requires astyle[1] 1.24 or newer.
  [1]: http://astyle.sourceforge.net/

Change-Id: I2fb3434de8479655e9811f094029bb90e5d757e1

12 years agoMerge "Update for key frame target size setting."
Jim Bankoski [Tue, 13 Mar 2012 17:13:03 +0000 (10:13 -0700)]
Merge "Update for key frame target size setting."

12 years agoUpdate for key frame target size setting.
Marco Paniconi [Mon, 12 Mar 2012 23:23:08 +0000 (16:23 -0700)]
Update for key frame target size setting.

Set an iniital/minimun boost level for the frame rate
factor of key frame target size setting.

Change-Id: If2586f4ac76a1fa89378aa652a58607356a1f426

12 years agoMerge "Move SAD and variance functions to common"
Johann [Mon, 12 Mar 2012 22:08:48 +0000 (15:08 -0700)]
Merge "Move SAD and variance functions to common"

12 years agoMerge "vpx_timer: increase resolution"
John Koleszar [Fri, 9 Mar 2012 22:48:06 +0000 (14:48 -0800)]
Merge "vpx_timer: increase resolution"

12 years agoMerge changes I9c26870a,Ifabb0f67
Scott LaVarnway [Fri, 9 Mar 2012 18:48:11 +0000 (10:48 -0800)]
Merge changes I9c26870a,Ifabb0f67

* changes:
  threading.c refactoring
  Decoder loops refactoring

12 years agothreading.c refactoring
Scott LaVarnway [Thu, 8 Mar 2012 20:27:41 +0000 (15:27 -0500)]
threading.c refactoring

Added recon above/left to MACROBLOCKD
Reworked decode_macroblock

Change-Id: I9c26870af75797134f410acbd02942065b3495c1

12 years agoMerge "vp8e - RDLambda fix"
Yaowu Xu [Wed, 7 Mar 2012 19:53:04 +0000 (11:53 -0800)]
Merge "vp8e - RDLambda fix"

12 years agovp8e - RDLambda fix
Jim Bankoski [Tue, 6 Mar 2012 16:47:12 +0000 (08:47 -0800)]
vp8e - RDLambda fix

Last commit went the wrong way.

Change-Id: I5e47ee6c25b0893dfa84318229b93c57dfeec24e

12 years agoMerge "include CHANGELOG in CODEC_SRCS"
Johann [Tue, 6 Mar 2012 01:20:48 +0000 (17:20 -0800)]
Merge "include CHANGELOG in CODEC_SRCS"

12 years agoMove SAD and variance functions to common
Johann [Tue, 6 Mar 2012 00:50:33 +0000 (16:50 -0800)]
Move SAD and variance functions to common

The MFQE function of the postprocessor depends on these

Change-Id: I256a37c6de079fe92ce744b1f11e16526d06b50a

12 years agoinclude CHANGELOG in CODEC_SRCS
Johann [Tue, 6 Mar 2012 00:36:23 +0000 (16:36 -0800)]
include CHANGELOG in CODEC_SRCS

build/make/version.sh requires CHANGELOG to generate vpx_version.h
The file is already included when building the documentation. However,
documentation is not build if doxygen/php are not present.

This is necessary when using '--enable-install-srcs --enable-codec-srcs'
and 'make dist'

Change-Id: Icada883a056a4713d24934ea44e0f6969b68f9c2

12 years agoMerge "vp8e - fix coefficient costing"
Jim Bankoski [Mon, 5 Mar 2012 22:14:58 +0000 (14:14 -0800)]
Merge "vp8e - fix coefficient costing"

12 years agovp8e - fix coefficient costing
Jim Bankoski [Mon, 5 Mar 2012 16:20:42 +0000 (08:20 -0800)]
vp8e - fix coefficient costing

Coefficient costing failed to take account of the first branch
being skipped ( 0 vs eob) if the previous token is 0.

Fixed rd to account for slightly increased token cost & cleaned up
warning message

Change-Id: I56140635d9f48a28dded5a816964e973a53975ef

12 years agoFix encoder debug setting
Johann [Fri, 2 Mar 2012 00:12:53 +0000 (16:12 -0800)]
Fix encoder debug setting

Propagate debug setting to the EBML struct. When writing the application
name, this allows us to strip the version code and keep the output
metadata static.

Change-Id: I8e06c6abd743bedbff5af6242bbdae5d55754538

12 years agovpx_timer: increase resolution
John Koleszar [Thu, 1 Mar 2012 20:49:43 +0000 (12:49 -0800)]
vpx_timer: increase resolution

There's no useful reason to limit this timer to 1 second.

Change-Id: Idd1960268624e8bdfe958d99833ae6482fdb423e

12 years agoMerge "vp8e - attempt to lessen blockiness"
Jim Bankoski [Thu, 1 Mar 2012 19:47:09 +0000 (11:47 -0800)]
Merge "vp8e - attempt to lessen blockiness"

12 years agoMerge "vp8e - static key boost"
Jim Bankoski [Thu, 1 Mar 2012 19:23:10 +0000 (11:23 -0800)]
Merge "vp8e - static key boost"

12 years agoMerge "vp8e - force at least some change in over and under shoots"
Jim Bankoski [Thu, 1 Mar 2012 19:22:52 +0000 (11:22 -0800)]
Merge "vp8e - force at least some change in over and under shoots"

12 years agovp8e - static key boost
Paul Wilkins [Wed, 29 Feb 2012 17:19:23 +0000 (09:19 -0800)]
vp8e - static key boost

This seeks to boost the size of the keyframe if the entire section
is a single frame clip

Change-Id: I3c00268dc155b047dc4b90e514cf403d55a4f8ef

12 years agovp8e - force at least some change in over and under shoots
Paul Wilkins [Wed, 29 Feb 2012 20:32:46 +0000 (12:32 -0800)]
vp8e - force at least some change in over and under shoots

Change-Id: Ie1796f272dc33bf5a1c8ac990da625961d272aa9

12 years agoMerge "Packing bitstream on-the-fly with delayed context updates"
Scott LaVarnway [Thu, 1 Mar 2012 14:20:02 +0000 (06:20 -0800)]
Merge "Packing bitstream on-the-fly with delayed context updates"

12 years agovpxenc: fix time and fps calculation in 2-pass encoding
Yunqing Wang [Wed, 29 Feb 2012 13:24:53 +0000 (08:24 -0500)]
vpxenc: fix time and fps calculation in 2-pass encoding

When we do 2-pass encoding, elapsed time is accumulated through
whole 2-pass process, which gives incorrect time and fps results
for second pass. This change fixed that by resetting the time
accumulator for second pass.

Change-Id: Ie6cbf0d0e66e6874e7071305e253c6267529cf20

12 years agoPacking bitstream on-the-fly with delayed context updates
Attila Nagy [Thu, 9 Feb 2012 10:37:03 +0000 (12:37 +0200)]
Packing bitstream on-the-fly with delayed context updates

Produce the token partitions on-the-fly, while processing each MB.
Context is updated at the beginning of each frame based on the
previoud frame's counters. Optimally encoder outputs partitions in
separate buffers. For frame based output, partitions are concatenated
internally.

Limitations:
    - enabled just in combination with realtime-only mode
    - number of encoding threads has to be equal or less than the
    number of token partitions. For this reason, by default the encoder
    will do 8 token partitions.
    - vpxenc supports partition output (-P) just in combination with
    IVF output format (--ivf)

Performance:
    - Realtime encoder can be up to 13% faster (ARM) depending on the number
    of threads and bitrate settings. Constant gain over the 5-16 speed
    range.
    - Token buffer reduced from one frame to 8 MBs

Quality:
    - quality is affected by the delayed context updates. This again
    dependents on input material, speed and bitrate settings. For VC
    style input the loss seen is up to 0.2dB. If error-resilient=2
    mode is used than the effect of this change is negligible.

Example:
./configure --enable-realtime-only --enable-onthefly-bitpacking
./vpxenc --rt --end-usage=1 --fps=30000/1000 -w 640 -h 480
--target-bitrate=1000 --token-parts=3 --static-thresh=2000
--ivf -P -t 4 -o strm.ivf tanya_640x480.yuv

Change-Id: I127295cb85b835fc287e1c0201a67e378d025d76

12 years agovp8e - attempt to lessen blockiness
Jim Bankoski [Wed, 29 Feb 2012 17:03:13 +0000 (09:03 -0800)]
vp8e - attempt to lessen blockiness

applies a penalty to intra blocks in order to cut down on blockiness in
easy sections.

Change-Id: Ia9e5df16328b0bf01bf0f2e6e61abcb687316c12

12 years agoDecoder loops refactoring
Scott LaVarnway [Wed, 29 Feb 2012 15:38:14 +0000 (10:38 -0500)]
Decoder loops refactoring

Eliminated some mb branches along with other code cleanups.
This is part of an ongoing effort to remove cut/paste
code in the decoder.

Change-Id: Ifabb0f67cafa6922b5a0e89a0d03a9b34e9e5752

12 years agoMerge changes Ifb450710,I61c4a132
Scott LaVarnway [Tue, 28 Feb 2012 19:42:45 +0000 (11:42 -0800)]
Merge changes Ifb450710,I61c4a132

* changes:
  Eliminated reconintra_mt.c
  Eliminated vp8mt_build_intra_predictors_mbuv_s

12 years agoMerge "Removed duplicate code in threading.c"
Scott LaVarnway [Tue, 28 Feb 2012 19:25:43 +0000 (11:25 -0800)]
Merge "Removed duplicate code in threading.c"

12 years agoEliminated reconintra_mt.c
Scott LaVarnway [Tue, 28 Feb 2012 19:12:30 +0000 (14:12 -0500)]
Eliminated reconintra_mt.c

Reworked the code to use vp8_build_intra_predictors_mby_s,
vp8_intra_prediction_down_copy, and vp8_intra4x4_predict_d_c
functions instead.  vp8_intra4x4_predict_d_c is a decoder-only
version of vp8_intra4x4_predict.  Future commits will fix this
code duplication.

Change-Id: Ifb4507103b7c83f8b94a872345191c49240154f5

12 years agoRemoved duplicate code in threading.c
Scott LaVarnway [Tue, 28 Feb 2012 19:00:32 +0000 (14:00 -0500)]
Removed duplicate code in threading.c

Change-Id: Id7e44950ceda67b280e410e541510106ef02f1da

12 years agoMerge "Only do uv intra-mode evaluation when intra mode is checked"
Yunqing Wang [Tue, 28 Feb 2012 18:11:24 +0000 (10:11 -0800)]
Merge "Only do uv intra-mode evaluation when intra mode is checked"

12 years agoOnly do uv intra-mode evaluation when intra mode is checked
Yunqing Wang [Mon, 27 Feb 2012 22:38:53 +0000 (17:38 -0500)]
Only do uv intra-mode evaluation when intra mode is checked

When we encode slide-show clips, for the majority of the time,
only ZEROMV mode is checked, and all other modes are skipped.
This change delayed uv intra-mode evaluation until intra mode is
actually checked. This gave big performance gain for slide-show
video encoding (2nd pass gain: 18% to 28%). But, this change
doesn't help other types of videos.

Also, zbin_mode_boost is adjusted in mode-checking loop, which
causes bitstream mismatch before/after this change when --best
or --good with --cpu-used=0 are used.

Change-Id: I582b3e69fd384039994360e870e6e059c36a64cc

12 years agobugfix: use oxcf width/height for reinit check
James Berry [Mon, 27 Feb 2012 19:41:43 +0000 (14:41 -0500)]
bugfix: use oxcf width/height for reinit check

use oxcf instead of common in check to Reinit the
lookahead buffer if the frame size changes
prior behavior would cause assertion fail/crash

first observed in:
support changing resolution with vpx_codec_enc_config_set

Change-Id: Ib669916ca9b4f206d4cc3caab5107e49d39a36aa

12 years agoMerge "Fix skippable evaluation in mode decision"
Yunqing Wang [Mon, 27 Feb 2012 19:06:13 +0000 (11:06 -0800)]
Merge "Fix skippable evaluation in mode decision"

12 years agoMerge "vpxenc: initial implementation of multistream support"
John Koleszar [Mon, 27 Feb 2012 17:59:14 +0000 (09:59 -0800)]
Merge "vpxenc: initial implementation of multistream support"

12 years agoMerge "decoder: reset segmentation map on keyframes"
John Koleszar [Mon, 27 Feb 2012 17:58:29 +0000 (09:58 -0800)]
Merge "decoder: reset segmentation map on keyframes"

12 years agoFix skippable evaluation in mode decision
Yunqing Wang [Mon, 27 Feb 2012 17:45:12 +0000 (12:45 -0500)]
Fix skippable evaluation in mode decision

Yaowu fixed the skippable evaluation by correcting 2nd order
block's eob.

Change-Id: Id47930cbc74a90a046c0c0e324efb03477639ee0

12 years agoMerge "Add unit tests for idctllm_test and idctllm_mmx"
James Berry [Thu, 23 Feb 2012 16:50:36 +0000 (08:50 -0800)]
Merge "Add unit tests for idctllm_test and idctllm_mmx"

12 years agoMerge "Remove the frame rate factor for key frame size."
Jim Bankoski [Thu, 23 Feb 2012 16:38:44 +0000 (08:38 -0800)]
Merge "Remove the frame rate factor for key frame size."

12 years agoRemove the frame rate factor for key frame size.
Marco Paniconi [Wed, 22 Feb 2012 22:39:17 +0000 (14:39 -0800)]
Remove the frame rate factor for key frame size.

When temporal layers is used (i.e., number_of_layers > 1),
we don't use the frame rate boost for setting the key
frame target size. The factor was forcing the target size to be
always at its minimum (2* per_frame_bandwidth) for low frame rates
(i.e., base layer frame rate).

Generally we should modify or remove this frame rate factor;
for now we turn if off for number_of_layers > 1.

Change-Id: Ia5acf406c9b2f634d30ac2473adc7b9bf2e7e6c6

12 years agoEliminated vp8mt_build_intra_predictors_mbuv_s
Scott LaVarnway [Tue, 21 Feb 2012 19:59:05 +0000 (14:59 -0500)]
Eliminated vp8mt_build_intra_predictors_mbuv_s

Reworked the code to use vp8_build_intra_predictors_mbuv_s
instead.  This is WIP with the goal of eliminating all
functions in reconintra_mt.h

Change-Id: I61c4a132684544b24a38c4a90044597c6ec0dd52

12 years agoAdd unit tests for idctllm_test and idctllm_mmx
James Berry [Tue, 21 Feb 2012 16:57:14 +0000 (11:57 -0500)]
Add unit tests for idctllm_test and idctllm_mmx

add unit tests for vp8_short_idct4x4llm_c

Change-Id: I472b7c0baa365ba25dc99a3f6efccc816d27c941

12 years agoMerge changes I0341554f,I64e110c8
John Koleszar [Tue, 21 Feb 2012 18:09:23 +0000 (10:09 -0800)]
Merge changes I0341554f,I64e110c8

* changes:
  Consolidate C version of token packing functions
  Multithreaded encoder, late sync loopfilter

12 years agoMerge "Remove redundant init of segment_counts in vp8_encode_frame"
Scott LaVarnway [Tue, 21 Feb 2012 17:51:02 +0000 (09:51 -0800)]
Merge "Remove redundant init of segment_counts in vp8_encode_frame"

12 years agoMerge "Update encoder mb_skip_coeff and prob_skip_false calculation"
John Koleszar [Tue, 21 Feb 2012 17:48:26 +0000 (09:48 -0800)]
Merge "Update encoder mb_skip_coeff and prob_skip_false calculation"

12 years agoRefine offset pattern
Johann [Fri, 17 Feb 2012 20:24:44 +0000 (12:24 -0800)]
Refine offset pattern

When compiling with -ggdb3 the output includes an extraneous EQU from
vpx_ports/asm_offsets.h

https://trac.macports.org/ticket/33285

Change-Id: Iba93ddafec414c152b87001a7542e7a894781231

12 years agoMerge changes Idf1a05f3,If227b29b,Iac784d39
John Koleszar [Fri, 17 Feb 2012 19:14:17 +0000 (11:14 -0800)]
Merge changes Idf1a05f3,If227b29b,Iac784d39

* changes:
  vpxenc: factor out input open/close
  vpxenc: add warning()/fatal() helpers
  vpxenc: factor out global config options

12 years agoMerge "OS X shell is incompatible with echo -n"
Johann [Fri, 17 Feb 2012 18:53:19 +0000 (10:53 -0800)]
Merge "OS X shell is incompatible with echo -n"

12 years agoMerge "Fix incorrect use of uv eobs in intra modes"
Yunqing Wang [Fri, 17 Feb 2012 18:43:05 +0000 (10:43 -0800)]
Merge "Fix incorrect use of uv eobs in intra modes"

12 years agoFix incorrect use of uv eobs in intra modes
Yunqing Wang [Fri, 17 Feb 2012 14:15:08 +0000 (09:15 -0500)]
Fix incorrect use of uv eobs in intra modes

In vp8_rd_pick_inter_mode(), if total of eobs is zero, rate needs
to be adjusted since there are no non-zero coefficients for
transmission. The uv intra eobs calculated in
rd_pick_intra_mbuv_mode() need to be saved before they are
overwritten by inter-mode eobs.

Change-Id: I41dd04fba912e8122ef95793d4d98a251bc60e58

12 years agoUpdate encoder mb_skip_coeff and prob_skip_false calculation
Attila Nagy [Fri, 17 Feb 2012 09:50:33 +0000 (11:50 +0200)]
Update encoder mb_skip_coeff and prob_skip_false calculation

mode_info_context->mbmi.mb_skip_coeff has to always reflect the
existence or not of coeffs for a certain MB. The loopfilter needs this
info.
mb_skip_coeff is either set by the vp8_tokenize_mb or has to be set to
1 when the MB is skipped by mode selection. This has to be done
regardless of the mb_no_coeff_skip value.

prob_skip_false is needed just when mb_no_coeff_skip is 1. No need to
keep count of both skip_false and skip_true as they are complementary
(skip_true+skip_false = total_mbs)

Change-Id: I3c74c9a0ee37bec10de7bb796e408f3e77006813

12 years agoRemove redundant init of segment_counts in vp8_encode_frame
Attila Nagy [Fri, 17 Feb 2012 07:31:53 +0000 (09:31 +0200)]
Remove redundant init of segment_counts in vp8_encode_frame

segment_counts was zero init twice in the beginning of vp8_encode_frame.

Change-Id: Ibc29f6896dabd9aab1d0993f3941cf6876022e70

12 years agoClarify 'max_sad' usage
Johann [Fri, 27 Jan 2012 19:44:01 +0000 (11:44 -0800)]
Clarify 'max_sad' usage

Depending on implementation the optimized SAD functions may return early
when the calculated SAD exceeds max_sad.

Change-Id: I05ce5b2d34e6d45fb3ec2a450aa99c4f3343bf3a

12 years agoOS X shell is incompatible with echo -n
Johann [Thu, 16 Feb 2012 22:20:44 +0000 (14:20 -0800)]
OS X shell is incompatible with echo -n

Built in echo in 'sh' on OS X does not support -n (exclude trailing
newline). It's not necessary so just leave it off. Fixes issue 390.

Build include guard using 'symbol' so that it is more likely to be
unique.

Change-Id: I4bc6aa1fc5e02228f71c200214b5ee4a16d56b83

12 years agoInclude path fix for building against Android NDK.
Fritz Koenig [Thu, 16 Feb 2012 20:38:17 +0000 (12:38 -0800)]
Include path fix for building against Android NDK.

cpu-features.h is not in the common paths, add
to the cflags for Android.

Change-Id: Icbafc7600d72f6b59ffb030f6ab80ee6860332bb

12 years agovpxenc: initial implementation of multistream support
John Koleszar [Wed, 15 Feb 2012 20:39:38 +0000 (12:39 -0800)]
vpxenc: initial implementation of multistream support

Add the ability to specify multiple output streams on the command line.
Streams are delimited by --, and most parameters inherit from previous
streams.

In this implementation, resizing streams is still not supported. It
does not make use of the new multistream support in the encoder either.
Two pass support runs all streams independently, though it's
theoretically possible that we could combine firstpass runs in the
future. The logic required for this is too tricky to do as part of this
initial implementation. This is mostly an effort to get the parameter
passing and independent streams working from the application's
perspective, and a later commit will add the rescaling and
multiresolution support.

Change-Id: Ibf18c2355f54189fc91952c734c899e5c072b3e0

12 years agovpxenc: factor out input open/close
John Koleszar [Tue, 14 Feb 2012 20:30:17 +0000 (12:30 -0800)]
vpxenc: factor out input open/close

Simplify some of the file I/O for later commits which will add multistream
support

Change-Id: Idf1a05f3a29c95331d0c4a6ea5960904e4897fd4

12 years agovpxenc: add warning()/fatal() helpers
John Koleszar [Tue, 14 Feb 2012 17:37:44 +0000 (09:37 -0800)]
vpxenc: add warning()/fatal() helpers

Cosmetic. Allows exiting with an error message without opening a new
scope.

Change-Id: If227b29b825f0241acea79dd38f19e524552ee18

12 years agodecoder: reset segmentation map on keyframes
John Koleszar [Thu, 16 Feb 2012 19:15:11 +0000 (11:15 -0800)]
decoder: reset segmentation map on keyframes

Refactoring some of the mode decoding logic introduced a bug where
the segmentation maps would not be properly reset on keyframes.

http://code.google.com/p/webm/issues/detail?id=378

The text of the bug is somewhat misleading as I initially read it to
imply the bug was present in v0.9.7-p1 (Cayuga), but note the text
"master", which indicates this was something subsequent. This issue
bisects back to v0.9.7-p1-84-ga99c20c, so unfortunately it was broken
during the Duclair release.

Thanks to Alexei Leonenko for investigating the root cause.

Change-Id: I9713c9f070eb37b31b3b029d9ef96be9b6ea2def

12 years agoSupport Android x86 NDK build
Makoto Kato [Sun, 12 Feb 2012 04:57:13 +0000 (13:57 +0900)]
Support Android x86 NDK build

On Android NDK, rand() is inlined function.  But, on our SSE optimization,
we need symbol for rand()

Change-Id: I42ab00e3255208ba95d7f9b9a8a3605ff58da8e1

12 years agoSimplify mb_to_x_edge calculation during mode decoding
Scott LaVarnway [Thu, 16 Feb 2012 18:36:46 +0000 (13:36 -0500)]
Simplify mb_to_x_edge calculation during mode decoding

Change-Id: Ibcb35c32bf24c1d241090e24c5e2320e4d3ba901

12 years agoMerge "decodemv cleanup/improvements"
Scott LaVarnway [Thu, 16 Feb 2012 17:33:59 +0000 (09:33 -0800)]
Merge "decodemv cleanup/improvements"

12 years agodecodemv cleanup/improvements
Scott LaVarnway [Thu, 16 Feb 2012 16:38:33 +0000 (11:38 -0500)]
decodemv cleanup/improvements

Removed unnecessary variables, unrolled functions, eliminated
unnecessary mv bounds checks and branches.

Change-Id: I02d034c70cd97b65025d59dd67c695e1db529f0b

12 years agoConsolidate C version of token packing functions
Attila Nagy [Thu, 16 Feb 2012 08:51:29 +0000 (10:51 +0200)]
Consolidate C version of token packing functions

Replace inner loops of pack_mb_row_tokens_c and
pack_tokens_into_partitions_c with a call to pack_tokens_c.

Change-Id: I0341554fb154a14a5dadb63f8fc78010724c2c33

12 years agoMultithreaded encoder, late sync loopfilter
Attila Nagy [Fri, 16 Sep 2011 10:54:06 +0000 (13:54 +0300)]
Multithreaded encoder, late sync loopfilter

Second shot at this...

Sync with loopfilter thread as late as possible, usually 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. Same has to be done when
internal frame is previewed.

Change-Id: I64e110c8b224dd967faefffd9c93dd8dbad4a5b5

12 years agovpxenc: factor out global config options
John Koleszar [Tue, 14 Feb 2012 00:52:18 +0000 (16:52 -0800)]
vpxenc: factor out global config options

This is a first step towards specifying multiple output streams
with one command line.

Change-Id: Iac784d3911bf553694d024bbd0c3d547261e914b

12 years agoFix rtcd build process for Android.mk
Fritz Koenig [Wed, 15 Feb 2012 23:23:04 +0000 (15:23 -0800)]
Fix rtcd build process for Android.mk

Add a dependency so ndk-build will
generate the needed vpx_rtcd.h file.

Change-Id: I92c82e0996943dd0403c9956e1ba60e92e2837a9

12 years agoMerge "support changing resolution with vpx_codec_enc_config_set"
John Koleszar [Sat, 11 Feb 2012 00:18:00 +0000 (16:18 -0800)]
Merge "support changing resolution with vpx_codec_enc_config_set"

12 years agoMissed some variance casts
Johann [Fri, 10 Feb 2012 19:07:33 +0000 (11:07 -0800)]
Missed some variance casts

Change-Id: I9fb510f9421fb3c317a8e32e3058cee977ddf9fa

12 years agoMerge "max_sad check is not always implemented"
Johann [Fri, 10 Feb 2012 18:28:00 +0000 (10:28 -0800)]
Merge "max_sad check is not always implemented"

12 years agomax_sad check is not always implemented
Johann [Fri, 10 Feb 2012 00:19:10 +0000 (16:19 -0800)]
max_sad check is not always implemented

As an optimization some architectures use the max_sad argument to break
out early from the SAD. Pass in INT_MAX instead of 0 to prevent this.

Change-Id: I653c476834b97771578d63f231233d445388629d

12 years agoFix variance overflow
Johann [Thu, 9 Feb 2012 20:38:31 +0000 (12:38 -0800)]
Fix variance overflow

In the variance calculations the difference is summed and later squared.
When the sum exceeds sqrt(2^31) the value is treated as a negative when
it is shifted which gives incorrect results.

To fix this we cast the result of the multiplication as unsigned.

The alternative fix is to shift sum down by 4 before multiplying.
However that will reduce precision.

For 16x16 blocks the maximum sum is 65280 and sqrt(2^31) is 46340 (and
change).

PPC change is untested.

Change-Id: I1bad27ea0720067def6d71a6da5f789508cec265

12 years agoMerge "Add OS/2 supports"
John Koleszar [Wed, 8 Feb 2012 19:00:55 +0000 (11:00 -0800)]
Merge "Add OS/2 supports"

12 years agoAdd OS/2 supports
KO Myung-Hun [Fri, 3 Feb 2012 04:31:11 +0000 (13:31 +0900)]
Add OS/2 supports

Change-Id: I792d5236451905eb20a8ebe444ef5b2274e4f7a4

12 years agosupport changing resolution with vpx_codec_enc_config_set
John Koleszar [Wed, 8 Feb 2012 01:07:49 +0000 (17:07 -0800)]
support changing resolution with vpx_codec_enc_config_set

Allow the application to change the frame size during encoding. This
is only supported when not using lagged compress.

Change-Id: I89b585d703d5fd728a9e3dedf997f1b595d0db0f

12 years agoAlign internal mfqe framebuffer dimensions
John Koleszar [Tue, 7 Feb 2012 18:26:48 +0000 (10:26 -0800)]
Align internal mfqe framebuffer dimensions

MFQE postproc crashed with stream dimensions not a multiple of 16.
The buffer was memset unconditionally, so if the buffer allocation
fails we end up trying to write to NULL.

This patch traps an allocation failure with vpx_internal_error(),
and aligns the buffer dimensions to what vp8_yv12_alloc_frame_buffer()
expects.

Change-Id: I3915d597cd66886a24f4ef39752751ebe6425066

12 years agoFixed bug in 5-layer multi-layer encode
Adrian Grange [Mon, 6 Feb 2012 23:02:33 +0000 (15:02 -0800)]
Fixed bug in 5-layer multi-layer encode

The 5-layer encode must have a keyframe every 16 frames.

The KF flag was being reset after the encode of the first
frame, which it should not do for the 5-layer case
(mode=6).

Change-Id: I207d6e689d347fe3fd1075b97a817e82f7ad53b9

12 years agoMerge "Added 2 temporal patterns with new parameters"
Adrian Grange [Mon, 6 Feb 2012 22:45:33 +0000 (14:45 -0800)]
Merge "Added 2 temporal patterns with new parameters"

12 years agoMerge "Allow to skip highest-resolution encoding in multi-resolution encoder"
Yunqing Wang [Mon, 6 Feb 2012 21:58:11 +0000 (13:58 -0800)]
Merge "Allow to skip highest-resolution encoding in multi-resolution encoder"

12 years agoAllow to skip highest-resolution encoding in multi-resolution encoder
Yunqing Wang [Thu, 2 Feb 2012 19:27:04 +0000 (14:27 -0500)]
Allow to skip highest-resolution encoding in multi-resolution encoder

Sometimes, a user doesn't have enough bandwidth to send high-resolution
(i.e. HD) video even though the camera catches HD video. This change
allowed users to skip highest-resolution encoding by setting that level's
target bit rate to 0.

To test it, modify the following line in vp8_multi_resolution_encoder.c.
    unsigned int  target_bitrate[NUM_ENCODERS]={1400, 500, 100};
To skip the highest-resolution level, change it to
    unsigned int  target_bitrate[NUM_ENCODERS]={0, 500, 100};
To skip the first and second highest resolution levels, change it to
    unsigned int  target_bitrate[NUM_ENCODERS]={0, 0, 100};

This change also fixed a small problem in mapping, which slightly helped
quality and performance.

Change-Id: I977bae9a9fbfba85c8be4bd5af01539f2b84bc81

12 years agoMoved ref_frame_cost from MACROBLOCKD to MACROBLOCK
Scott LaVarnway [Thu, 2 Feb 2012 18:40:08 +0000 (13:40 -0500)]
Moved ref_frame_cost from MACROBLOCKD to MACROBLOCK

Change-Id: I05788522e9cde4322cfb12032483bdbf184bdf0b

12 years agoRemoved frames_till_alt_ref_frame from MACROBLOCKD
Scott LaVarnway [Thu, 2 Feb 2012 18:34:13 +0000 (13:34 -0500)]
Removed frames_till_alt_ref_frame from MACROBLOCKD

Change-Id: Ieb05270ac332a4cc38ec4b7b995fc0150e0fffdf

12 years agoRemoved frames_since_golden from MACROBLOCKD
Scott LaVarnway [Thu, 2 Feb 2012 18:28:41 +0000 (13:28 -0500)]
Removed frames_since_golden from MACROBLOCKD

Change-Id: I10efa441d663fceb6bc97a3bfad518cd3d9a5128

12 years agoMerge "Improved uv mv calculations in build inter predictor"
Scott LaVarnway [Tue, 31 Jan 2012 18:43:49 +0000 (10:43 -0800)]
Merge "Improved uv mv calculations in build inter predictor"

12 years agoBLOCKD structure cleanup
Scott LaVarnway [Fri, 20 Jan 2012 18:52:16 +0000 (13:52 -0500)]
BLOCKD structure cleanup

Removed redundancies.  All of the information can be
found in the MACROBLOCKD structure.

Change-Id: I7556392c6f67b43bef2a5e9932180a737466ef93

12 years agoRTCD: remove unimplemented vp8_short_walsh4x4_mmx
John Koleszar [Mon, 30 Jan 2012 20:55:45 +0000 (12:55 -0800)]
RTCD: remove unimplemented vp8_short_walsh4x4_mmx

This function does not exist.

Change-Id: I84b72fb17d572d5cccee92220467b84c15842d4d

12 years agoRTCD: finalize removal of old RTCD system
John Koleszar [Fri, 13 Jan 2012 00:55:44 +0000 (16:55 -0800)]
RTCD: finalize removal of old RTCD system

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

12 years agoRTCD: add arnr functions
John Koleszar [Fri, 13 Jan 2012 00:55:44 +0000 (16:55 -0800)]
RTCD: add arnr functions

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

12 years agoRTCD: add motion search functions
John Koleszar [Fri, 13 Jan 2012 00:55:44 +0000 (16:55 -0800)]
RTCD: add motion search functions

This commit continues the process of converting to the new RTCD
system.

Change-Id: Ia5828b7ecc80db55b21916704aa3d54cbb98f625

12 years agoRTCD: add block subtraction functions
John Koleszar [Fri, 13 Jan 2012 00:55:44 +0000 (16:55 -0800)]
RTCD: add block subtraction functions

This commit continues the process of converting to the new RTCD
system.

Change-Id: Id8a287fdd4bd050ea4452e1582ad85520f3081be

12 years agoRTCD: add quantizer functions
John Koleszar [Fri, 13 Jan 2012 00:55:44 +0000 (16:55 -0800)]
RTCD: add quantizer functions

This commit continues the process of converting to the new RTCD
system.

Change-Id: Iba9df4c03a508e51c37201c621be43523fae87d9

12 years agoRTCD: add FDCT functions
John Koleszar [Fri, 13 Jan 2012 00:55:44 +0000 (16:55 -0800)]
RTCD: add FDCT functions

This commit continues the process of converting to the new RTCD
system.

Change-Id: I3f9c07db65eb206f6363d21bdb80e871570da767

12 years agoRTCD: add variance functions
John Koleszar [Fri, 13 Jan 2012 00:55:44 +0000 (16:55 -0800)]
RTCD: add variance functions

This commit continues the process of converting to the new RTCD
system.

Change-Id: Ie5c1aa480637e98dc3918fb562ff45c37a66c538

12 years agoRTCD: add subpixel functions
John Koleszar [Fri, 13 Jan 2012 00:55:44 +0000 (16:55 -0800)]
RTCD: add subpixel functions

This commit continues the process of converting to the new RTCD
system.

Change-Id: I6c519ab61e4f4e0ebcc796f2df061f945c48cefe

12 years agoRTCD: add postproc functions
John Koleszar [Fri, 13 Jan 2012 00:55:44 +0000 (16:55 -0800)]
RTCD: add postproc functions

This commit continues the process of converting to the new RTCD
system.

Change-Id: If54eb5cb5d1b0cac6c4c0633a9e99c93ca860ba2

12 years agoRTCD: add recon functions
John Koleszar [Fri, 13 Jan 2012 00:55:44 +0000 (16:55 -0800)]
RTCD: add recon functions

This commit continues the process of converting to the new RTCD
system.

Change-Id: I9bfcf9bef65c3d4ba0fb9a3e1532bad1463a10d6

12 years agoRTCD: add remaining IDCT functions
John Koleszar [Fri, 13 Jan 2012 00:55:44 +0000 (16:55 -0800)]
RTCD: add remaining IDCT functions

This commit continues the process of converting to the new RTCD
system.

Change-Id: I03c4dbf30dfd3558b0e256ff9d3ff4c012aadc80

12 years agoRTCD: add loopfilter functions
John Koleszar [Fri, 13 Jan 2012 00:15:42 +0000 (16:15 -0800)]
RTCD: add loopfilter functions

This commit continues the process of converting to the new RTCD
system.

Change-Id: Ic8a4047d72ff3a54ec98977dd90e70c13213db71

12 years agoNew RTCD implementation
John Koleszar [Fri, 19 Aug 2011 18:06:00 +0000 (14:06 -0400)]
New RTCD implementation

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