Commit Graph

24 Commits

Author SHA1 Message Date
James Zern
19d881290d vpx_mem,align_addr: use ~ to create mask
removes the need for an intermediate cast to int, which was missing in
the call added in:
69c5ba1 vpx_mem: Refactor code

quiets a visual studio warning:
C4146: unary minus operator applied to unsigned type, result still
unsigned

Change-Id: I76c4003416759c6c76b78f74de7c0d2ba5071216
2016-08-27 11:39:18 -07:00
James Zern
4699aca87f vpx_mem: add basic size check
set a max allocable size to prevent overflows in 32-bit and extremely
large allocation attempts in 64-bit. this could be amended to allow size
or num parameters to be 64-bits with the correct size being used at each
call site.

BUG=webm:819

Change-Id: Ia81004d6c4279680714c4488b4f6cf287ab396a5
2016-08-24 19:22:57 -07:00
James Zern
963291217f vpx_mem: normalize function names
use lower case + '_' rather than capital followed by camel case

Change-Id: I74b80fb660d281228e25edc8b6509455ffe2920e
2016-08-24 19:22:56 -07:00
Urvang Joshi
28c6207bcd vpx_realloc correction.
vpx_realloc was allocating 1 byte more than needed every time.
Fixed this, and took this opportunity to do a small refactoring.

Change-Id: I38fcb62b698894acbbab43466c1decd12f906789
(cherry picked from aom: 2a876b4 aom_realloc correction.)
2016-08-24 19:22:52 -07:00
Urvang Joshi
69c5ba1910 vpx_mem: Refactor code
Change-Id: I2da9cd5da48ae97e770bccfd1233bcc70b484688
(cherry picked from aom: 83c95f5 aom_mem: Refactor code)
2016-08-24 19:22:41 -07:00
clang-format
d7a3b781d3 vpx_mem: apply clang-format
Change-Id: I0440686fc03f1ee02bd0168c91e671a0a2d0056a
2016-07-25 14:17:59 -07:00
James Zern
77d3775941 vpx_mem.c: remove unused macro
__VPX_MEM_C__

unused since:
f58011a vpx_mem: remove vpx_memset

Change-Id: I820c972c4165275ddf21c1687748409818a7f2af
2016-02-02 18:03:15 -08:00
James Zern
d0f406366c vpx_memset16: drop unnecessary local
+ add a cast

Change-Id: I2965e7867223aa25bf688c988629ac57b4971905
2015-10-06 22:51:35 -07:00
James Zern
3554089838 vpx_memset16: quiet signed/unsigned warning
Change-Id: I144bedde7ea43f1b84360c1a7c8a042fd30abb6b
2015-10-06 22:48:18 -07:00
Yaowu Xu
72889a2a60 Remove vp10's build dependency on vp9
CONFIG_VP9_HIGHBITDEPTH is currently used by both vp9 and vp10, but in
many place outside vp9/vp10, the macro was used in conjunction of
CONFIG_VP9. This created a dependency on vp9 for vp10 to build. This
commit removes the dependency by use CONFIG_VP9_HIGHBITDEPTH only in
these places.

Change-Id: I8cc007fc9cf132394c6498ce6759e606b64a6ad0
2015-08-14 12:16:07 -07:00
James Zern
f58011ada5 vpx_mem: remove vpx_memset
vestigial. replace instances with memset() which they already were being
defined to.

Change-Id: Ie030cfaaa3e890dd92cf1a995fcb1927ba175201
2015-04-28 20:00:59 -07:00
James Zern
f274c2199b vpx_mem: remove vpx_memcpy
vestigial. replace instances with memcpy() which they already were being
defined to.

Change-Id: Icfd1b0bc5d95b70efab91b9ae777ace1e81d2d7c
2015-04-28 19:59:41 -07:00
James Zern
fbd3b89488 vpx_mem: remove vpx_memmove
vestigial. replace instances with memmove() which they already were
being defined to.

Change-Id: If396d3f9e3cf79c0ee5d7429615ef3d6b2a34afa
2015-04-28 19:59:40 -07:00
James Zern
4feae6791c vpx_mem: remove global function pointer
vestigial.

Change-Id: I11389f660d0c5db8fa48bd355cbc3223fc3bcabb
2015-04-22 13:11:07 -07:00
James Zern
4659e3644f vpx_mem: remove mem tracker
vestigial. there are tools better suited for this

Change-Id: I7a72a2cfe32377f07c8cd0973ddb18842720a225
2015-04-22 13:10:12 -07:00
James Zern
02804821cc vpx_mem: remove 'mem checks'
vestigial. there are tools better suited for this

Change-Id: I1d6f604452fbc62cb7523eec8d1f8a72a276d6b5
2015-04-20 20:52:32 -07:00
James Zern
e5eda53e3d vpx_mem: remove memory manager code
vestigial. the code is stale and couldn't be configured directly; there
are better ways to achieve this now

Change-Id: I5a9c62e099215588cd0d7e5ae002dfc77c21a895
2015-04-20 20:52:32 -07:00
Deb Mukherjee
5acfafb18e Adds config opt for highbitdepth + misc. vpx
Adds config parameter vp9_highbitdepth, to support highbitdepth profiles.
Also includes most vpx level high bit-depth functions. However
encode/decode in the highbitdepth profiles will not work until
the rest of the code is in place.

Change-Id: I34c53b253c38873611057a6cbc89a1361b8985a6
2014-09-02 14:37:10 -07:00
John Koleszar
c6b9039fd9 Restyle code
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-07-17 11:46:03 -07:00
Timothy B. Terriberry
c4d7e5e67e Eliminate more warnings.
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-10-27 18:08:04 -07:00
John Koleszar
c2140b8af1 Use WebM in copyright notice for consistency
Changes 'The VP8 project' to 'The WebM project', for consistency
with other webmproject.org repositories.

Fixes issue #97.

Change-Id: I37c13ed5fbdb9d334ceef71c6350e9febed9bbba
2010-09-09 10:01:21 -04:00
John Koleszar
94c52e4da8 cosmetics: trim trailing whitespace
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-18 13:06:11 -04:00
John Koleszar
09202d8071 LICENSE: update with latest text
Change-Id: Ieebea089095d9073b3a94932791099f614ce120c
2010-06-04 16:19:40 -04:00
John Koleszar
0ea50ce9cb Initial WebM release 2010-05-18 11:58:33 -04:00