Commit Graph

8287 Commits

Author SHA1 Message Date
hui su
088b05fd99 Use sizeof(variable) instead of sizeof(type)
Change-Id: Ia069da11eebb271063e9eb837bdb3e7175ecce13
2015-08-12 11:25:38 -07:00
James Zern
472e14e725 vp9_encoder: add missing vpx_clear_system_state
fixes sse-only build

Change-Id: I4591f5be6773464238744a41d6901cf0e903b5bd
2015-08-11 19:28:23 -07:00
Scott LaVarnway
b04dad328c Merge "VPX: remove scaled calls from FUN_CONV_1D" 2015-08-11 21:46:50 +00:00
Marco Paniconi
762641bacc Merge "Adjust speed setting for temporal layers in 1 pass non-rd mode." 2015-08-11 21:33:47 +00:00
Marco
3d181a4516 Adjust speed setting for temporal layers in 1 pass non-rd mode.
For speed 7, real-time mode: Base layer frames are further apart
(for #temporal layers = 3, this is every 4 frames) so worth keeping
same motion search parameters (as in speed 6) on the base layer frames.

Change-Id: Idebf49dda6ef4f3d9a55aee55129a68253f692fb
2015-08-11 11:21:01 -07:00
Alex Converse
fe4a14af72 blockiness: cleanup includes and add statics
Change-Id: I26c53f8e74cf5431fb3179af5d480e4e9f3d8f32
2015-08-11 10:58:08 -07:00
Scott LaVarnway
4ef08dcec8 Merge "VPX: Add rtcd support for scaling." 2015-08-11 13:19:00 +00:00
Aℓex Converse
b152472ba7 Merge "Move vp9_systemdependent.h to vpx_ports bitops.h and system_state.h" 2015-08-11 01:18:39 +00:00
Marco Paniconi
1d723572b9 Merge "Adjustments for VP9 temporal layers, for 1 pass CBR" 2015-08-10 22:53:35 +00:00
Alex Converse
a8a08ce57e Move vp9_systemdependent.h to vpx_ports bitops.h and system_state.h
Use system_state.h in vpx_dsp and remove unneeded includes of
vp9_systemdependent.h.

Change-Id: I92557ec6dd5aa790160b4f31fe7967db0d7ec3c4
2015-08-10 15:37:14 -07:00
James Zern
9265bad906 Merge changes from topic 'x86inc'
* changes:
  Only use .text sections for aout
  Use newer x86inc.asm
  Use .text instead of .rodata on macho
  Copy PIC handling code from x86_abi_support
  Set 'private_extern' visibility for macho targets
  Avoid 'amdnop' when building with nasm
  Catch all elf formats
  Expand PIC default to macho64 and respect CONFIG_PIC from libvpx
  Use libvpx defines to set name mangling rules
  Customize x86inc.asm for libvpx
2015-08-10 21:20:38 +00:00
Marco
0d8cb09058 Adjustments for VP9 temporal layers, for 1 pass CBR
Adjust logic for golden reference usage in non-rd pickmode,
under svc mode.

Change-Id: If012e21e8123a0684634af0ac7ed3da9c8c7d7cc
2015-08-10 13:21:42 -07:00
Jingning Han
244912d506 Make build_inter_predictors static function
Remove the function declaration from vp9_reconinter.h file.

Change-Id: I193562151b69ece19b9ee2efa1a791fe2522cca0
2015-08-10 15:51:13 +00:00
Jingning Han
d705e17f5e Merge "Add static syntax to total_adj_strong_thresh" 2015-08-10 15:50:53 +00:00
Alex Converse
f2e44aa664 Move the msvc round() replacement to msvc.h
Change-Id: If470411c3c62a27f52261f4ece2c5054b71789c7
2015-08-07 18:27:48 -07:00
Alex Converse
610e258cc5 Make the round() replacement match C99 and POSIX.
http://pubs.opengroup.org/onlinepubs/009695399/functions/round.html

Change-Id: Idf387d944d36bf593f8797db9053e11e5c9b9b39
2015-08-07 18:24:21 -07:00
Jingning Han
6ad714fa52 Add static syntax to total_adj_strong_thresh
Change-Id: I34cc7b500d19a79f29c5ad241f602c1bc269446e
2015-08-07 17:26:25 -07:00
Johann
41a0a0cb35 Use newer x86inc.asm
Rename updated version of x86inc.asm

Use "private_prefix" instead of "program_name" and make vpx the default
prefix.

Change-Id: I4883a99b2aee8e5dc9f2c16a2e6f4b5d6e4de458
2015-08-07 16:44:44 -07:00
Jingning Han
a9aa29d901 Merge "Add static syntax to copy_mem64x64" 2015-08-07 21:41:32 +00:00
Marco Paniconi
f87fdebefc Merge "Fix a setting in cyclic refresh." 2015-08-07 18:38:40 +00:00
Zoe Liu
9b769e47f4 Merge "Fixed a comment on the compound ref frames." 2015-08-07 18:04:35 +00:00
Marco
dc36e5aff0 Fix a setting in cyclic refresh.
Use the correct period (in terms of cr->percent_refresh) for the condition
of larger delta-qp following key frame.
And account for larger interval for temporal layers.

Change-Id: Ibb43f5200f9b1eeb8bbb8211327b08ecda3c3b8a
2015-08-07 10:34:47 -07:00
Jingning Han
1057ee4847 Add static syntax to copy_mem64x64
Change-Id: Iee4c853ea4a44ae9f5de60c09e5a7b810f15d2dd
2015-08-07 10:16:27 -07:00
Aℓex Converse
eaa8043a31 Merge "Move VP9 SSIM metrics to vpx_dsp." 2015-08-07 16:43:28 +00:00
Yunqing Wang
4bc6ae4342 Merge "Improve the second-level sub-pixel motion search" 2015-08-07 16:05:59 +00:00
Alex Converse
c7b7011b9b Move VP9 SSIM metrics to vpx_dsp.
Change-Id: I20c7b42631b579fade6cf7ebf6d4c69b2fcb5e5e
2015-08-06 18:25:25 -07:00
Zoe Liu
c21cab39c8 Fixed a comment on the compound ref frames.
Change-Id: I77e397ac9f594c9c4c1db442e334a6ea5f53f588
2015-08-06 17:36:57 -07:00
Yunqing Wang
7418b176ce Improve the second-level sub-pixel motion search
Re-investigated the second-level sub-pixel motion search. Improved the
way of choosing search points. Rewrote the second-level search code.

At speed 0, the borg tests showed:
1. for stdhd set, Avg PSNR gain: 0.216%; Overall PSNR gain: 0.196%;
   SSIM gain: 0.206%. Only 1 out of 15 clips showed PSNR loss.
2. for derf set, Avg PSNR gain: 0.171%; Overall PSNR gain: 0.192%;
   SSIM gain: 0.207%. Only 3 out of 30 clips showed PSNR losses.
Added the condition for third-point checking, namely, less points
were checked. Speed tests showed no speed loss(Avg 0.3% speedup at
speed 0).

Change-Id: I6284ebb3fa7ba63be8528184c49e06757211a7f1
2015-08-06 16:28:32 -07:00
Jingning Han
b4f2c567c8 Cosmetic - align format in vp9
Change-Id: I83ed3422f1f4009675ad2f5c4b7236bc7b83b30e
2015-08-06 15:56:11 -07:00
Marco
c54d165014 Rate control adjustment for temporal-svc 1pass.
-For ambient qp in active_worst setting: increase the initial
averaging time (from very first frame) to account for avg_qp of key_frame.
-In postencode on key frame: update the last_q/avg_q[key_frame] for
all temporal layers.

Change-Id: I5313153d350b1045b4835ce948dfffb7d2039b52
2015-08-05 17:34:35 -07:00
Marco
f6255dbb53 Bugfix for svc.
Condition usage of rc.frames_since_golden to non-svc mode.

rc.frames_since_golden, which is used in non-svc mode to add second reference,
was causing, under certain condiiton, the turning off of golden reference
for svc case.

Change-Id: Icec644d235d0471e56d8ff73d6c37278bd6ecd3b
2015-08-05 13:59:52 -07:00
Scott LaVarnway
4e6b5079c6 VPX: remove scaled calls from FUN_CONV_1D
and FUN_CONV_2D macros.  The predict lut now handles
this case.  The encoder now calls vpx_scaled_2d() instead
of vpx_convolve8() for scaling.

Change-Id: Ia1c8af8a31e4cb4887a587143108cb45835f7df7
2015-08-05 10:47:06 -07:00
Jingning Han
d621de7e8d Change vp9_quantize to vpx_quantize
This commit clears all the vp9_ prefix use case in vpx_dsp. It gets
the vp9 folder ready to branch out vp10.

Change-Id: I2906eec179ee792b4af8c9b4161313653050e931
2015-08-04 15:31:49 -07:00
Jingning Han
3ad75fc623 Merge "Replace vp9_ prefix with vpx_ prefix in vpx_dsp function names" 2015-08-04 22:30:36 +00:00
Yunqing Wang
df14d9f4e7 Merge "Minor adjustment in diagonal sub-pixel point checking" 2015-08-04 21:00:41 +00:00
Yunqing Wang
f4656961ca Merge "Small improvement in sub-pixel motion search" 2015-08-04 20:59:30 +00:00
Jingning Han
08a453b9de Replace vp9_ prefix with vpx_ prefix in vpx_dsp function names
This commit clears the function naming convention in vpx_dsp. It
replaces vp9_ prefix of global functions with vpx_ prefix. It also
removes the vp9_ prefix from static functions.

Change-Id: I6394359a63b71a51dda01342eec6a3cc08dfeedf
2015-08-04 13:46:11 -07:00
Yunqing Wang
726d1b841b Minor adjustment in diagonal sub-pixel point checking
Choose a different diagonal point to check when the two costs are
the same, making it consistent with the way we choose the best mv.
This slightly changes the encoding result, and the derflr set borg
test at speed 0 shows 0.027% Overall PSNR gain, 0.024% Avg PSNR
gain, and 0.043% SSIM gain.

Change-Id: Ic8ee3a6767394866d159e4f9e1c777604dd73c17
2015-08-04 12:16:47 -07:00
Yunqing Wang
a3d22aa2a4 Small improvement in sub-pixel motion search
If the current best mv(namely, the search center) is still the best mv
after the first level search, the second level checks is skipped. This
patch doesn't change the bitstream. At speed 0, it speeds up the encoder
by 1% - 2%.

Change-Id: I054c91b884d3f7aef157436c061744562bd6506d
2015-08-04 12:06:21 -07:00
Jingning Han
457a87d986 Merge "Move inverse transfrom dspr2 functions from vp9 to vpx_dsp" 2015-08-04 04:16:22 +00:00
James Zern
a0fd7a9831 Merge "add vp9_vector_var_neon" 2015-08-04 02:30:41 +00:00
Jingning Han
bfad9d2fe6 Move inverse transfrom dspr2 functions from vp9 to vpx_dsp
Change-Id: Ia9cf7c31cab4ba3dd6b9bb668c4b3e84bd55cf69
2015-08-03 11:59:50 -07:00
Jingning Han
7723b8df6a Merge "Add common_dspr2.c file to vpx_dsp/mips" 2015-08-03 18:58:37 +00:00
Yaowu Xu
9d9273726b Merge "Correct the allocation size for ssim_vars" 2015-08-03 18:43:55 +00:00
Jingning Han
92b08f516a Add common_dspr2.c file to vpx_dsp/mips
Move the declaration of commonly referenced variable to
vpx_dsp/mips/common_dspr2.c.

Change-Id: Ia51287b02e2ac5cfae0fba98c721f0810618f28e
2015-08-03 10:53:47 -07:00
Yaowu Xu
8f089cbd2e Correct the allocation size for ssim_vars
Ssim_vars is used to accumulate stats based 4x4 pixel blocks, this
commit changes the allocations size to be based on mi_rows and mi_cols
to avoid out-of-bound memory access for larger size videos. The hard
coded 720x480 can only work for image size up to 2880x1920.

Change-Id: Id9d07f3f777385b448ac88a6034b7472e4cf3c79
2015-08-03 10:46:12 -07:00
Scott LaVarnway
8f6b943100 VPX: Add rtcd support for scaling.
Change-Id: If34bfb0d918967445aea7dc30cd7b55ebfedb1f2
2015-08-03 09:43:34 -07:00
Jingning Han
0b0eba728d Add _dspr2 to local function names
It avoids symbol conflicts between function names of various
implementation versions.

Change-Id: Iad79ebcb8e289457801812a7745c8380b5b06a46
2015-08-02 20:21:59 -07:00
Jingning Han
44849516d4 Factor out mips/msa inverse transform implementations
Move mips/msa inverse transform implementations from vp9 folder to
vpx_dsp.

Change-Id: Ic4cf3f05247c3c63db7b532a0e5000017a962391
2015-08-01 09:25:12 -07:00
Jingning Han
b37494cfb5 Merge "Use precise header files in inverse transform msa implementations" 2015-08-01 16:20:43 +00:00
Jingning Han
b4c7d0523a Merge "Factor inverse transform functions into vpx_dsp" 2015-08-01 16:20:24 +00:00
Jingning Han
4dc390b15d Merge "Add dynamic range notes to vp9_vector_var_c" 2015-08-01 01:01:37 +00:00
James Zern
7dc5a689b4 add vp9_vector_var_neon
~50-60% faster depending on the width

Change-Id: I9d007cfa10b9aaa2169c8c009d95522df6123a92
2015-07-31 17:31:58 -07:00
Aℓex Converse
fd22c492f7 Merge "Turn off simple_model_rd_from_var at speed 4." 2015-07-31 23:51:01 +00:00
Jingning Han
36a9a33b90 Add dynamic range notes to vp9_vector_var_c
Change-Id: If536ad31046ecd9e2ecd9c21f52f8192c8153ad7
2015-07-31 16:42:09 -07:00
Jingning Han
56c2cb7553 Use precise header files in inverse transform msa implementations
Change-Id: Ie8a79d9e2837842c3f60776b661cd42782b108d5
2015-07-31 23:24:54 +00:00
Jingning Han
e8b133c79c Factor inverse transform functions into vpx_dsp
This commit moves the module inverse transform functions from vp9
to vpx_dsp folder. The hybrid transform wrapper functions stay in
the vp9 folder, since it involves codec-specific data structures.

Change-Id: Ib066367c953d3d024c73ba65157bbd70a95c9ef8
2015-07-31 16:21:00 -07:00
Alex Converse
af6d2c7d42 Turn off simple_model_rd_from_var at speed 4.
This got erroneously changed during the refactor. This fixes
SvcTest.TwoPassEncode2TemporalLayersWithMultipleFrameContextsAndTiles.

Change-Id: Ifa5ab0e098396c5e2d10478db87df256eadfa4c7
2015-07-31 15:50:17 -07:00
Aℓex Converse
dd4b416412 Merge "Compute skippable inside the block_rd_txfm loop." 2015-07-31 21:19:11 +00:00
Aℓex Converse
90e563d91f Merge changes Ic1ce346a,Ic0b4e92c
* changes:
  Simplify model_rd_for_sb HBD ifdefs
  Simplify dist_block HBD ifdefs
2015-07-31 19:05:54 +00:00
Alex Converse
ab20c98e84 Compute skippable inside the block_rd_txfm loop.
Change-Id: Iaa43aeeb7a2074495e00cdb83bb551c3f13d3ed2
2015-07-31 11:45:59 -07:00
Zoe Liu
7f8dd35329 Merge "Refactor mips/dspr2 on convolution." 2015-07-31 18:23:19 +00:00
Zoe Liu
873a158f14 Merge "Code refactor on InterpKernel" 2015-07-31 18:20:14 +00:00
Alex Converse
c62228f273 Simplify model_rd_for_sb HBD ifdefs
Change-Id: Ic1ce346a053800ae3b2d77178f46e6a388357f6d
2015-07-31 11:16:59 -07:00
Alex Converse
da9c73c293 Simplify dist_block HBD ifdefs
Change-Id: Ic0b4e92cbaf813bcca8a8e9052c936c2e025e114
2015-07-31 11:04:01 -07:00
Aℓex Converse
8abd0c2a12 Merge "Short circuit rate_block in block_rd_txfm." 2015-07-31 17:59:22 +00:00
Zoe Liu
7cfdc00337 Refactor mips/dspr2 on convolution.
Change-Id: If59a39d5a92c261537342726f94bb7f7f26dfff3
2015-07-31 10:27:42 -07:00
Zoe Liu
7186a2dd86 Code refactor on InterpKernel
It in essence refactors the code for both the interpolation
filtering and the convolution. This change includes the moving
of all the files as well as the changing of the code from vp9_
prefix to vpx_ prefix accordingly, for underneath architectures:
(1) x86;
(2) arm/neon; and
(3) mips/msa.
The work on mips/drsp2 will be done in a separate change list.

Change-Id: Ic3ce7fb7f81210db7628b373c73553db68793c46
2015-07-31 10:27:33 -07:00
Alex Converse
4ac5058afc Give skip_txfm constants names.
This is using a define instead of an enum to keep byte packing.

Change-Id: I3abb07c8bfe377e19be4531b624af7b7b4207792
2015-07-31 10:08:08 -07:00
Alex Converse
73422d3b2d Short circuit rate_block in block_rd_txfm.
Don't run rate_block (cost_coeffs) if distortion alone is enough to
surpass best_rd.

This decreases 2nd pass runtime on HD at speed 2 by about 2%. There is
zero effect on output if tx_cache is removed.

Change-Id: Ia3b1cc77bfbe6ee988c395fde06c0eb92940b784
2015-07-31 10:05:51 -07:00
Yunqing Wang
3b2e73b9a4 Remove tx cache and speed up tx size selection
1. The RD scores obtained during the tx size selection were stored in the
tx cache, and used to help make the tx decision for the following frames.
This wasn't used anymore in VP9 encoder. Recovered the related decision
making code from 1.5+ years ago, and borg tests didn't show any quality
gain. This patch removed it to lower the complexity.

2. An optimization was done after the above refactoring. If the tx_mode
is not TX_MODE_SELECT, we only need to test the chosen tx size instead
of all posible tx sizes. This gave a 1.5% average speed gain at speed 2,
and a 1% average speed gain at speed 3.

Change-Id: Id8cd650e066a8cef33829d8c15388a8138adc78c
2015-07-30 18:53:40 -07:00
Aℓex Converse
eb6b443bd2 Merge "Convert simple_model_rd_from_var from a speed check to a speed feature." 2015-07-30 23:04:28 +00:00
Alex Converse
c827c59eaf Convert simple_model_rd_from_var from a speed check to a speed feature.
Change-Id: I8877025e172fff29bc4e270790211463b676b4d7
2015-07-30 13:53:26 -07:00
Alex Converse
b7f441a0bc Cleanup rdcost_block_args
Change-Id: I9d613cbe9e76b5dd15e935878ef9fd04521690ba
2015-07-30 12:55:51 -07:00
Aℓex Converse
c0f0245e8a Merge "Clean up some casts." 2015-07-30 19:37:28 +00:00
Alex Converse
dfe7fdae7d Comment zcoeff_blk.
Change-Id: Iefc2eb78e71472ecf51802ec59ff32caef4bd0f4
2015-07-29 16:53:33 -07:00
Alex Converse
49e0673659 Clean up some casts.
Change-Id: I264ca534cd7d4755906e20aea47e7a2523bca611
2015-07-29 11:26:51 -07:00
James Zern
f42012e526 Merge "add vp9_block_error_fp_neon" 2015-07-29 00:47:09 +00:00
Hui Su
4cbf36b105 Merge "Replace prefix vp9_ with vpx_ for intra prediction functions" 2015-07-29 00:38:48 +00:00
Jingning Han
d12a4a825c Merge "Replace vp9_ prefix in 2D-DCT functions with vpx_" 2015-07-29 00:07:31 +00:00
Jingning Han
39e3937c24 Merge "Remove vp9_dct.h file" 2015-07-29 00:06:56 +00:00
Jingning Han
fc18cf7a11 Merge "Move DC only forward 2D-DCT functions to vpx_dsp" 2015-07-29 00:06:37 +00:00
Jingning Han
4b5109cd73 Replace vp9_ prefix in 2D-DCT functions with vpx_
Clean up the forward 2D-DCT function names in vpx_dsp.

Change-Id: I3117978596d198b690036e7eb05fe429caf3bc25
2015-07-28 16:06:44 -07:00
Jingning Han
a7e9178d80 Remove vp9_dct.h file
The forward 32x32 2D-DCT functions are aligned in vpx_dsp folder.
The vp9_dct.h file is not effectively used now.

Change-Id: Ie7946b6fdd784b8e91496242337bc9002c75c281
2015-07-28 15:27:36 -07:00
Aℓex Converse
08d5cf226e Merge "Remove branch in inner loop of foreach_transformed_block_in_plane()" 2015-07-28 21:59:33 +00:00
Aℓex Converse
8191ed8b63 Merge changes If196d9e5,Ib669d572
* changes:
  Simplify is_skippable to point straight to eobs.
  Don't initialize extra context tree buffers for 4x8 and 8x4.
2015-07-28 21:59:02 +00:00
Jingning Han
d19033fa4e Move DC only forward 2D-DCT functions to vpx_dsp
This completes the forward transform functions layout refactoring.

Change-Id: I996fb0fb795f41e2040f7b21db985774098aedbd
2015-07-28 14:52:30 -07:00
Hui Su
fe7cabe8b6 Merge "Move intra prediction functions from vp9/common/ to vpx_dsp/" 2015-07-28 20:41:01 +00:00
Jingning Han
a73f0f4170 Merge "Factor 32x32 fwd DCT to vpx_dsp folder" 2015-07-28 20:36:59 +00:00
Jingning Han
a6a4659bea Factor 32x32 fwd DCT to vpx_dsp folder
Move the 32x32 2D-DCT implementations from vp9/ to vpx_dsp/.

Change-Id: Id3980696f8b69906ff7a59ff9fb2b9013d60047d
2015-07-28 11:13:41 -07:00
Frank Galligan
b1fb6e0365 Fix dspr2 build.
Change-Id: I18895c29d6db872d033b3874de9dcd9501d0c10e
2015-07-28 09:05:41 -07:00
James Zern
ea990af7f5 add vp9_block_error_fp_neon
~60-70% faster depending on the block size

Change-Id: Icdbaa9977a91a63cbcc6ead0cf19d5a2af7f27e1
2015-07-27 19:59:50 -07:00
Yunqing Wang
4f08d3d6c5 Merge "Remove tx_select_threshes" 2015-07-28 01:25:14 +00:00
Jingning Han
8eefb36ca9 Move forward dct sse2 header file to vpx_dsp
Change-Id: Iba03852ce778c956200818e3473cfb2b48cf8d8e
2015-07-27 14:59:57 -07:00
hui su
4013645353 Replace prefix vp9_ with vpx_ for intra prediction functions
Change-Id: I8ae6fb586f8d5d018ace228df11714f82b085076
2015-07-27 13:42:06 -07:00
hui su
7971846a5e Move intra prediction functions from vp9/common/ to vpx_dsp/
Change-Id: I64edc26cf4aab050c83f2d393df6250628ad43b8
2015-07-27 13:38:16 -07:00
Jingning Han
5f214d6bca Use common coefficient definition in neon idct implementations
Replace the duplicate coefficient definition in neon implementations
of inverse transform with those from vpx_dsp/txfm_common.h

Change-Id: I4cd9bd9569ab1793dfdbb6f16d80bcb581599f0d
2015-07-27 12:12:31 -07:00
Yunqing Wang
b2446fb6be Remove tx_select_threshes
Removed unused tx_select_threshes and tx_select_diff.

Change-Id: I5e9e7ad170056efe14b5f071e94d0c5a36e4a34c
2015-07-27 12:02:05 -07:00
Jingning Han
a9a1d4e8e5 Replace vp9_idct.h for precise dependency
This commit replaces vp9_idct.h with txfm_common.h in many SIMD
implementation files for precise file dependency.

Change-Id: If73dd726bb16537e7494f28538b0a169810f9756
2015-07-27 11:55:31 -07:00
Jingning Han
5ebc8febdc Refactor vp9_idct.h file
Separate the common coefficient constant into vpx_dsp/txfm_common.h.
Move the SSE2 macro definitions to vpx_dsp/x86/txfm_common_sse2.h.
This clears the use case of vp9_idct.h in vpx_dsp folder.

Change-Id: I319735a2abf42888e5080ac14cfbcde34be7b121
2015-07-26 08:26:32 -07:00