Граф коммитов

113 Коммитов

Автор SHA1 Сообщение Дата
KO Myung-Hun dd8d0134e0 Disable USE_POSIX_MAP on OS/2
Change-Id: Ib88ab619fa4e1593e85ca325555f2c4648ac9bc7
2013-02-03 21:50:58 +09:00
John Koleszar 16810c10c1 Merge branch 'vp9-preview' of review:webm/libvpx
Merge the vp9-preview branch into master.

Change-Id: If700b9054676f24bed9deb59050af546c1ca5296
2012-12-27 09:37:19 -08:00
John Koleszar 5ebe94f9f1 Build fixes to merge vp9-preview into master
Various fixups to resolve issues when building vp9-preview under the more stringent
checks placed on the experimental branch.

Change-Id: I21749de83552e1e75c799003f849e6a0f1a35b07
2012-12-26 11:21:09 -08:00
Deb Mukherjee 0742b1e4ae Fixing 8x8/4x4 ADST for intra modes with tx select
This patch allows use of 8x8 and 4x4 ADST correctly for Intra
16x16 modes and Intra 8x8 modes when the block size selected
is smaller than the prediction mode. Also includes some cleanups
and refactoring.

Rebase.

Change-Id: Ie3257bdf07bdb9c6e9476915e3a80183c8fa005a
2012-11-28 16:21:12 -08:00
James Zern 6475224e4f vpxenc: don't print STATS_PKT size w/--quiet
missed in 1fc3cc8

Change-Id: I80ffc1179245bc124e9938aad92a4d5fdfee187b
2012-11-17 16:36:02 -08:00
John Koleszar 08b43fef3a webm: add support for V_VP9
Tags VP9 tracks with the V_VP9 video type when writing to .webm files,
and supports decoding both from vpxdec without specifying --codec.

Change-Id: I0ef61dee06f4db2a74032b142a4b4976c51faf6e
2012-11-15 15:07:27 -08:00
John Koleszar a9c7597adc support building vp8 and vp9 into a single lib
Change-Id: Ib8f8a66c9fd31e508cdc9caa662192f38433aa3d
2012-11-15 10:46:17 -08:00
Ronald S. Bultje 195172cf87 Fix frame number on which the mismatch is reported in vpxenc.
Change-Id: I962be949845f881df551d101708e6ba9d8a3d6a2
2012-11-10 16:22:49 -08:00
Ronald S. Bultje 88d703cd4d Fix another crash in vpxenc with --pass=1 and --test-decode.
Change-Id: Id23917ce2555519d2e9172dd6ce3a283f2235d26
2012-11-09 09:07:50 -08:00
Yaowu Xu 606c6479c5 fix a crash in 2-pass encoding with test-decode on
only call decoding when encoder produce compressed data

Change-Id: I1840762246afaaad76db6c6d29032ad15aa38afd
2012-11-08 16:22:54 -08:00
John Koleszar 7b8dfcb5a2 Rough merge of master into experimental
Creates a merge between the master and experimental branches. Fixes a
number of conflicts in the build system to allow *either* VP8 or VP9
to be built. Specifically either:

  $ configure --disable-vp9 $ configure --disable-vp8
  --disable-unit-tests

VP9 still exports its symbols and files as VP8, so that will be
resolved in the next commit.

Unit tests are broken in VP9, but this isn't a new issue. They are
fixed upstream on origin/experimental as of this writing, but rebasing
this merge proved difficult, so will tackle that in a second merge
commit.

Change-Id: I2b7d852c18efd58d1ebc621b8041fe0260442c21
2012-11-07 11:30:16 -08:00
John Koleszar 6ad3b74a58 vpxenc: merge with master
Change-Id: Ic3e3559384a0e72abdc9b66a19865474c2a41b38
2012-11-06 12:04:53 -08:00
John Koleszar 83b1d907da vpx: merge with master
Change-Id: I44b3ad780cef6f448fa17ff8e28fea87ef9cd518
2012-11-06 12:04:53 -08:00
Ronald S. Bultje 4b2c2b9aa4 Rename vp8/ codec directory to vp9/.
Change-Id: Ic084c475844b24092a433ab88138cf58af3abbe4
2012-11-01 16:31:22 -07:00
James Zern 1fc3cc8e97 vpxenc: add -quiet option
suppresses encoder progress

Change-Id: Iacc04d98de970f13697c002363ee3a40a03f021b
2012-10-26 10:45:30 -07:00
Ronald S. Bultje 3121497041 Add encoder/decoder mismatch information to internal stats file.
Change-Id: Ibb6ba26e8718d3af27553ca59443a8c6aec7749d
2012-10-11 10:13:48 -07:00
Yaowu Xu d71ba03822 silent compiling warnings for VC9 build
Change-Id: Iaa947e640f27e6f6eaf7d845f243536bca2df513
2012-08-20 11:45:01 -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
John Koleszar 6291dd4c2f Fix compilation with -werror
Fix a last few warnings with multithread, arm, 32 bit

Change-Id: Ic7c67616c370d0ff87562a232fb1e5df0702dc86
2012-06-20 09:43:42 -07:00
John Koleszar 0164a1cc5b Fix pedantic compiler warnings
Allows building the library with the gcc -pedantic option, for improved
portabilty. In particular, this commit removes usage of C99/C++ style
single-line comments and dynamic struct initializers. This is a
continuation of the work done in commit 97b766a46, which removed most
of these warnings for decode only builds.

Change-Id: Id453d9c1d9f44cc0381b10c3869fabb0184d5966
2012-06-11 15:14:58 -07:00
Johann c8a88a7642 Explicitly discard fwrite/fread return values
Using if(); triggers an empty body warning with clang

Change-Id: I0fa2ee676400a974b40f8eaafca9ae668107eebb
2012-06-04 15:50:44 -07:00
James Zern 1e1799c9cb examples: use alignment > 1 w/vpx_img_alloc
aligned buffers improve performace. this change brings vpxenc &
vp8_scalable_patterns in line with the other examples.

Change-Id: I4cf9f3e4728b901161905dd7ccb092e774ffb15f
2012-05-18 19:22:26 -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 faed00d844 Reset output frames counter for second pass
The frame counter was not being reset at the start of
the first pass.

Change-Id: I2ef7c6edf027e43f83f470c52cbcf95bf152e430
2012-04-27 15:14:50 -07:00
Ralph Giles 061a16d96e Have vpxenc use a default kf_max_rate of 5 seconds.
Rather than using the static default maximum keyframe spacing
provided by vpx_codec_enc_config_default() set the default
value to 5 times the frame rate. Five seconds is too long for
live streaming applications, but is a compromise between seek
efficiency and giving the encoder freedom to choose keyframe
locations.

The five second value is from James Zern's suggestion in
http://article.gmane.org/gmane.comp.multimedia.webm.user/2945

Change-Id: Ib7274dc248589c433c06e68ca07232e97f7ce17f
2012-04-25 17:11:05 -07:00
John Koleszar 1b27e93cd1 vpxenc: validate rational arguments
Trap negative values and zero denominators at the point where they're
parsed.

Change-Id: I1ec9da5d4e95d3ef539860883041330ecec2f345
2012-04-25 17:11:05 -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
James Berry 85ef83a173 bug fix: fix mem leak error in vpxenc
fixes memory leak bug in vpxenc.

Change-Id: I3933026d16177947576c61ebf58f8c58147e4ba0
2012-03-26 12:55:00 -04: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
Johann 87c40b35eb 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
2012-03-01 16:12:53 -08:00
Scott LaVarnway c34d91a84e Merge "Packing bitstream on-the-fly with delayed context updates" 2012-03-01 06:20:02 -08:00
Yunqing Wang aabae97e57 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
2012-02-29 15:44:56 -05:00
Attila Nagy 52cf4dcaea 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
2012-02-29 12:13:37 -05:00
John Koleszar 9e50ed7f27 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
2012-02-16 12:30:01 -08:00
John Koleszar 732cb9a643 vpxenc: factor out input open/close
Simplify some of the file I/O for later commits which will add multistream
support

Change-Id: Idf1a05f3a29c95331d0c4a6ea5960904e4897fd4
2012-02-16 12:30:00 -08:00
John Koleszar c535025c12 vpxenc: add warning()/fatal() helpers
Cosmetic. Allows exiting with an error message without opening a new
scope.

Change-Id: If227b29b825f0241acea79dd38f19e524552ee18
2012-02-16 12:26:58 -08:00
John Koleszar efd54f8f41 vpxenc: factor out global config options
This is a first step towards specifying multiple output streams
with one command line.

Change-Id: Iac784d3911bf553694d024bbd0c3d547261e914b
2012-02-15 16:11:35 -08:00
Fritz Koenig c1c5932260 Remove duplicate line in parameter parsing.
resize_down_thresh was parsed and set twice.

Change-Id: I2685a6c3c825371f79ae94d305bcb50185a12dac
2012-01-17 17:11:32 -08:00
James Zern b651875e24 squash some signed/unsigned comparison warnings
Change-Id: Ifc64cf990ae04d77934da3324d0afb3993f061e7
2011-12-21 13:49:19 -08:00
James Berry 16e101ba54 bugfix: all vpxenc arguments were not parsed under all conditions
dynamicly assign ARG_CTRL_CNT_MAX and
add check to make sure argument instance
doesnt already exist before creating a duplicate

Change-Id: I4f78a9c5346cda8e812cd89c077afe8996493508
2011-11-28 15:58:50 -05:00
James Zern 87953d115f vpxenc: use off64_t for mingw
fixes fseek errors on large files resulting in corrupt/truncated output
(issue #364).

Change-Id: If0e189a1591d0e95d7d237332e0bea1cf2ec5aa1
2011-11-09 15:38:55 -08:00
James Zern e88f9e63ee vpxenc: fix crash w/empty input file
Fixes issue #362.

Change-Id: Iba6d7e49ed610b44c8a4c0f3d6330a93feb0373d
2011-11-01 13:44:00 -07:00
James Zern efa17efced vpxenc: fix rollover in status output
sizeof(unsigned long)=4 in 32-bit builds

Change-Id: I81c9d698c80ffaa332214e5b43e98b4e30cf9e88
2011-10-18 17:34:10 -07:00
John Koleszar fa3e530bca vpxenc: get version string programatically
To avoid a dependency on vpx_version.h, call the vpx_codec_version_str()
function and build up the string manually.

Change-Id: Ie650e9b8f2aaaffaa31da5e9ef3b566b972321b4
2011-09-22 13:25:34 -04:00