summaryrefslogtreecommitdiff
path: root/vpxenc.c
AgeCommit message (Collapse)Author
2012-12-27Merge branch 'vp9-preview' of review:webm/libvpxJohn Koleszar
Merge the vp9-preview branch into master. Change-Id: If700b9054676f24bed9deb59050af546c1ca5296
2012-12-26Build fixes to merge vp9-preview into masterJohn Koleszar
Various fixups to resolve issues when building vp9-preview under the more stringent checks placed on the experimental branch. Change-Id: I21749de83552e1e75c799003f849e6a0f1a35b07
2012-11-28Fixing 8x8/4x4 ADST for intra modes with tx selectDeb Mukherjee
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-17vpxenc: don't print STATS_PKT size w/--quietJames Zern
missed in 1fc3cc8 Change-Id: I80ffc1179245bc124e9938aad92a4d5fdfee187b
2012-11-15webm: add support for V_VP9John Koleszar
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-15support building vp8 and vp9 into a single libJohn Koleszar
Change-Id: Ib8f8a66c9fd31e508cdc9caa662192f38433aa3d
2012-11-10Fix frame number on which the mismatch is reported in vpxenc.Ronald S. Bultje
Change-Id: I962be949845f881df551d101708e6ba9d8a3d6a2
2012-11-09Fix another crash in vpxenc with --pass=1 and --test-decode.Ronald S. Bultje
Change-Id: Id23917ce2555519d2e9172dd6ce3a283f2235d26
2012-11-08fix a crash in 2-pass encoding with test-decode onYaowu Xu
only call decoding when encoder produce compressed data Change-Id: I1840762246afaaad76db6c6d29032ad15aa38afd
2012-11-07Rough merge of master into experimentalJohn Koleszar
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-06vpxenc: merge with masterJohn Koleszar
Change-Id: Ic3e3559384a0e72abdc9b66a19865474c2a41b38
2012-11-06vpx: merge with masterJohn Koleszar
Change-Id: I44b3ad780cef6f448fa17ff8e28fea87ef9cd518
2012-11-01Rename vp8/ codec directory to vp9/.Ronald S. Bultje
Change-Id: Ic084c475844b24092a433ab88138cf58af3abbe4
2012-10-26vpxenc: add -quiet optionJames Zern
suppresses encoder progress Change-Id: Iacc04d98de970f13697c002363ee3a40a03f021b
2012-10-11Add encoder/decoder mismatch information to internal stats file.Ronald S. Bultje
Change-Id: Ibb6ba26e8718d3af27553ca59443a8c6aec7749d
2012-08-20silent compiling warnings for VC9 buildYaowu Xu
Change-Id: Iaa947e640f27e6f6eaf7d845f243536bca2df513
2012-08-14Fix warnings.Christian Duvivier
Change-Id: I4b911e4173da30c164bde7ea50bc80a70fbbb745
2012-07-24Added const specifier to remove warningAdrian Grange
The "codecs" array is defined as const so too should the local variable that points too it. Change-Id: I536a9ced52257dc44a04fc1a3cad94c1e86f69aa
2012-07-23Dll build of libvpxJim Bankoski
Change-Id: I74e50b4dfbe73eb98e1dce1695a9973f637220c0
2012-07-17Restyle codeJohn Koleszar
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-06-28Add lossless compression mode.Hui Su
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-20Fix compilation with -werrorJohn Koleszar
Fix a last few warnings with multithread, arm, 32 bit Change-Id: Ic7c67616c370d0ff87562a232fb1e5df0702dc86
2012-06-11Fix pedantic compiler warningsJohn Koleszar
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-04Explicitly discard fwrite/fread return valuesJohann
Using if(); triggers an empty body warning with clang Change-Id: I0fa2ee676400a974b40f8eaafca9ae668107eebb
2012-05-18examples: use alignment > 1 w/vpx_img_allocJames Zern
aligned buffers improve performace. this change brings vpxenc & vp8_scalable_patterns in line with the other examples. Change-Id: I4cf9f3e4728b901161905dd7ccb092e774ffb15f
2012-05-01Added usage info on command line optionsYaowu Xu
This commit added usage information that was missed in usage output. Change-Id: If1a85bcc20131314f5d047c6db4e76a40d945e66
2012-04-27Reset output frames counter for second passAdrian Grange
The frame counter was not being reset at the start of the first pass. Change-Id: I2ef7c6edf027e43f83f470c52cbcf95bf152e430
2012-04-25Have vpxenc use a default kf_max_rate of 5 seconds.Ralph Giles
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-25vpxenc: validate rational argumentsJohn Koleszar
Trap negative values and zero denominators at the point where they're parsed. Change-Id: I1ec9da5d4e95d3ef539860883041330ecec2f345
2012-04-11Superblock encoding orderAdrian Grange
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-03-26bug fix: fix mem leak error in vpxencJames Berry
fixes memory leak bug in vpxenc. Change-Id: I3933026d16177947576c61ebf58f8c58147e4ba0
2012-03-14Added encode/decode recon buffer match test to vpxencYaowu Xu
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-14Added option to skip first n frame to vpxencYaowu Xu
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-07Changed MAX_PSNR to be consistent with internal statsYaowu Xu
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-01Fix encoder debug settingJohann
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-01Merge "Packing bitstream on-the-fly with delayed context updates"Scott LaVarnway
2012-02-29vpxenc: fix time and fps calculation in 2-pass encodingYunqing Wang
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-29Packing bitstream on-the-fly with delayed context updatesAttila Nagy
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-16vpxenc: initial implementation of multistream supportJohn Koleszar
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-16vpxenc: factor out input open/closeJohn Koleszar
Simplify some of the file I/O for later commits which will add multistream support Change-Id: Idf1a05f3a29c95331d0c4a6ea5960904e4897fd4
2012-02-16vpxenc: add warning()/fatal() helpersJohn Koleszar
Cosmetic. Allows exiting with an error message without opening a new scope. Change-Id: If227b29b825f0241acea79dd38f19e524552ee18
2012-02-15vpxenc: factor out global config optionsJohn Koleszar
This is a first step towards specifying multiple output streams with one command line. Change-Id: Iac784d3911bf553694d024bbd0c3d547261e914b
2012-01-17Remove duplicate line in parameter parsing.Fritz Koenig
resize_down_thresh was parsed and set twice. Change-Id: I2685a6c3c825371f79ae94d305bcb50185a12dac
2011-12-21squash some signed/unsigned comparison warningsJames Zern
Change-Id: Ifc64cf990ae04d77934da3324d0afb3993f061e7
2011-11-28bugfix: all vpxenc arguments were not parsed under all conditionsJames Berry
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-09vpxenc: use off64_t for mingwJames Zern
fixes fseek errors on large files resulting in corrupt/truncated output (issue #364). Change-Id: If0e189a1591d0e95d7d237332e0bea1cf2ec5aa1
2011-11-01vpxenc: fix crash w/empty input fileJames Zern
Fixes issue #362. Change-Id: Iba6d7e49ed610b44c8a4c0f3d6330a93feb0373d
2011-10-18vpxenc: fix rollover in status outputJames Zern
sizeof(unsigned long)=4 in 32-bit builds Change-Id: I81c9d698c80ffaa332214e5b43e98b4e30cf9e88
2011-09-22vpxenc: get version string programaticallyJohn Koleszar
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-08-11Merge remote branch 'internal/upstream-experimental' into HEADJohn Koleszar
Conflicts: vp8/decoder/detokenize.c vp8/decoder/onyxd_if.c vp8/vp8_common.mk Change-Id: Ifca1108186a8bc715da86a44021ee2fa5550b5b8