summaryrefslogtreecommitdiff
path: root/vp8/encoder/encodeframe.c
AgeCommit message (Collapse)Author
2012-12-05Disable background update on non-base layer framesAdrian Grange
Multi-threaded code was not updated to disable background refresh for non base-layer frames at the time it was disabled in the main C-code. Change-Id: Id6cc376130b7def046942121cfd0526b4f0a71d4
2012-12-03Merge "Moving rd_thresh_mult, rd_threshes to macroblock struct"Scott LaVarnway
2012-12-03Merge "Moving count_mb_ref_frame_usage to macroblock struct"Scott LaVarnway
2012-11-06Incorrect parameter passed into vp8_stuff_mbScott LaVarnway
Should be MACROBLOCK, not MACROBLOCKD Change-Id: I0353bbdf085a181ae2ac1f0b96849b38566e9f6a
2012-11-06Moving count_mb_ref_frame_usage to macroblock structScott LaVarnway
Change-Id: I44e4e3869f231ae270cca98c9565f23c512e3ddf
2012-11-06Moving rd_thresh_mult, rd_threshes to macroblock structScott LaVarnway
Change-Id: I650a593162280ab40e71e527ec6518303e2d5723
2012-11-06Moving _error counts to macroblock structScott LaVarnway
Change-Id: I28ac1519d1594801fef9a623cb64598d3d751eb0
2012-11-06Moving MVcount to macroblock structScott LaVarnway
Change-Id: Ie22841d096f3c86694b95bd06fc3a8ce1f032a10
2012-11-05Moving ymode_count, uv_mode_count to macroblock structScott LaVarnway
Change-Id: Ib73c7b2bee4cb2eb2528fa6b381fffe9503079a0
2012-11-05Moved skip_true_count to macroblock structScott LaVarnway
Change-Id: Ie9a26be7c9baa54a0e43a63ed6c77f2746477a9c
2012-11-05Moving coef_counts to macroblock structScott LaVarnway
Change-Id: I289564a5a27f0d03ddc6f19c7838542ff22719be
2012-11-02Removed unnecessary VP8_COMP *cpi parametersScott LaVarnway
Code cleanup Change-Id: I82f9d787a2f511d39895fd8dfd5347a1676d9dbc
2012-09-13Removed pre_mvcScott LaVarnway
Not used. Change-Id: Ifbd97c9ad537d5184f7e305fa8acf6f027978b6b
2012-08-20Fix inter_zz_count calculation bugYunqing Wang
The current way of counting inter_zz_count doesn't work correctly in multi-threaded encoding. Calculating it after the frame is encoded fixed the problem. Change-Id: Ifcb1972cde950b8cc194f75c6d7b6af09e8b0e65
2012-08-20silent compiling warnings for VC9 buildYaowu Xu
Change-Id: Iaa947e640f27e6f6eaf7d845f243536bca2df513
2012-07-27Optimizes updates of encoder block ptrsAttila Nagy
Precalculated block ptrs do not need updates during encoding. Set these at init stage. Moved the allocation of 'mt_current_mb_col' (last encoded MB on each row) to vp8_alloc_compressor_data(), so that it is correctly reallocated when frame size is changing. Change-Id: Idcdaa2d0cf3a7f782b7d888626b7cf22a4ffb5c1
2012-06-20Fix segmentation updates with vp8_set_roimap()Paul Wilkins
Changes relating to Issue 411 Removed code that was clearing down the segmentation data each frame. Added range/parameter checking in vp8_set_roimap(); Return error if called when cyclic_refresh is enabled. Correct setup_features() so that it sets or clears the segment update flags as appropriate. Change-Id: Ib31ac53006640ddf1ba7b9ec8f8b952e3eff860a
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-04Remove extra enumJohann
VP8_REFFRAME is the same as vpx_ref_frame_type Change-Id: I63c2ddfb39f6ec87d1e5eb6a8852846464552b1b
2012-05-24fix denoiser for temporal patterns and rdJim Bankoski
This extends the denoiser to work for temporally scalable coding. I believe this also fixes a very rare but really bad bug in the original implementation. Change-Id: I8b3593a8c54b86eb76f785af1970935f7d56262a
2012-05-11Merge branch 'origin/eider' into masterJohn Koleszar
Conflicts: vp8/common/entropymode.c vp8/common/entropymode.h vp8/encoder/encodeframe.c vp8/vp8_cx_iface.c Change-Id: I708b0f30449b9502b382e47b745d56f5ed2ce265
2012-05-04Formalize encodeframe.c forward delclarationsJohn Koleszar
Change If4321cc5 fixed a bug caused by forward declarations not being kept in sync across C files, resulting in a function call with the wrong arguments. The commit moves the affected function declarations into a header file, along with the other symbols from encodeframe.c that were being sloppily shared. Change-Id: I76a7b4c66d4fe175f9cbef7e52148655e4bb9ba1
2012-05-04Fix multi-resolution threaded encodingAttila Nagy
mb_row and mb_col was not passed to vp8cx_encode_inter_macroblock in threaded encoding. Change-Id: If4321cc59bf91e991aa31e772f882ed5f2bbb201
2012-05-04Fix multi-resolution threaded encodingAttila Nagy
mb_row and mb_col was not passed to vp8cx_encode_inter_macroblock in threaded encoding. Change-Id: If4321cc59bf91e991aa31e772f882ed5f2bbb201
2012-04-23Removed mcomp_filter_typeScott LaVarnway
and replaced with use_bilinear_mc_filter. Change-Id: Ie9e9f0bccca4ab7d3e23ae045aefed33536103ff
2012-03-13Adds a motion compensated temporal denoiser to the encoder.Stefan Holmer
Some refactoring in rdopt.c and pickinter.c. Change-Id: I4f50020eb3313c37f4d441d708fedcaf219d3038
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-21Merge "Remove redundant init of segment_counts in vp8_encode_frame"Scott LaVarnway
2012-02-17Update encoder mb_skip_coeff and prob_skip_false calculationAttila Nagy
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
2012-02-17Remove redundant init of segment_counts in vp8_encode_frameAttila Nagy
segment_counts was zero init twice in the beginning of vp8_encode_frame. Change-Id: Ibc29f6896dabd9aab1d0993f3941cf6876022e70
2012-02-02Moved ref_frame_cost from MACROBLOCKD to MACROBLOCKScott LaVarnway
Change-Id: I05788522e9cde4322cfb12032483bdbf184bdf0b
2012-02-02Removed frames_till_alt_ref_frame from MACROBLOCKDScott LaVarnway
Change-Id: Ieb05270ac332a4cc38ec4b7b995fc0150e0fffdf
2012-02-02Removed frames_since_golden from MACROBLOCKDScott LaVarnway
Change-Id: I10efa441d663fceb6bc97a3bfad518cd3d9a5128
2012-01-30RTCD: add arnr functionsJohn Koleszar
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
2012-01-30RTCD: add quantizer functionsJohn Koleszar
This commit continues the process of converting to the new RTCD system. Change-Id: Iba9df4c03a508e51c37201c621be43523fae87d9
2012-01-30RTCD: add variance functionsJohn Koleszar
This commit continues the process of converting to the new RTCD system. Change-Id: Ie5c1aa480637e98dc3918fb562ff45c37a66c538
2012-01-30RTCD: add subpixel functionsJohn Koleszar
This commit continues the process of converting to the new RTCD system. Change-Id: I6c519ab61e4f4e0ebcc796f2df061f945c48cefe
2012-01-30RTCD: add recon functionsJohn Koleszar
This commit continues the process of converting to the new RTCD system. Change-Id: I9bfcf9bef65c3d4ba0fb9a3e1532bad1463a10d6
2012-01-30New RTCD implementationJohn Koleszar
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
2012-01-06Reduced the size of Y1Dequant and friends to [128][2]Scott LaVarnway
This patch removes the local copies of the dequantize constants and implements John's idea as described in "Make a local copy of the dequantized data" commit. Change-Id: Ic6b7d681f00bf63263f71ff1e39ab2f80729e8b2
2011-12-28Remove unused MACROBLOCK member vector_rangeJohn Koleszar
Change-Id: Ie2dc0d72363ff38e0f71b59f6e2d1a2d70c5266b
2011-12-16Merge mr_pick_inter_mode and pick_inter_modeYunqing Wang
Merged multi-resolution motion estimation with regular motion estimation function in order to remove duplicated part. This caused slight changes in multi-resulotion encoder quality & performance. Change-Id: Ib4ecc7acfebfe5eea959b5b91febae6db7b95fd1
2011-12-15Moved dequant idct into commonScott LaVarnway
These functions are now used by the encoder. This is WIP with the goal of creating a common idct/add for the encoder and decoder. A boost of 1.8% was seen for the HD rt test clip used. [Tero] Added needed changes to ARM side. Change-Id: Ibbb8000be09034203d7adffc457d3c3f8b06a5bf
2011-12-09vp8e - entropy stats per frame typeJim Bankoski
Change-Id: I4168eb6ea22ae541471738a7a3453e7d52059275
2011-12-05Multiple-resolution encoderYunqing Wang
The example encoder down-samples the input video frames a number of times with a down-sampling factor, and then encodes and outputs bitstreams with different resolutions. Support arbitrary down-sampling factor, and down-sampling factor can be different for each encoding level. For example, the encoder can be tested as follows. 1. Configure with multi-resolution encoding enabled: ../libvpx/configure --target=x86-linux-gcc --disable-codecs --enable-vp8 --enable-runtime_cpu_detect --enable-debug --disable-install-docs --enable-error-concealment --enable-multi-res-encoding 2. Run make 3. Encode: If input video is 1280x720, run: ./vp8_multi_resolution_encoder 1280 720 input.yuv 1.ivf 2.ivf 3.ivf 1 (output: 1.ivf(1280x720); 2.ivf(640x360); 3.ivf(320x180). The last parameter is set to 1/0 to show/not show PSNR.) 4. Decode: ./simple_decoder 1.ivf 1.yuv ./simple_decoder 2.ivf 2.yuv ./simple_decoder 3.ivf 3.yuv 5. View video: mplayer 1.yuv -demuxer rawvideo -rawvideo w=1280:h=720 -loop 0 -fps 30 mplayer 2.yuv -demuxer rawvideo -rawvideo w=640:h=360 -loop 0 -fps 30 mplayer 3.yuv -demuxer rawvideo -rawvideo w=320:h=180 -loop 0 -fps 30 The encoding parameters can be modified in vp8_multi_resolution_encoder.c, for example, target bitrate, frame rate... Modified API. John helped a lot with that. Thanks! Change-Id: I03be9a51167eddf94399f92d269599fb3f3d54f5
2011-11-09Merge "Relocated idct/add calls for encoder"Scott LaVarnway
2011-11-09Relocated idct/add calls for encoderScott LaVarnway
Call the idct/add after the tokenize. This is WIP with the goal of creating a common idct/add for the encoder and decoder. This move is necessary because the decoder's version of the idct clobbers qcoeff, which is used by the tokenize. Change-Id: I6b08d8e8397cd873647fa4fb9469884e3c876756
2011-11-08Fix checks in MB quantizer initializationYunqing Wang
vp8cx_mb_init_quantizer() needs to be called at least once to get all values calculated. This change added one check to decide if we could skip initialization or not. Change-Id: I3f65eb548be57580a61444328336bc18c25c085b
2011-10-11Added rate-targeted temporal scalabilityAdrian Grange
Added the ability to create rate-targeted, temporally scalable, VP8 compatible bitstreams. The application vp8_scalable_patterns.c demonstrates how to use this capability. Users can create output bitstreams containing upto 5 temporally separable streams encoded as a single VP8 bitstream. (previously abandoned as: I92d1483e887adb274d07ce9e567e4d0314881b0a) Change-Id: I156250a3fe930be57c069d508c41b6a7a4ea8d6a
2011-09-22Replace vpx_ports/config.h with vpx_config.hAttila Nagy
Just a clean-up. Change-Id: Iea5b6dc925dcfa7db548bc1ab1a13d26ed5a2c9a