summaryrefslogtreecommitdiff
path: root/vpx_scale/generic/yv12config.c
AgeCommit message (Collapse)Author
2013-05-09Subsampling aware allocs and bitstreamJohn Koleszar
Make framebuffer allocations according to the chroma subsamping factors in use. A bit is placed in the raw part of the frame header for each of the two subsampling factors. This will be moved in a future commit to make them part of the TBD feature set bits, probably only set on keyframes, etc. Change-Id: I59ed38d3a3c0d4af3c7c277617de28d04a001853
2013-03-13Fix pulsing issue with scalingJohn Koleszar
Updates the YV12_BUFFER_CONFIG structure to be crop-aware. The exiting width/height parameters are left unchanged, storing the width and height algined to a 16 byte boundary. The cropped dimensions are added as new fields. This fixes a nasty visual pulse when switching between scaled and unscaled frame dimensions due to a mismatch between the scaling ratio and the 16-byte aligned sizes. Change-Id: Id4a3f6aea6b9b9ae38bdfa1b87b7eb2cfcdd57b6
2013-02-08Avoid allocating memory when resizing framesJohn Koleszar
As long as the new frame is smaller than the size that was originally allocated, we don't need to free and reallocate the memory allocated. Instead, do the allocation on the size of the first frame. We could make this passed in from the application instead, if we wanted to support external upscaling. Change-Id: I204d17a130728bbd91155bb4bd863a99bb99b038
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
2011-07-20Increase chrow row alignment to 16 bytes.Timothy B. Terriberry
This is done by expanding luma row to 32-byte alignment, since there is currently a bunch of code that assumes that uv_stride == y_stride/2 (see, for example, vp8/common/postproc.c, common/reconinter.c, common/arm/neon/recon16x16mb_neon.asm, encoder/temporal_filter.c, and possibly others; I haven't done a full audit). It also uses replaces the hardcoded border of 16 in a number of encoder buffers with VP8BORDERINPIXELS (currently 32), as the chroma rows start at an offset of border/2. Together, these two changes have the nice advantage that simply dumping the frame memory as a contiguous blob produces a valid, if padded, image. Change-Id: Iaf5ea722ae5c82d5daa50f6e2dade9de753f1003
2011-07-13Better allocate yuv buffers.Fritz Koenig
Previously allocated more memory than necessary for yuv buffers. This makes it harder to track bugs with reading uninitialized data. Change-Id: I510f7b298d3c647c869be6e5d51608becc63cce9
2011-03-17Increase static linkage, remove unused functionsJohn Koleszar
A large number of functions were defined with external linkage, even though they were only used from within one file. This patch changes their linkage to static and removes the vp8_ prefix from their names, which should make it more obvious to the reader that the function is contained within the current translation unit. Functions that were not referenced were removed. These symbols were identified by: $ nm -A libvpx.a | sort -k3 | uniq -c -f2 | grep ' [A-Z] ' \ | sort | grep '^ *1 ' Change-Id: I59609f58ab65312012c047036ae1e0634f795779
2011-02-15Remove redundant ptr checks in calls to vpx_freeJames Zern
vpx_free if used contains this check. If replaced, well behaved free will behave similarly. Change-Id: I25483aaa8b39255b9a8cf388d6e5eaa20a908ae1
2011-01-19Implement error tracking in the decoderHenrik Lundin
A new vpx_codec_control called VP8D_GET_FRAME_CORRUPTED. The output from the function is non-zero if the last decoded frame contains corruption due to packet losses. The decoder is also modified to accept encoded frames of zero length. A zero length frame indicates to the decoder that one or more frames have been completely lost. This will mark the last decoded reference buffer as corrupted. The data pointer can be NULL if the length is zero. Change-Id: Ic5902c785a281c6e05329deea958554b7a6c75ce
2010-10-27Eliminate more warnings.Timothy B. Terriberry
This eliminates a large set of warnings exposed by the Mozilla build system (Use of C++ comments in ISO C90 source, commas at the end of enum lists, a couple incomplete initializers, and signed/unsigned comparisons). It also eliminates many (but not all) of the warnings expose by newer GCC versions and _FORTIFY_SOURCE (e.g., calling fread and fwrite without checking the return values). There are a few spurious warnings left on my system: ../vp8/encoder/encodemb.c:274:9: warning: 'sz' may be used uninitialized in this function gcc seems to be unable to figure out that the value shortcut doesn't change between the two if blocks that test it here. ../vp8/encoder/onyx_if.c:5314:5: warning: comparison of unsigned expression >= 0 is always true ../vp8/encoder/onyx_if.c:5319:5: warning: comparison of unsigned expression >= 0 is always true This is true, so far as it goes, but it's comparing against an enum, and the C standard does not mandate that enums be unsigned, so the checks can't be removed. Change-Id: Iaf689ae3e3d0ddc5ade00faa474debe73b8d3395
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-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-04LICENSE: update with latest textJohn Koleszar
Change-Id: Ieebea089095d9073b3a94932791099f614ce120c
2010-05-18Initial WebM releaseJohn Koleszar