summaryrefslogtreecommitdiff
path: root/vpxenc.c
AgeCommit message (Collapse)Author
2013-10-16Prevent first pass from outputing invalid infoYaowu Xu
First pass does not produce compressed data, therefore encode/decode match check is not initialized. Change-Id: I1971a6747337872a850987cc70ba267bd0f1d564
2013-10-07Moving libmkv library to third_party folder.Dmitry Kovalev
Change-Id: Id0bfaedf54ff3f59d4cf361c170a0b5a5711e5f2
2013-09-24vpxenc: Stop writing the WebM FrameRate element.Tom Finegan
The FrameRate element has been deprecated. Change-Id: I68ac496e7b33685a100a45d2772e0ff30eb6a811
2013-09-19Merge "fix vp8-only build"Yaowu Xu
2013-09-19fix integer overflow errorsYaowu Xu
Change-Id: I76f440a917832c02d7a727697b225bac66b99f56
2013-09-17fix vp8-only buildJames Zern
Change-Id: Id9ce44f3364dd57b30ea491d956a2a0d6186be05
2013-09-06Support a constant quality mode in VP9Deb Mukherjee
Adds a new end-usage option for constant quality encoding in vpx. This first version implemented for VP9, encodes all regular inter frames using the quality specified in the --cq-level= option, while encoding all key frames and golden/altref frames at a quality better than that. The current performance on derfraw300 is +0.910% up from bitrate control, but achieved without multiple recode loops per frame. The decision for qp for each altref/golden/key frame will be improved in subsequent patches based on better use of stats from the first pass. Further, the qp for regular inter frames may also be varied around the provided cq-level. Change-Id: I6c4a2a68563679d60e0616ebcb11698578615fb3
2013-08-21Make "good" quality 2-pass vpxenc encoding defaultDeb Mukherjee
Currently, the best quality mode in VP9 is not very well developed, and unnecessarily makes the encode too slow. Hence the command line default is changed to "good" quality. Also, the number of passes default is changed to 2 passes as well, since 1-pass encoding is not very efficient in VP9. Besides, a number of VP9 defaults are set to the currently recommended settings. With these changes, vpxenc run with --codec=vp9 --kf-max-dist=9999 --cpu-used=0 should work about the same as our borg results. Note when the --cpu-used=0 option is dropped there will be a slight difference in the output, because of a difference in the cpu-used value for the first pass. Specifically, the default when unspecified is to use cpu_used=1 for the first pass and cpu_used=0 for the second pass. But when specified, both passes will use the cpu-used value specified. Note that this also changes the default for VP8 as being "good" but other options stay unchanged. Change-Id: Ib23c1a05ae2f36ee076c0e34403efbda518c5066
2013-08-14vpxenc: open output file after setting pass #James Zern
write_ivf_file_header would incorrectly skip writing the file header in the 2nd pass, causing the initial frame header to be overwritten on close potential causing an overly large frame header to be read and a crash. most likely broken since: 9e50ed7 vpxenc: initial implementation of multistream support fixes issue #585 Change-Id: I7e863e295dd6344c33b3e9c07f9f0394ec496e7b
2013-06-25vpxenc: send usage to stderrJohn Koleszar
Thanks to hiiragikei AT gmail.com for the fix. Change-Id: Iab6c0822593fc5557d86efbb014ff6409ff05b35
2013-06-17Removed hardcoded global->limitScott LaVarnway
Looks like test code. Change-Id: I5deae2bf14ea6fdcbb9b9d993966c9abef95eb2e
2013-06-13Add vp9 test vectors unit testJohn Koleszar
These files can stand in until we get proper syntax vectors. They should provide some additional assurance against inadvertant bitstream changes. Change-Id: I12f6c9a5f054e30df40a7ff1f33145abf7e1d59d
2013-06-11Fix mismatch check outputJohn Koleszar
Fixes a condition where the address of the mismatching pixels was not being found/printed. Change-Id: Ifac5cd3471bc2437448128591eea7c7b87e2d8fe
2013-05-09vpxenc: fix mismatch check for non-4:2:0John Koleszar
Change-Id: Iffe7c2e6c6cb14b637420ffc368a5003f5db42fa
2013-05-06Y4M input support for 4:2:2, 4:4:4, 4:4:4:4John Koleszar
Adds a new experiment CONFIG_NON420 that allows other chroma subsamplings to be passed to the codec. This commit allows the data to be passed from a y4m input file through vpxenc to the codec, where they're currently rejected. Later commits will finish support for this inside the codec. Change-Id: Ib3aac604d8cad9e24cef395fa1067f16ba7e8e43
2013-04-08Clamp inferred motion vectors onlyJingning Han
Clamp only the motion vectors inferred from neighboring reference macroblocks. The motion vectors obtained through motion search in NEWMV mode are constrained during the search process, which allows a relatively larger referencing region than the inferred mvs. Hence further clamping the best mv provided by the motion search may affect the efficacy of NEWMV mode. Synchronized the decoding process. The decoded mvs in NEWMV modes should be guaranteed to fit in the effective range. Put a mv range clamping function there for security purpose. This improves the coding performance of high motion sequences, e.g., derf set: foreman 0.233% husky 0.175% icd 0.135% mother_daughter 0.337% pamphlet 0.561% stdhd set: blue_sky 0.408% city 0.455% also saw sunflower goes down by -0.469%. Change-Id: I3fcbba669e56dab779857a8126a91b926e899cb5
2013-03-27Convert g_frame_parallel_decoding to control interfaceJohn Koleszar
Restore ABI compatibility with the master branch. Change-Id: Ic57e7e1de09ab33bd37990e52a63ba7c8f1432a4
2013-03-27Merge branch 'master' into experimentalJohn Koleszar
Pick up VP8 encryption, quantization changes, and some fixes to vpxenc Conflicts: test/decode_test_driver.cc test/decode_test_driver.h test/encode_test_driver.cc vp8/vp8cx.mk vpxdec.c vpxenc.c Change-Id: I9fbcc64808ead47e22f1f22501965cc7f0c4791c
2013-03-26Implicit weighted prediction experimentDeb Mukherjee
Adds an experiment to use a weighted prediction of two INTER predictors, where the weight is one of (1/4, 3/4), (3/8, 5/8), (1/2, 1/2), (5/8, 3/8) or (3/4, 1/4), and is chosen implicitly based on consistency of the predictors to the already reconstructed pixels to the top and left of the current macroblock or superblock. Currently the weighting is not applied to SPLITMV modes, which default to the usual (1/2, 1/2) weighting. However the code is in place controlled by a macro. The same weighting is used for Y and UV components, where the weight is derived from analyzing the Y component only. Results (over compound inter-intra experiment) derf: +0.18% yt: +0.34% hd: +0.49% stdhd: +0.23% The experiment suggests bigger benefit for explicitly signaled weights. Change-Id: I5438539ff4485c5752874cd1eb078ff14bf5235a
2013-03-22Fixing fourcc for VP8 and VP9.Dmitry Kovalev
Changing 0x00 ('') fourcc byte to 0x30 ('0'). For VP8 from 0x00385056 to 0x30385056, for VP9 from 0x00395056 to 0x30395056. Change-Id: I26b1b603c20dd41f7aeabf8cd7893dfd5b1c8b59
2013-03-13Add VP9_GET_REFERENCE controlJohn Koleszar
This is like VP8_COPY_REFERENCE, but returns a pointer to the reference frame rather than a copy of it. This is useful when the application doesn't know what the size of the reference is, as is the case when scaling is in effect. Change-Id: I63667109f65510364d0e397ebe56217140772085
2013-03-11vpxenc: improve progress indicators with --skipJohn Koleszar
Account for skipped input frames when calculating frame rates, ETA. Fixes https://code.google.com/p/webm/issues/detail?id=556 Change-Id: I9c8b51e02e9ff0ab2cf6f16fc9382fc7f6c77b80
2013-03-04vpxenc: actually report mismatch on stderr.Ronald S. Bultje
Because ctx->err is not set in that case, it will not report the error on stderr. Change-Id: Ifacbf5a03e676fd56522b03c0281d6c723c563ee
2013-03-04Fix rollover and pass 1 time estimateJohn Koleszar
Fixes a rollover of the cx_time variable for encodes that take over ~4200 seconds. Also enable the time estimate in first pass. Change-Id: Ib5a98ee71bccd79a804d709cec7260651d0b7141
2013-03-04vpxenc: support scaling prior to encodingJohn Koleszar
Scales the input of the encoder using libyuv's "box filter". Each stream may have a different width and height specified. If the width (or height) parameter is missing (or is explicitly set to 0) then the value will be calculated based on the specified height (or width) and the input file's dimensions, preserving its aspect ratio. Leaving the height unspecified behaves similarly. Change-Id: I700ef89ce54fb87588420a71c39c0e3e73b1a40e
2013-03-04Don't exit on decode errors in vpxenc.Ronald S. Bultje
Allows the user to specify whether decode errors should be fatal or not. Also makes mismatches optionally fatal. Change-Id: I58cff4a82f3d42f5653b91cf348a7f669377e632
2013-03-04Add estimated completion time to vpxencJohn Koleszar
Make the progress line more useful by providing per-frame updates of processing frame rate and estimated time remaining. Fixes issue #534. Change-Id: Ic91551878ff4b2f5db1cedaafb588add220cfa52
2013-03-01Merge master branch into experimentalJohn Koleszar
Picks up some build system changes, compiler warning fixes, etc. Change-Id: I2712f99e653502818a101a72696ad54018152d4e
2013-02-27Merge "Fix rollover and pass 1 time estimate" into experimentalJohn Koleszar
2013-02-27Fix rollover and pass 1 time estimateJohn Koleszar
Fixes a rollover of the cx_time variable for encodes that take over ~4200 seconds. Also enable the time estimate in first pass. Change-Id: Ib5a98ee71bccd79a804d709cec7260651d0b7141
2013-02-27vpxenc: support scaling prior to encodingJohn Koleszar
Scales the input of the encoder using libyuv's "box filter". Each stream may have a different width and height specified. If the width (or height) parameter is missing (or is explicitly set to 0) then the value will be calculated based on the specified height (or width) and the input file's dimensions, preserving its aspect ratio. Leaving the height unspecified behaves similarly. Change-Id: Ic7026810b13be030826be80dc6f7fc4aaf0c35d0
2013-02-21Forward butterfly hybrid transformJingning Han
This patch includes 4x4, 8x8, and 16x16 forward butterfly ADST/DCT hybrid transform. The kernel of 4x4 ADST is sin((2k+1)*(n+1)/(2N+1)). The kernel of 8x8/16x16 ADST is of the form sin((2k+1)*(2n+1)/4N). Change-Id: I8f1ab3843ce32eb287ab766f92e0611e1c5cb4c1
2013-02-21Don't exit on decode errors in vpxenc.Ronald S. Bultje
Allows the user to specify whether decode errors should be fatal or not. Also makes mismatches optionally fatal. Change-Id: I58cff4a82f3d42f5653b91cf348a7f669377e632
2013-02-20Merge lossless experimentYaowu Xu
Change-Id: I7b7b8d4fda3a23699e0c920d727f8c15d37d43aa
2013-02-19Merge "Add estimated completion time to vpxenc" into experimentalJohn Koleszar
2013-02-13Add support for tile rows.Ronald S. Bultje
These allow sending partial bitstream packets over the network before encoding a complete frame is completed, thus lowering end-to-end latency. The tile-rows are not independent. Change-Id: I99986595cbcbff9153e2a14f49b4aa7dee4768e2
2013-02-12Add estimated completion time to vpxencJohn Koleszar
Make the progress line more useful by providing per-frame updates of processing frame rate and estimated time remaining. Fixes issue #534. Change-Id: Ic91551878ff4b2f5db1cedaafb588add220cfa52
2013-02-07Butterfly ADST based hybrid transformJingning Han
Refactor the 8x8 inverse hybrid transform. It is now consistent with the new inverse DCT. Overall performance loss (due to the use of this variant ADST, and the rounding errors in the butterfly implementation) for std-hd is -0.02. Fixed BUILD warning. Devise a variant of the original ADST, which allows butterfly computation structure. This new transform has kernel of the form: sin((2k+1)*(2n+1) / (4N)). One of its butterfly structures using floating-point multiplications was reported in Z. Wang, "Fast algorithms for the discrete W transform and for the discrete Fourier transform", IEEE Trans. on ASSP, 1984. This patch includes the butterfly implementation of the inverse ADST/DCT hybrid transform of dimension 8x8. Change-Id: I3533cb715f749343a80b9087ce34b3e776d1581d
2013-02-05[WIP] Add column-based tiling.Ronald S. Bultje
This patch adds column-based tiling. The idea is to make each tile independently decodable (after reading the common frame header) and also independendly encodable (minus within-frame cost adjustments in the RD loop) to speed-up hardware & software en/decoders if they used multi-threading. Column-based tiling has the added advantage (over other tiling methods) that it minimizes realtime use-case latency, since all threads can start encoding data as soon as the first SB-row worth of data is available to the encoder. There is some test code that does random tile ordering in the decoder, to confirm that each tile is indeed independently decodable from other tiles in the same frame. At tile edges, all contexts assume default values (i.e. 0, 0 motion vector, no coefficients, DC intra4x4 mode), and motion vector search and ordering do not cross tiles in the same frame. t log Tile independence is not maintained between frames ATM, i.e. tile 0 of frame 1 is free to use motion vectors that point into any tile of frame 0. We support 1 (i.e. no tiling), 2 or 4 column-tiles. The loopfilter crosses tile boundaries. I discussed this briefly with Aki and he says that's OK. An in-loop loopfilter would need to do some sync between tile threads, but that shouldn't be a big issue. Resuls: with tiling disabled, we go up slightly because of improved edge use in the intra4x4 prediction. With 2 tiles, we lose about ~1% on derf, ~0.35% on HD and ~0.55% on STD/HD. With 4 tiles, we lose another ~1.5% on derf ~0.77% on HD and ~0.85% on STD/HD. Most of this loss is concentrated in the low-bitrate end of clips, and most of it is because of the loss of edges at tile boundaries and the resulting loss of intra predictors. TODO: - more tiles (perhaps allow row-based tiling also, and max. 8 tiles)? - maybe optionally (for EC purposes), motion vectors themselves should not cross tile edges, or we should emulate such borders as if they were off-frame, to limit error propagation to within one tile only. This doesn't have to be the default behaviour but could be an optional bitstream flag. Change-Id: I5951c3a0742a767b20bc9fb5af685d9892c2c96f
2013-02-03Disable USE_POSIX_MAP on OS/2KO Myung-Hun
Change-Id: Ib88ab619fa4e1593e85ca325555f2c4648ac9bc7
2013-01-25Adding a frame parallel decoding modeDeb Mukherjee
Adds a flag to disable features that would inhibit frame parallel decoding. This includes backward adaptation and MV sorting based on search in ref frame buffer. Also includes some minor clean-ups. Change-Id: I434846717a47b7bcb244b37ea670c5cdf776f14d
2013-01-24MSVS compiler errorPaul Wilkins
Visual Studio reports and error on the line static const int bsize2 = bsize >> 1; "error C2099: initializer is not a constant" Also warnings on signed/unsigned mismatch Change-Id: I76cb06f736bd9c90107a26bfb3c130ec3f6c33de
2013-01-23Adds an error-resilient mode with testDeb Mukherjee
Adds an error-resilient mode where frames can be continued to be decoded even when there are errors (due to network losses) on a prior frame. Specifically, backward updates are turned off and probabilities of various symbols are reset to defaults at the beginning of each frame. Further, the last frame's mvs are not used for the mv reference list, and the sorting of the initial list based on search on previous frames is turned off as well. Also adds a test where an arbitrary set of frames are skipped from decoding to simulate errors. The test verifies (1) that if the error frames are droppable - i.e. frame buffer updates have been turned off - there are no mismatch errors for the remaining frames after the error frames; and (2) if the error-frames are non droppable, there are not only no decoding errors but the mismatch PSNR between the decoder's version of the post-error frames and the encoder's version is at least 20 dB. Change-Id: Ie6e2bcd436b1e8643270356d3a930e8989ff52a5
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