Commit Graph

1335 Commits

Author SHA1 Message Date
John Koleszar
22f56b93e5 Formalize encodeframe.c forward delclarations
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-04 10:44:47 -07:00
Attila Nagy
3e32105d63 Fix multi-resolution threaded encoding
mb_row and mb_col was not passed to vp8cx_encode_inter_macroblock in
threaded encoding.

Change-Id: If4321cc59bf91e991aa31e772f882ed5f2bbb201
2012-05-04 10:44:46 -07:00
John Koleszar
2bf8fb5889 remove deprecated pre-v0.9.0 API
Remove a bunch of compatibility code dating back to before the initial
libvpx release.

Change-Id: Ie50b81e7d665955bec3d692cd6521c9583e85ca3
2012-05-04 10:44:46 -07:00
Attila Nagy
f039a85fd8 Make global data const
Removes all runtime initialization of global data. This commit is a
squashed version of the following series cherry-picked from master.
This is necessary because of a change that was merged to the tester
that depends on the scaler being moved to the RTCD framework, which
is a worthwhile thing to include in Eider anyway.

  - a91b42f02 Makes all global data in entropy.c const
  - b35a0db0e Makes all global data in tokenize.c const
  - 441cac8ea Makes all mode token tables const
  - 5948a0210 Ports vpx_xcaler to new RTCD method
  - 317d4244c Makes all mode token tables const part 2

Change-Id: Ifeaea24df2b731e7c509fa6c6ef6891a374afc26
2012-05-04 10:42:21 -07:00
John Koleszar
9f9cc8fe71 Merge "Add VPX_TS_ prefix to MAX_LAYERS, MAX_PERIODICITY" into eider 2012-05-03 09:40:50 -07:00
John Koleszar
d8216b19b6 Merge "Fix compiler warnings" into eider 2012-05-02 16:22:34 -07:00
John Koleszar
d46ddd0839 Add VPX_TS_ prefix to MAX_LAYERS, MAX_PERIODICITY
Preserved the prior names for compatibility, will remove in the future.

Change-Id: I8773f959ebce72f60168a2972f7a8ffe6642b9b2
2012-05-02 16:21:52 -07:00
Timothy B. Terriberry
e50c842755 Fix TEXTRELs in the ARM asm.
Besides imposing a performance penalty at startup in most
 configurations, these relocations break the dynamic linker for
 native Fennec, since it does not support them at all.

Change-Id: Id5dc768609354ebb4379966eb61a7313e6fd18de
2012-05-02 10:36:01 -07:00
Timothy B. Terriberry
22ae1403e9 Fix trailing commas in enums.
These are warnings in most builds, but show up as compile errors on
 some platforms when these headers are included from C++ code.

Change-Id: I6c523b4dbbc699075fe73830442b51922e5a61d5
2012-05-02 10:35:28 -07:00
Attila Nagy
14c9fce8e4 Fix compiler warnings
Fix code for following warnings:
-Wimplicit-function-declaration
-Wuninitialized
-Wunused-but-set-variable
-Wunused-variable

Change-Id: I2be434f22fdecb903198e8b0711255b4c1a2947a
2012-05-02 10:57:57 +03:00
Attila Nagy
3939e85b26 Fix loopfilter race condition in multithreaded encoder
Race was introduced by https://gerrit.chromium.org/gerrit/15563.

If loopfilter related config params were changed between frames, or
after a KEY frame, there could be a mismatch between encoder's and
decoder's recontructed image. In worst case, when frame buffers are
reallocated because of a size change, the loopfilter could
do an invalid data access (segmentation fault).

Fixes:
Sync with the loopfilter before applying any encoder changes in
vp8_change_config().
Moved the loopfilter synching to the top of
encode_frame_to_data_rate() so that it's done before any alteration of
the encoder.

Change-Id: Ide5245d2a2aeed78752de750c0110bc4b46f5b7b
2012-04-25 14:26:02 +03:00
John Koleszar
504601bb14 Merge "multi-res: restore v1.0.0 API" into eider 2012-04-23 12:07:18 -07:00
John Koleszar
d72c536ede multi-res: restore v1.0.0 API
Move the notion of 0 bitrate implying skip deeper into the codec,
rather than doing it at the multi-encoder API level. This preserves
v1.0.0 ABI compatibility, rather than forcing a bump to v2.0.0 over a
minor change. Also, this allows the case where the application can
selectively enable and disable the larger resolution(s) without having
to reinitialize the codec instace (for instance, if no target is
receiving the full resolution stream).

It's not clear how deep to push this check. It may be valuable to
allow the framerate adaptation code to run, for example. Currently put
the check as early as possible for simplicity, should reevaluate this
as this feature gains real use.

Change-Id: I371709b8c6b52185a1c71a166a131ecc244582f0
2012-04-20 11:39:42 -07:00
John Koleszar
8e858f90f3 vp8_change_config: don't force kf with spatial resampling
Look for changes in the codec's configured w/h instead of its active
w/h when forcing keyframes. Otherwise calls to vp8_change_config()
will force a keyframe when spatial resampling is active.

Change-Id: Ie0d20e70507004e714ad40b640aa5b434251eb32
2012-04-20 11:09:12 -07:00
John Koleszar
c311b3b3a9 rtcd: serialize function pointer initialization
Ensure that RTCD function pointers are set at most once, to silence
some data race warnings. Implementation provided for POSIX threads and
Win32, with the prior unsynchronized behavior left in place for other
platforms.

Change-Id: I65c5856df43ef67043b3d5f26ddafddd8fcb2f7e
2012-04-19 14:15:23 -07:00
John Koleszar
21173e1999 correct alt-ref contribution to frame rate
When producing an invisible ARF, the time stamp counters aren't
updated since the last time stamp is seen by the codec twice. The
prior code was trapping this case with refresh_alt_ref, but this isn't
correct for other uses of the ARF. Instead, use the show_frame flag.

Change-Id: If67fff7c6c66a3606698e34e2fb5731f56b4a223
2012-04-16 12:23:33 -07:00
Scott LaVarnway
3c5ed6f52e Merge "MB_MODE_INFO size reduction" 2012-04-12 12:03:45 -07:00
Scott LaVarnway
6dc21bce63 Merge "loopfilter improvements" 2012-04-12 12:02:24 -07:00
Scott LaVarnway
e0a80519c7 loopfilter improvements
Local variable offsets are now consistent for the functions,
removed unused parameters, reworked the assembly to eliminate
stalls/instructions.

Change-Id: Iaa37668f8a9bb8754df435f6a51c3a08d547f879
2012-04-12 14:22:47 -04:00
Deb Mukherjee
6b33ca395f Fixes to disable MFQE when there is motion.
This patch includes:
1. fixes to disable block based termporal mixing when motion
is detected (because this version of mfqe only handles zero motion).
2. The criterion used for determining whether to mix or
not are changed to use squared differences rather than
absolute differences.
3. Additional checks on color mismatch and excessive block
flatness added. If the block as decoded has very low activity
it is unlikely to yield benefits for mixing.

Change-Id: I07331e5ab5ba64844c56e84b1a4b7de823eac6cb
2012-04-10 14:27:28 -07:00
John Koleszar
8106df8f5a MFQE: apply threshold to subblocks and chroma.
In cases where you have a flat background occluded by a moving object
of similar luminosity in the foreground, it was likely that the
foreground blocks would persist for a few frames after the background
is uncovered. This is particularly noticable when the object has a
different color than the background, so add the chroma planes in as an
additional check.

In addition, for block sizes of 8 and 16, the luma threshold is
applied on four subblocks independently, which helps when only part of
the background in the block has been uncovered.

This fixes issue #392, which includes a test clip to reproduce the
issue.

BUG=392

Change-Id: I2bd7b2b0e25e912dcac342e5ad6e8914f5afd302
2012-04-03 12:05:01 -07:00
Johann
21ac3c8f26 Move variance and SAD RTCD definitions
When the functions were moved from encoder/ to common/ the RTCD file was
not updated.

Change-Id: I1c98715ed51adf1a95aa2492949d8552aec88d1f
2012-04-02 11:06:35 -07:00
John Koleszar
8b15cf6929 Merge "remove unused BOOL_CODER::value" 2012-03-29 14:03:07 -07:00
John Koleszar
3f8349467a remove unused BOOL_CODER::value
Change-Id: Ic7782707afed38c3ec7e996a4a11dc2d55226691
2012-03-29 13:56:48 -07:00
Scott LaVarnway
31322c5faa MB_MODE_INFO size reduction
Reduced the size of the struct by 8 bytes, which would be
a memory savings of 64800 bytes for 1080 resolutions.  Had
an extra byte, so created an is_4x4 for B_PRED or SPLITMV
modes.  This simplified the mode checks in
vp8_reset_mb_tokens_context and vp8_decode_mb_tokens.

Change-Id: Ibec27784139abdc34d4d01f73c09f43e9e10e0f5
2012-03-29 16:30:14 -04:00
Scott LaVarnway
a337725625 Updated vp8_build_intra_predictors_mby_s(sse2/ssse3)
to work with the latest code.

Patch Set 2: aligned the above_row buffers to fix crash

Change-Id: I7a6992a20ed079ccd302f8c26215cf3057f8b70c
2012-03-29 14:24:53 -04:00
Scott LaVarnway
ccea000c4b Updated vp8_build_intra_predictors_mbuv_s(sse2/ssse3)
to work with the latest code.

Change-Id: Ie382bb55d00ea5929bdadba859eea15f696d4cd9
2012-03-26 13:40:14 -04:00
Scott LaVarnway
403966ae00 Removed duplicate vp8_build_intra_predictors_mb y/uv
Added y/uv stride as a parameter and remove the
duplicate code.

Change-Id: I019117a9dd9659a09d3d4e845d4814d3f33341b5
2012-03-26 13:40:14 -04:00
Scott LaVarnway
9e9f5f3d70 New vp8_decode_mb_tokens()
This new vp8_decode_mb_tokens() uses a modified version of
WebP's GetCoeffs function.  For now, the dequant does not
occur in GetCoeffs.
Tests showed performance improvements up to 2.5% depending
on material.

Change-Id: Ia24d78627e16ffee5eb4d777ee8379a9270f07c5
2012-03-23 15:50:08 -04:00
Deb Mukherjee
06dc2f6166 Initialize postproc buffer to resolve valgrind warnings
Change-Id: I9a7d40b0eac7200796dbe62e75776b2eb77dfdf6
2012-03-22 17:42:41 -07:00
Deb Mukherjee
66ba79f5fb Miscellaneous changes in mfqe and postproc modules
Adds logic to disable mfqe for the first frame after a configuration
change such as change in resolution. Also adds some missing
if CONFIG_POSTPROC macro checks.

Change-Id: If29053dad50b676bd29189ab7f9fe250eb5d30b3
2012-03-22 09:55:07 -07:00
James Berry
fd9df44a05 Merge "remove __inline for compiler compatibility" 2012-03-21 12:37:17 -07:00
James Berry
3c021e1d79 Merge "bug fix: remove inline from mfqe.c" 2012-03-21 12:36:40 -07:00
James Berry
451ab0c01e remove __inline for compiler compatibility
__inline removed for broader compiler compatibility

Change-Id: I6f2b218dfc808b73212bbb90c69e2b6cc1fa90ce
2012-03-21 14:11:10 -04:00
Yunqing Wang
bcee56bed5 Minor fix: add back a vpx_free call
Added back a vpx_free call that was mistakenly removed.

Change-Id: Ib662933a8697a4efb8534b5b9b762ee6c2777459
2012-03-21 14:09:33 -04:00
James Berry
921ffdd2c9 bug fix: remove inline from mfqe.c
remove inline from mfqe.c for vs
compatibility

Change-Id: I853f16503d285fcd41a1a12181d8745159156b5c
2012-03-21 13:42:58 -04:00
Yunqing Wang
9ed1b2f09e Merge "Add motion search skipping in first pass" 2012-03-16 14:02:51 -07:00
Yunqing Wang
6a819ce4fe Add motion search skipping in first pass
This change added a motion search skipping mechanism similar
to what we did in second pass. For a macroblock that is very
similar to the macroblock at same location on last frame,
we can set its mv to be zero, and skip motion search. This
improves first-pass performance for slide shows and video
conferencing clips with a slight PSNR loss.

Change-Id: Ic73f9ef5604270ddd6d433170091d20361dfe229
2012-03-16 15:59:00 -04:00
Johann
e68953b7c8 Merge "RFC: Reorganize MFQE loops" 2012-03-16 11:35:18 -07:00
Scott LaVarnway
9aa2bd8a03 Merge "x_motion_minq table reduction" 2012-03-16 09:03:47 -07:00
John Koleszar
422f97d7ab Merge "fix potential use of uninitialized rate_y" 2012-03-14 12:00:27 -07:00
John Koleszar
20cd3e6b8f fix potential use of uninitialized rate_y
This issue likely doesn't appear in the unmodified encoder, but
sufficient hacking on the mode selection loop can expose it.

Change-Id: I8a35831e8f08b549806d0c2c6900d42af883f78f
2012-03-14 10:10:30 -07:00
Jim Bankoski
6b66c01c88 Merge "Adds a motion compensated temporal denoiser to the encoder." 2012-03-13 16:18:57 -07:00
Stefan Holmer
9c41143d66 Adds a motion compensated temporal denoiser to the encoder.
Some refactoring in rdopt.c and pickinter.c.

Change-Id: I4f50020eb3313c37f4d441d708fedcaf219d3038
2012-03-13 15:33:50 -07:00
Jim Bankoski
e9cacfd66d Merge "Update for key frame target size setting." 2012-03-13 10:13:03 -07:00
Marco Paniconi
301409107f Update for key frame target size setting.
Set an iniital/minimun boost level for the frame rate
factor of key frame target size setting.

Change-Id: If2586f4ac76a1fa89378aa652a58607356a1f426
2012-03-12 16:23:08 -07:00
Johann
ddf94f6184 Merge "Move SAD and variance functions to common" 2012-03-12 15:08:48 -07:00
Scott LaVarnway
7a1590713e Merge changes I9c26870a,Ifabb0f67
* changes:
  threading.c refactoring
  Decoder loops refactoring
2012-03-09 10:48:11 -08:00
Scott LaVarnway
9ed874713f threading.c refactoring
Added recon above/left to MACROBLOCKD
Reworked decode_macroblock

Change-Id: I9c26870af75797134f410acbd02942065b3495c1
2012-03-08 15:27:41 -05:00
Johann
fd903902ef RFC: Reorganize MFQE loops
Break MFQE code into it's own file.

It is currently only valid for 16x16 and 8x8 Y blocks. It also filters
4x4 U/V blocks.

Refactor filtering and add associated assembly. Limited test cases show
--mfqe introduces a penalty of ~20% with HD content. The assembly
reduces the penalty to ~15%

Change-Id: I4b8de6b5cdff5413037de5b6c42f437033ee55bf
2012-03-06 15:20:03 -08:00