summaryrefslogtreecommitdiff
path: root/vp8/vp8_cx_iface.c
AgeCommit message (Collapse)Author
2011-11-11avoid resetting framerate during vpx_codec_enc_config_set()John Koleszar
The calculated frame_rate is a state variable in the codec, and shouldn't be maintained in the configuration struct. Move it to the main part of cpi so that it isn't clobbered when the configuration struct is updated. The initial framerate estimate is moved from the vp8_cx_iface.c wrapper into the body of init_config() in onyx_if.c, so that it is only called once and not reset on every call to vp8_change_config(). Change-Id: I8d9a3d1283330d1ee297d07e9d78d1f2875f2465
2011-10-24Fix: Increase default cx_data_sizeJames Berry
Prior size could be too small in some instances resulting in an error. Change-Id: Ic601e49cbae92c98a0e7fb51ba8c186b352ffba6
2011-10-20Fix: check cx_data buffer prior to writeJames Berry
check to make sure that cx_data buffer has enough room before writting to it, prior behavior did not which could result in a crash. Change-Id: I3fab6f2bc4a96d7c675ea81acd39ece121738b28
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-07-28Convert rc_max_intra_bitrate_pct to controlJohn Koleszar
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-26cosmetics: consistently use [u]int64_tJames Zern
Removes mixed usage of (unsigned) long long and INT64. Fixes Issue #208. Change-Id: I220d3ed5ce4bb1280cd38bb3715f208ce23cf83a
2011-07-20encoder: don't set the fragment bit for the last partitionAttila Nagy
Change-Id: Icb4e4f0d7c3074a8507852178be87541a1cb5bac
2011-07-07Set VPX_FRAME_IS_DROPPABLEJohn Koleszar
Allow the encoder to inform the application that the encoded frame will not be used as a reference. Change-Id: I90e41962325ef73d44da03327deb340d6f7f4860
2011-06-28New ways of passing encoded data between encoder and decoder.Stefan Holmer
With this commit frames can be received partition-by-partition from the encoder and passed partition-by-partition to the decoder. At the encoder-side this makes it easier to split encoded frames at partition boundaries, useful when packetizing frames. When VPX_CODEC_USE_OUTPUT_PARTITION is enabled, several VPX_CODEC_CX_FRAME_PKT packets will be returned from vpx_codec_get_cx_data(), containing one partition each. The partition_id (starting at 0) specifies the decoding order of the partitions. All partitions but the last has the VPX_FRAME_IS_FRAGMENT flag set. At the decoder this opens up the possibility of decoding partition N even though partition N-1 was lost (given that independent partitioning has been enabled in the encoder) if more info about the missing parts of the stream is available through external signaling. Each partition is passed to the decoder through the vpx_codec_decode() function, with the data pointer pointing to the start of the partition, and with data_sz equal to the size of the partition. Missing partitions can be signaled to the decoder by setting data != NULL and data_sz = 0. When all partitions have been given to the decoder "end of data" should be signaled by calling vpx_codec_decode() with data = NULL and data_sz = 0. The first partition is the first partition according to the VP8 bitstream + the uncompressed data chunk + DCT address offsets if multiple residual partitions are used. Change-Id: I5bc0682b9e4112e0db77904755c694c3c7ac6e74
2011-04-25Merge "Change rc undershoot/overshoot semantics"John Koleszar
2011-04-25Add rc_max_intra_bitrate_pct controlJohn Koleszar
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-12Change rc undershoot/overshoot semanticsJohn Koleszar
This patch changes the rc_undershoot_pct and rc_overshoot_pct controls to set the "aggressiveness" of rate adaptation, by limiting the amount of difference between the target buffer level and the actual buffer level which is applied to the target frame rate for this frame. This patch was initially provided by arosenberg at logitech.com as an attachment to issue #270. It was modified to separate these controls from the other unrelated modifications in that patch, as well as to use the pre-existing variables rather than introducing new ones. Change-Id: Id542e3f5667dd92d857d5eabf29878f2fd730a62
2011-04-12Merge "Fix encoder range check for frame width and height"John Koleszar
2011-04-12Fix encoder range check for frame width and heightAttila Nagy
14 bits available in the bistream => valid range [1..16383] Removed unused local vars. Change-Id: Icf3385e47a9fa13af70053129c2248671f285583
2011-04-11Set cpu_used range to [-16, 16] in real-time modeYunqing Wang
Remove encoding speed limitation in real-time mode. Change-Id: Ib5e35d8bb522b2a25f3e4ad5cfe2788ebebb3617
2011-03-10Removed firstpass motion mapAdrian Grange
The firstpass motion map consists of an 8-bit flag for each MB indicating how strongly the firstpass code believes it should be filtered during the second pass ARNR filtering. For long or large format material the motion map can become extremely large and hamper the operation of the encoding process. This change removes the motion map altogether, leaving the second pass to rely on the magnitude of the motion compensated error to determine the filter weight to use for the MB during ARNR filtering. Tests on the derf set indicate that the effect of this change is neutral, with some small wins and losses. The motion map has therefore been removed based on a cost/benefit evaluation. Change-Id: I53e07d236f5ce09a6f0c54e7c4ffbb490fb870f6
2011-03-04Merge "Fix counter of fixed keyframe distance"John Koleszar
2011-02-23Handle mem allocation failure in vp8e_initAttila Nagy
Change-Id: I0d0445c57eb0889082f83de1948852d57b38fefb
2011-02-10Fix relative include pathsJohn Koleszar
Allow compiling without adding vp8/{common,encoder,decoder} to the include paths. Change-Id: Ifeb5dac351cdfadcd659736f5158b315a0030b6c
2011-02-08vp8e_get_preview fixed for resized framesJames Berry
preview_img d_w and d_h along with w and h would not be updated for resized frames. now uses sd.y_width and sd.y_height Change-Id: I52241de4cc1de5e73f865e668bd70a7cbd954390
2011-02-07Fix counter of fixed keyframe distanceAndoni Morales Alastruey
When the keyframe distance is fixed the first interval has the right distance but, the next ones have kf_distance + 1. Change-Id: I44f1190fe7146124bd07660a5e0ef08829e3ae07
2011-01-31validate min_q against max_qJohn Koleszar
min_q is required to be <= max_q. Change-Id: I28eccf96df3b52a94913762b54c4fbe0d021ce5e
2011-01-18Fix encoder real-time only configuration.Attila Nagy
Remove allocation/deallocation of stats storage. Remove full search functions in machine specific encoder inits. Remove last pass validation in validate_config. Change-Id: I7f29be69273981a4fef6e80ecdb6217c68cbad4e
2011-01-17Fix CQ range and experimental KF sizing changes.Paul Wilkins
The CQ level was not using the q_trans[] array to convert to a 0-127 range as per min and maxq Experimental change to try and match the reconstruction error for forced key frames approximately to that of the previous frame by means of the recode loop. Though this may cause extra recodes and the recode behavior has not been optimized, it can only happen on forced key frames. Change-Id: I1f7e42d526f1b1cb556dd461eff1a692bd1b5b2f
2011-01-07CQ ModePaul Wilkins
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
2010-12-17Add psnr/ssim tuning optionJohn Koleszar
Add a new encoder control, VP8E_SET_TUNING, to allow the application to inform the encoder that the material will benefit from certain tuning. Expose this control as the --tune option to vpxenc. The args helper is expanded to support enumerated arguments by name or value. Two tunings are provided by this patch, PSNR (default) and SSIM. Activity masking is made dependent on setting --tune=ssim, as the current implementation hurts speed (10%) and PSNR (2.7% avg, 10% peak) too much for it to be a default yet. Change-Id: I110d969381c4805347ff5a0ffaf1a14ca1965257
2010-11-24allow dimensions as low as 1 pixelPascal Massimino
remove warning comment in vpxenc.c: in case of 1x1 picture, detect_bytes will be equal to '3' and we'll fall back to RAW_TYPE. fix read_frame() by tracking the pre-read buffer length in the struct detect Change-Id: If1ed86ee5260dcdbc8f9d10da6cbb84a4cc2f151
2010-11-17Disable compile warning for ERROR macroJohn Koleszar
The ERROR macro collides wiith the MS SDK on Windows. Since we're not making any win32 calls in this function, just #undef it first to take ownership. Change-Id: Ic18c60dfa3a33c52e6c49d3f4f8d3e7e3ac3341d
2010-11-10postproc : Re-work posproc calling to allow more flags.Fritz Koenig
Debugging in postproc needs more flags to allow for specific block types to be turned on or off in the visualizations. Must be enabled with --enable-postproc-visualizer during configuration time. Change-Id: Ia74f357ddc3ad4fb8082afd3a64f62384e4fcb2d
2010-10-21Change altref times to preceding pts+1.Frank Galligan
Change the pts of the altref frame to be as close as possible to the pts of the preceding frame and still be strictly increasing. Change-Id: Iae3033a4c89ae5a9d0e5c4198e9196e5f3ee57c7
2010-10-21Move firstpass motion map to stats packetJohn Koleszar
The first implementation of the firstpass motion map for motion compensated temporal filtering created a file, fpmotionmap.stt, in the current working directory. This was not safe for multiple encoder instances. This patch merges this data into the first pass stats packet interface, so that it is handled like the other (numerical) firstpass stats. The new stats packet is defined as follows: Numerical Stats (16 doubles) -- 128 bytes Motion Map -- 1 byte / Macroblock Padding -- to align packet to 8 bytes The fpmotionmap.stt file can still be generated for debugging purposes in the same way that the textual version of the stats are available (defining OUTPUT_FPF in firstpass.c) Change-Id: I083ffbfd95e7d6a42bb4039ba0e81f678c8183ca
2010-10-19Update arnr strength range form 1-6 to 0-6.Frank Galligan
Change-Id: I8eb49c56f7509f0a8074d440e8345b9e3344b85b
2010-09-30Changed defaults & range checking for AltRef paramsAdrian Grange
Modified the range checking of parameters used in the AltRef temporal filter (arnr-max-frames, arnr-strength, arnr-type) and default values for each of them. Change-Id: Ib261028d501b9523f6e44cb4790cc52167b6e92b
2010-09-23Add getter functions for the interface data symbolsJohn Koleszar
Having these symbols be available as functions rather than data is occasionally more convenient. Implemented this way rather than a get-codec-by-id style to avoid creating a link-time dependency between the encoder and the decoder. Fixes issue #169 Change-Id: I319f281277033a5e7e3ee3b092b9a87cce2f463d
2010-09-20Add high limit check for unsigned parametersGuillermo Ballester Valor
The patch related with issue #55 (5a72620) fixed some warnings, but the fix was not optimal. It actually was a trick to confuse compiler rather than a fix. This patch fixes it by creating a new macro used when needed just a high limit check for an unsigned. Change-Id: I94b322e0f7fb07604b3b1df1f9321185f48cfcb5
2010-09-09Use WebM in copyright notice for consistencyJohn Koleszar
Changes 'The VP8 project' to 'The WebM project', for consistency with other webmproject.org repositories. Fixes issue #97. Change-Id: I37c13ed5fbdb9d334ceef71c6350e9febed9bbba
2010-09-02encoder: remove postproc dependencyJames Zern
Remove the dependency on postproc.c for the encoder in general, the only unchecked need for it is when CONFIG_PSNR is enabled. All other cases are already wrapped in CONFIG_POSTPROC. In the CONFIG_PSNR case the file will still be included. Additionally, when VP8_SET_POSTPROC is used with the encoder when post processing has been disabled an error will be returned. This addresses issue #153. Change-Id: Ia6dfe20167f7077734a6058cbd1d794550346089
2010-09-02Disable frame dropping by defaultJohn Koleszar
This is not the behavior that most users expect. Change-Id: I226126ea400c22cf1f7918e80ea7fe0771c569cb
2010-08-20increase rate control buffer level precisionJohn Koleszar
The external API exposes the RC initial/optimal/full buffer level in milliseconds, but this value was truncated internally to seconds. This patch allows the use of the full precision during the conversion from time to bits. Change-Id: If8dd2a87614c05747f81432cbe75dd9e6ed2f04e
2010-07-19Parameter limit change.Paul Wilkins
Change maximum ARNR filter width to 15. Change-Id: I3b72450ea08e96287445ec18810630ee2292954c
2010-06-18cosmetics: trim trailing whitespaceJohn Koleszar
When the license headers were updated, they accidentally contained trailing whitespace, so unfortunately we have to touch all the files again. Change-Id: I236c05fade06589e417179c0444cb39b09e4200d
2010-06-14vp8_cx_iface: set default cpu used to 0John Koleszar
Change-Id: I7b35f4717cdd204224112f72471b551617262417
2010-06-14Fix compiler warningsGuillermo Ballester Valor
Change-Id: I2a97f08cc3c7808ce5be39e910cc5147ecf03a1d
2010-06-10Remove reference to 'vpx Technologies'John Koleszar
Vestigial. Change-Id: Iffa9e6d5ba5199b136d7549890101da17c11e3c3
2010-06-04LICENSE: update with latest textJohn Koleszar
Change-Id: Ieebea089095d9073b3a94932791099f614ce120c
2010-05-27Increase the size of output packet listYaowu Xu
This is to accommodate output packets for both compressed data and psnr stats. For each frame, there are at least one packet for compressed data and one for psnr stats. For a max lag of 25, 64 is large enough to cover all lagged frames at the end of encoding. Change-Id: If20787fbc86f96e1aa16a3ccf2adc93e6c1e3d5f
2010-05-24vpx_image: add VPX_ prefix to PLANE_*John Koleszar
The PLANE_{PACKED,Y,U,V,ALPHA} macros should be renamed to be within the VPX_ namespace. Fixes #27
2010-05-24install includes in DIST_DIR/include/vpx, move vpx_codec/ to vpx/John Koleszar
This renames the vpx_codec/ directory to vpx/, to allow applications to more consistently reference these includes with the vpx/ prefix. This allows the includes to be installed in /usr/local/include/vpx rather than polluting the system includes directory with an excessive number of includes. Change-Id: I7b0652a20543d93f38f421c60b0bbccde4d61b4f
2010-05-21Put img_fmt in the vpx namespaceJames Zern
Avoid an potential name clashes and match other external types. s/IMG_FMT/VPX_$&/g s/img_fmt/vpx_$&/g Change-Id: Ia7ad5bbb6424416b37e71e5f5eb1eca31c3c707f
2010-05-18Initial WebM releaseJohn Koleszar