Commit Graph

74 Commits

Author SHA1 Message Date
Ronald S. Bultje
3121497041 Add encoder/decoder mismatch information to internal stats file.
Change-Id: Ibb6ba26e8718d3af27553ca59443a8c6aec7749d
2012-10-11 10:13:48 -07:00
Christian Duvivier
a1168155a7 Fix warnings.
Change-Id: I4b911e4173da30c164bde7ea50bc80a70fbbb745
2012-08-14 16:23:32 -07:00
Adrian Grange
c9d343f3e5 Added const specifier to remove warning
The "codecs" array is defined as const so too
should the local variable that points too it.

Change-Id: I536a9ced52257dc44a04fc1a3cad94c1e86f69aa
2012-07-24 12:50:03 -07:00
Jim Bankoski
1b16e74813 Dll build of libvpx
Change-Id: I74e50b4dfbe73eb98e1dce1695a9973f637220c0
2012-07-23 14:51:21 -07:00
John Koleszar
c6b9039fd9 Restyle code
Approximate the Google style guide[1] so that that there's a written
document to follow and tools to check compliance[2].

[1]: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
[2]: http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py

Change-Id: Idf40e3d8dddcc72150f6af127b13e5dab838685f
2012-07-17 11:46:03 -07:00
Hui Su
e44ee38aef Add lossless compression mode.
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
2012-06-28 17:09:47 -07:00
Yaowu Xu
4d6de817b4 Added usage info on command line options
This commit added usage information that was missed in usage output.

Change-Id: If1a85bcc20131314f5d047c6db4e76a40d945e66
2012-05-01 12:25:56 -07:00
Adrian Grange
9daf3154db Superblock encoding order
This is the first patch to add superblock (32x32) coding
order capabilities. It does not yet do any mode selection
at the SB level, that will follow in a further patch.

This patch encodes rows of SBs rather than
MBs, each SB contains 2x2 MBs.

Two intra prediction modes have been disabled since they
require reconstructed data for the above-right MB which
may not have been encoded yet (e.g. for the bottom right
MB in each SB).

Results on the one test clip I have tried (720p GIPS clip)
suggest that it is somewhere around 0.2dB worse than the
baseline version, so there may be bugs.

It has been tested with no experiments enabled and with
the following 3 experiments enabled:
  --enable-enhanced_interp
  --enable-high_precision_mv
  --enable-sixteenth_subpel_uv
in each case the decode buffer matches the recon buffer
(using "cmp" to compare the dumped/decoded frames).
Note: Testing these experiments individually created
errors.

Some problems were found with other experiments but it
is unclear what state these experiments are in:
  --enable-comp_intra_pred
  --enable-newentropy
  --enable-uvintra

This code has not been extensively tested yet, so there
is every likelihood that further bugs remain. I also
intend to do some code cleanup & refactoring in tandem
with the next patch that adds the 32x32 modes.

Change-Id: I1eba7f740a70b3510df58db53464535ef881b4d9
2012-04-11 10:40:57 +01:00
Yaowu Xu
f798f9e465 Added encode/decode recon buffer match test to vpxenc
The commit added a new command line option --test-decode to vpxenc.
The option enables encoder to decode compressed frames and test recon
buffers from the decode against those from encode for mismatch.

There are a few limitations on this option currently, one of them
being the match test is not done on a number of lagged frames at
the end of an encoding.

Change-Id: I80c29b46dcdcea9f48107a506b235743068862fe
2012-03-14 18:46:12 -07:00
Yaowu Xu
03d5d69368 Added option to skip first n frame to vpxenc
this commit added a command line option to skip first n frames from
input file to facilitate debugging and testing.

Change-Id: I4ffc5f85fa7e193ea4bdee08cb236717de8beef1
2012-03-14 07:54:12 -07:00
Yaowu Xu
8cf28d346d Changed MAX_PSNR to be consistent with internal stats
The maximum psnr has a marginal impact on the overall output in high
quality encodings, the change will make sure the psnr output to be
consistent with encoder internal stats.

Change-Id: I35cf2f85008ec127a7d91c9eb69fa7811798ae32
2012-03-07 16:14:54 -08:00
John Koleszar
a16cd74ba1 Merge remote branch 'internal/upstream-experimental' into HEAD
Conflicts:
	vp8/decoder/detokenize.c
	vp8/decoder/onyxd_if.c
	vp8/vp8_common.mk

Change-Id: Ifca1108186a8bc715da86a44021ee2fa5550b5b8
2011-08-11 13:01:45 -04:00
Lou Quillio
edfed938ba Sync vpxenc --timebase usage wording with docs change.
Change-Id: Ia406272a97806c0194435bb7f24e24d353ef5cc6
2011-08-02 09:57:50 -04:00
John Koleszar
1654ae9a2a Convert rc_max_intra_bitrate_pct to control
Since this is the only ABI incompatible change since the last release,
convert it to use the control interface instead. The member of the
configuration struct is replaced with the VP8E_SET_MAX_INTRA_BITRATE_PCT
control.

More significant API changes were expected to be forthcoming when this
control was first introduced, and while they continue to be expected,
it's not worth breaking compatibility for only this change.

Change-Id: I799d8dbe24c8bc9c241e0b7743b2b64f81327d59
2011-07-28 09:17:35 -04:00
James Zern
3a975d9489 vpxenc: cosmetics: timebase help update / spelling
The timebase update fixes Issue #61.

Change-Id: I425158da7ea639464f61e6dd604ac9e6c72b7266
2011-07-26 17:27:01 -07:00
James Zern
b45065d38b cosmetics: consistently use [u]int64_t
Removes mixed usage of (unsigned) long long and INT64.
Fixes Issue #208.

Change-Id: I220d3ed5ce4bb1280cd38bb3715f208ce23cf83a
2011-07-26 11:34:36 -07:00
John Koleszar
b3b34b0bc7 Merge remote branch 'internal/upstream' into HEAD 2011-07-19 00:05:05 -04:00
John Koleszar
da39e505dd Merge "Fixed rate histogram calculation" 2011-07-18 06:07:51 -07:00
Tero Rintaluoma
fd41cb8491 Fixed rate histogram calculation
Using small values for --buf-sz= in command line causes
floating point exception due to division by zero.

Change-Id: Ibfe2d44db922993a78ebc9a4a1087d9625de48ae
2011-07-18 10:35:05 +03:00
John Koleszar
dc1c3f9024 Merge remote branch 'internal/upstream' into HEAD 2011-07-16 00:05:05 -04:00
Yunqing Wang
c156a68d06 Fix vpxenc encoding incorrect webm file header on big endian machines(Issue 331)
As reported in issue 331, vpxenc encoded incorrect webm file header
on big endian machines. This change fixed that.

Change-Id: I31924ebd476a87f3e88b9b5424540bf781d2b86f
2011-07-12 14:49:57 -04:00
John Koleszar
9dfd006017 Merge remote branch 'internal/upstream-experimental' into HEAD
Conflicts:
	vp8/encoder/bitstream.c

Change-Id: I44c00f98dcb99eb728ce4f5256aefb135a711a74
2011-06-30 08:46:49 -04:00
John Koleszar
034cea5e72 Merge "guard against space/time distortion" 2011-06-29 11:36:51 -07:00
Johann
bb0ca87a0d guard against space/time distortion
and divide by 0 errors

Change-Id: I8af5ca3d0913cb6f278fff754f8772bcb62e674a
2011-06-29 14:34:25 -04:00
John Koleszar
05239f0c41 vpxenc: prevent wraparound in the --rate-hist ringbuffer
For clips that are near 60fps and have a lot of alt refs, it's possible
that the ring buffer holding the previous frames sizes/pts could wrap
around, leading to a division by zero.

In addition to checking for this condition in the ring buffer loop,
the buffer size is made dependent on the actual frame rate in use,
rather than defaulting to 60, which should improve accuracy at frame
rates >= ~60.

Change-Id: If5a04d6e847316dc5f7504f25c01164cf9332be8
2011-06-29 10:30:19 -04:00
James Zern
db6ee54353 vpxenc: free resources
Free buffers allocated for y4m input and webm cue list.

Change-Id: I02051baae3b45f692cf5c7f520ea9a2d80c7b470
2011-06-28 12:10:24 -07:00
John Koleszar
7467f6d04a Merge remote branch 'internal/upstream' into HEAD 2011-06-23 11:55:51 -04:00
John Koleszar
c96f8e238d vpxenc: add rate histogram display
Add the --rate-hist=n option, which displays a histogram with n
buckets for the rate over the --buf-sz window.

Change-Id: I2807b5a1525c7972e9ba40839b37e92b23ceffaf
2011-06-23 10:22:44 -04:00
John Koleszar
3fde9964ce vpxenc: add quantizer histogram display
Add the --q-hist=n option, which displays a histogram with n buckets for
the quantizer selected on each frame.

Change-Id: I59b020c26b0acae0b938685081d9932bd98df5c9
2011-06-23 10:22:43 -04:00
John Koleszar
e1b90ce862 Merge remote branch 'internal/upstream' into HEAD 2011-04-28 00:05:07 -04:00
Fritz Koenig
00fdb135a7 vpxenc: remove duplicate --fps from vpxenc usage message
Fixes issue #323

Change-Id: I41c297df37afe186a8425ed2e2a95032069dcb9a
2011-04-27 11:27:59 -07:00
John Koleszar
bbc24a65c4 Merge remote branch 'internal/upstream' into HEAD
Conflicts:
	vp8/common/alloccommon.c
	vp8/encoder/rdopt.c

Change-Id: Ic34b33577423031e277235ffa6bcaff7b252e5cb
2011-04-26 08:27:39 -04:00
John Koleszar
ef86bad0d1 Merge "Stereo 3D format support for vpxenc" 2011-04-25 10:48:44 -07:00
John Koleszar
aa926fbd27 Add rc_max_intra_bitrate_pct control
Adds a control to limit the maximum size of a keyframe, as a function of
the per-frame bitrate. See this thread[1] for more detailed discussion:

[1]: http://groups.google.com/a/webmproject.org/group/codec-devel/browse_thread/thread/271b944a5e47ca38

Change-Id: I7337707642eb8041d1e593efc2edfdf66db02a94
2011-04-25 13:47:14 -04:00
Alok Ahuja
72c76ca256 Stereo 3D format support for vpxenc
Create a new input parameter to allow specifying
the packed frame stereo 3d format. A default value
of mono will be written in the absence of user
specified input

Change-Id: I576d9952ab5d7e2076fbf1b282016a9a1baaa103
2011-04-25 07:21:51 -07:00
John Koleszar
9d75a502c4 Merge remote branch 'internal/upstream' into HEAD 2011-04-16 00:05:07 -04:00
Johann
f64f425a50 remove executable bit
source files are not executable

Change-Id: Id2c7294695a22217468426423979f68f02d82340
2011-04-15 13:43:24 -04:00
John Koleszar
b3b2657f21 Merge remote branch 'internal/upstream' into HEAD 2011-04-02 00:05:11 -04:00
John Koleszar
26b6a3b088 vpxenc: die on realloc failures
Identified as a possible cause of issue #308, the code was silently
ignoring realloc failures, which would lead to corruption, memory
leaks, and likely a crash. The best we can do in this case is die
gracefully.

Change-Id: Ie5f6a853d367015be5b9712bd742778f3baeefd9
2011-03-30 06:37:02 -04:00
John Koleszar
51bcf621c1 Merge remote branch 'internal/upstream' into HEAD
Conflicts:
	vp8/decoder/decodemv.c
	vp8/decoder/onyxd_if.c
	vp8/encoder/ratectrl.c
	vp8/encoder/rdopt.c

Change-Id: Ia1c1c5e589f4200822d12378c7749ba62bd17ae2
2011-03-23 00:27:52 -04:00
John Koleszar
500fec2d5f Allow specifying --end-usage by enum name
Map an enum to the --end-usage values, so you can specify
--end-usage=cq instead of --end-usage=2. The numerical values still
work for historical scripts, etc, but this is more user friendly.

Change-Id: I445ecd9638f801f5924a71eabf449bee293cdd34
2011-03-21 07:50:42 -04:00
John Koleszar
5e9e17dff7 Merge remote branch 'internal/upstream' into HEAD 2011-03-08 00:05:05 -05:00
Ralph Giles
fe9a604b1e Fix format-string warning
Cast size_t to (unsigned long) and print it with the %lu format
string, which is more portable than C99's explict %zu for size_t.

This truncates on Windows x64 but otherwise works on 32 and 64 bit
platforms. In practice the stats file is unlikely to be so large.

Change-Id: I0432b3acf85fc6ba4ad50640942e1ca4614b21cb
2011-03-07 13:21:39 -08:00
John Koleszar
de4b3352b8 Merge remote branch 'internal/upstream' into HEAD
Conflicts:
	configure

Change-Id: I74063d859de31a62285c8908bcb1821e050b9f3c
2011-01-31 09:11:52 -05:00
Tero Rintaluoma
11a222f5d9 Adds "armvX-none-rvct" targets
Adds following targets to configure script to support RVCT compilation
without operating system support (for Profiler or bare metal images).
 - armv5te-none-rvct
 - armv6-none-rvct
 - armv7-none-rvct

To strip OS specific parts from the code "os_support"-config was added
to script and CONFIG_OS_SUPPORT flag is used in the code to exclude OS
specific parts such as OS specific includes and function calls for
timers and threads etc. This was done to enable RVCT compilation for
profiling purposes or running the image on bare metal target with
Lauterbach.

Removed separate AREA directives for READONLY data in armv6 and neon
assembly files to fix the RVCT compilation. Otherwise
"ldr <reg>, =label" syntax would have been needed to prevent linker
errors. This syntax is not supported by older gnu assemblers.

Change-Id: I14f4c68529e8c27397502fbc3010a54e505ddb43
2011-01-28 12:47:39 +02:00
John Koleszar
f3aa1515f3 Merge remote branch 'internal/upstream-experimental' into HEAD 2011-01-10 08:29:26 -05:00
Paul Wilkins
e0846c9c8c CQ Mode
The merge includes hooks to for CQ mode and other code
changes merged from the test branch.

CQ mode attempts to maintain a more stable quantizer within a clip
whilst also trying to adhere to a guidline maximum bitrate.

The existing target data rate parameter is used to specify the
guideline maximum bitrate.

A new parameter allows the user to specify a target CQ level.

For normal (non kf/gf/arf) frames, the quantizer will not drop BELOW the
user specified value (0-63). However, in some cases the encoder may
choose to impose a target CQ that is above that specified by the user,
if it estimates that consistent use of the target value is not compatible
with guideline maximum bitrate.

Change-Id: I2221f9eecae8cc3c431d36caf83503941b25e4c1
2011-01-07 18:46:29 +00:00
John Koleszar
93536be4b9 Merge remote branch 'internal/upstream' into HEAD 2010-12-24 00:05:10 -05:00
James Berry
74e8446e58 vpxenc stats_close() memleak fix
stats_close() was not freeing memory for
single pass runs.  It now takes in arg_passes
to determine when it should free memory.

Change-Id: I6623b7e30b76f9bf2e16008490f9b20484d03f31
2010-12-23 14:47:56 -05:00
John Koleszar
c99c0e1798 Merge remote branch 'internal/upstream' into HEAD
Conflicts:
	vp8/vp8_cx_iface.c

Change-Id: Id670128595d04d6a61ec811b2ad896b138acded8
2010-12-21 07:56:46 -05:00