Commit Graph

3231 Commits

Author SHA1 Message Date
Johann
e022ce84ac Rename vp8 quantize file
BUG=webm:1457

Change-Id: Ie8fae018ad8417724fde087055b90228850d631d
2017-08-11 10:44:36 -07:00
Kaustubh Raste
39e8b8dac6 Fix mips dspr2 6 tap filter clobber list
Change-Id: Ib7c07e6ce00a5c7e59113b16e6661a8369f9e646
2017-08-04 10:56:56 +05:30
Marco
b9577e07fc vp8: Drop due to overshoot for non-screen content.
For 1 pass CBR mode:
Apply the logic for dropping (and re-adjusting rate control)
due to large overshoot to the case of non-screen content when
drop_frames_allowed is enabled.

For the non-screen content case: add additional condition that
rate correction factor is close to minimum state, and flag to
constrain the frequency of the dropping.

Also handle the case of temporal layers and multi-res encoding.
Add some flags/counters to the layer context for temporal layers.
For multi-res: drop due to overshoot is checked on lowest stream,
and if overshoot is detected we force drops on all upper streams
for that frame.

This feature is to avoid large frame sizes on big content
changes following low content period.

No change in behavior for screen_content_mode = 2.

Change-Id: I797ab236cbbf3b15cad439e9a227fbebced632e6
2017-08-02 13:12:48 -07:00
Jerome Jiang
905b8ec27f Merge "vp8: Remove isolated skin & non skin blocks." 2017-07-27 20:24:08 +00:00
Jerome Jiang
56d95b77f5 vp8: Remove isolated skin & non skin blocks.
Neutral on RTC metrics and speed on Pixel.

Change-Id: I26b907483fe133e6e4c1009d147631f0d0e0f2fb
2017-07-26 14:44:36 -07:00
Han Shen
b72d3e8a25 Earmark extra space for VSX.
Backend specific optimization for PPC VSX reads 16 bytes, whereas arm neon /
sse2 only reads <= 8 bytes. Although the extra bytes read are actually never
used, this is not a warrant for groping around.  Fixed by allocating more when
building for VSX. This is reported by asan.

Also note - PPC does have assembly that loads 64-bit content from memory - lxsdx
loads one 64-bit doubleword (whereas lxvd2x loads two 64-bit doubleword) from
memory. However, we only have "vec_vsx_ld" builtins that mapped to lxvd2x, no
builtins to lxsdx. The only way to access lxsdx is through inline assembly,
which does not fit well in the origin paradigm.

Refer:
  vsx:
    vpx_tm_predictor_4x4_vsx @ third_party/libvpx/git_root/vpx_dsp/ppc/intrapred_vsx.c
  neon:
    vpx_tm_predictor_4x4_neon @ third_party/libvpx/git_root/vpx_dsp/arm/intrapred_neon_asm.asm
  sse2:
    tm_predictor_4x4 @ third_party/libvpx/git_root/vpx_dsp/x86/intrapred_sse2.asm

BUG=b/63112600

Tested:
  asan tests passed.

Change-Id: I5f74b56e35c05b67851de8b5530aece213f2ce9d
2017-07-19 13:59:32 -07:00
Jerome Jiang
b0c4d87ac7 vp8: Clean up skinmap debugging codes.
Use the computed skinmap.

Change-Id: I8aabb5922ef5190ec85b9e01807cb79b4803b925
2017-06-23 14:05:33 -07:00
Jerome Jiang
e187b27438 Merge "vp8: Compute skinmap only once before encoding." 2017-06-23 17:17:02 +00:00
James Zern
88a302e743 Merge changes from topic 'missing-proto'
* changes:
  onyxd_int.h: add missing prototypes
  onyxd.h: add vp8dx_references_buffer prototype
  vp[89],vpx_dsp: add missing includes
  vp8,encodeframe.h: correct prototypes
  vp8: add temporal_filter.h
  add picklpf.h
  add ethreading.h
  vp8,bitstream.h: add missing prototypes
  vp8: remove vp8_fast_quantize_b_mmx
  vp8,loopfilter_filters: make some functions static
  vp9_ratectrl: make adjust_gf_boost_lag_one_pass_vbr static
  vp9_encodeframe: make scale_part_thresh_sumdiff static
  vp9_alt_ref_aq: correct vp9_alt_ref_aq_create proto
  tiny_ssim: make some functions static
2017-06-23 05:44:24 +00:00
James Zern
a377f99088 onyxd_int.h: add missing prototypes
vp8cx_init_de_quantizer, vp8_mb_init_dequantizer
quiets -Wmissing-prototypes

Change-Id: Ib63d14caf0144eff31a75b7cdb667b7e1f9d83ae
2017-06-22 20:20:23 -07:00
Jerome Jiang
b28fc490aa vp8: Compute skinmap only once before encoding.
Get ready for other uses (i.e. cyclic refresh).
Then use it when needed.

Change-Id: Id0519a9921045e5fb7f3badb54e9f04e903f28f9
2017-06-22 17:12:15 -07:00
James Zern
7c0788b07f onyxd.h: add vp8dx_references_buffer prototype
quiets -Wmissing-prototypes

Change-Id: I6bee535f3fb67e54a390266d787a5a92127aeadc
2017-06-21 19:00:15 -07:00
James Zern
44418c659f vp[89],vpx_dsp: add missing includes
quiets -Wmissing-prototypes

Change-Id: I841cfc019d592f2bc6b3fec5818051a31f4c53b5
2017-06-21 19:00:15 -07:00
James Zern
b24ed95f44 vp8,encodeframe.h: correct prototypes
+ add missing include
quiets -Wmissing-prototypes

Change-Id: I64af0368ba3d7f1d4de22a5887b631bb2cf15b8a
2017-06-21 19:00:15 -07:00
James Zern
b093d998fc vp8: add temporal_filter.h
quiets -Wmissing-prototypes

Change-Id: Iffa77467720affe030de5335e9335232b9e70af1
2017-06-21 19:00:15 -07:00
James Zern
eb8226b903 add picklpf.h
quiets -Wmissing-prototypes

Change-Id: Ic24164aa1f86fe99a493a633d64606e6f44ecdc1
2017-06-21 19:00:14 -07:00
James Zern
864bc77e7a add ethreading.h
quiets -Wmissing-prototypes in encodeframe.c

Change-Id: Ic216d0bdd6130eac44f2183639a715b2f1088ebe
2017-06-21 19:00:14 -07:00
James Zern
d5d6a609d0 vp8,bitstream.h: add missing prototypes
quiets -Wmissing:prototypes

Change-Id: I835a80eddca2b16280780e18558c321df3272c43
2017-06-21 19:00:14 -07:00
James Zern
1d86383512 vp8: remove vp8_fast_quantize_b_mmx
and vp8_fast_quantize_b_impl_mmx; this was never enabled in rtcd
an sse2 version exists so there isn't much reason to keep a mmx
implementation around.

Change-Id: I8b3ee7f46ba194ffa0d0a6225a0f299f2a4dea90
2017-06-21 19:00:14 -07:00
James Zern
18335f193d vp8,loopfilter_filters: make some functions static
quiets -Wmissing-prototypes

Change-Id: Ie5b00537f64a05e68a38dc558463691523988994
2017-06-21 19:00:14 -07:00
James Zern
fbba31e241 vp8_dx_iface: clear -Wclobbered warnings
with gcc 6.x

Change-Id: Ib2070421603a6777892d4ea01f4b0921696f38b3
2017-06-21 15:09:58 -07:00
Jerome Jiang
bf41a982b4 Merge "Enable 8x8 skin detection for vp8." 2017-06-19 16:42:14 +00:00
Jerome Jiang
a36017e007 Enable 8x8 skin detection for vp8.
If 2 or more 8x8 blocks are identified as skin, the macroblock will be
labeled as skin.

Change-Id: I596542c81a2df9e96270cab39d920bbfeb02bc6e
2017-06-15 20:53:03 -07:00
Marco Paniconi
8b48f68c0d Merge "vp8: Adjust the pred_err threhsold for drop on overshoot." 2017-06-14 15:59:55 +00:00
James Zern
4f9d852759 vp8_skin_detection: add 'vp8_' prefix to public fns
BUG=webm:1438

Change-Id: I5feb31c254d02e116e624cfe702e73ba5a1f7aca
2017-06-12 20:13:28 -07:00
James Zern
98666368ee rename vp8/common/skin_detection.[hc] -> vp8_*
some build systems have trouble with duplicate basenames.
vpx_dsp/skin_detection.[hc] were added in:
658e85425 Merge skin detection code in vp8/9.

BUG=webm:1438

Change-Id: Ieaa70b40bda409ec23e6d179b47a930ac6243b05
2017-06-12 20:13:23 -07:00
Marco
b6e1bdfc76 vp8: Adjust the pred_err threhsold for drop on overshoot.
Change-Id: Ica2a09ac87160936b6f7bd01f167f464ea3ac41c
2017-06-12 09:54:16 -07:00
Jerome Jiang
a46bc0268b Merge "Remove duplication on vp8/9_write_yuv_frame." 2017-06-10 04:50:19 +00:00
Jerome Jiang
ff2d220d21 Remove duplication on vp8/9_write_yuv_frame.
Change-Id: Ib3546032a27c715bf509c0e24d26a189bc829da8
2017-06-09 17:08:26 -07:00
Johann Koenig
65f4299d65 Merge "Remove some dead code. Coverity CID 1310058" 2017-06-09 20:41:57 +00:00
Sylvestre Ledru
c12d1d9b98 Remove some dead code. Coverity CID 1310058
Change-Id: I1186cf1dd8cde42f5970928f43edfc852298289d
2017-06-09 17:56:38 +00:00
James Zern
b3a262dff3 Merge "vp8_decode_frame: fix oob read on truncated key frame" 2017-06-08 23:17:50 +00:00
James Zern
45daecb4f7 vp8_decode_frame: fix oob read on truncated key frame
the check for error correction being disabled was overriding the data
length checks. this avoids returning incorrect information (width /
height) for the decoded frame which could result in inconsistent sizes
returned in to an application causing it to read beyond the bounds of
the frame allocation.

BUG=webm:1443
BUG=b/62458770

Change-Id: I063459674e01b57c0990cb29372e0eb9a1fbf342
2017-06-08 23:16:04 +00:00
Jerome Jiang
658e854252 Merge skin detection code in vp8/9.
BUG=webm:1438

Change-Id: Ie3dc034c7dbb498a0b088a767b1936ddeed4df14
2017-06-07 21:20:34 -07:00
Jerome Jiang
68f035026f vp8 skin detection: Fix visual studio build failure.
Change-Id: I510b755550ebbfa2aaf9b974920d7f1c6454a845
2017-06-01 13:46:46 -07:00
Jerome Jiang
e254969df2 Fix corruption in skin map debugging output yuv.
For both vp8 and vp9.

BUG=webm:1437

Change-Id: Ifd06f68a876ade91cc2cc27c574c4641b77cce28
2017-06-01 16:59:43 +00:00
Jerome Jiang
f1a300acc4 vp8: Clean up skin detection.
Use only the average of center 2x2 pixels in vp8.

Change-Id: I2b23ff19a90827226273e0fca49e90c734eda59b
2017-05-31 14:57:10 -07:00
Jerome Jiang
c39526da8a Write skin map of vp8 skin detection for debug.
Change-Id: Ica1b4e918aa759cd0ce65920f9d88452bbf9e3b4
2017-05-30 10:30:05 -07:00
Jerome Jiang
327c9bb1da Refactor: Move vp8 skin detection to new files.
Change-Id: If760f28cbbf22beac1cc9bd1546f13831e9dd3f0
2017-05-25 16:12:27 -07:00
Johann Koenig
e7cac13016 Merge changes Ib8dd96f7,Ie9854b77
* changes:
  neon variance: process 4x blocks
  use memcpy for unaligned neon stores
2017-05-22 17:48:33 +00:00
Johann
2057d3ef75 use memcpy for unaligned neon stores
Advise the compiler that the store is eventually going to a uint8_t
buffer. This helps avoid getting alignment hints which would cause the
memory access to fail.

Originally added as a workaround for clang:
https://bugs.llvm.org//show_bug.cgi?id=24421

Change-Id: Ie9854b777cfb2f4baaee66764f0e51dcb094d51e
2017-05-17 12:11:31 -07:00
Johann Koenig
2300e16675 Revert "Add visibility="protected" attribute for global variables referenced in asm files."
This reverts commit 0d88e15454.

Reason for revert: chromium builds are failing to locate vpx_rv during dlopen()

dlopen failed: cannot locate symbol "vpx_rv" referenced by "libstandalonelibwebviewchromium.so"

Original change's description:
> Add visibility="protected" attribute for global variables referenced in asm files.
>
> During aosp builds with binutils-2.27, we're seeing linker error
> messages of this form:
> libvpx.a(subpixel_mmx.o): relocation R_386_GOTOFF against preemptible
> symbol vp8_bilinear_filters_x86_8 cannot be used when making a shared
> object
>
> subpixel_mmx.o is assembled from "vp8/common/x86/subpixel_mmx.asm".
> Other messages refer to symbol references from deblock_sse2.o and
> subpixel_sse2.o, also assembled from asm files.
>
> This change marks such symbols as having "protected" visibility. This
> satisfies the linker as the symbols are not preemptible from outside
> the shared library now, which I think is the original intent anyway.
>
> Change-Id: I2817f7a5f43041533d65ebf41aefd63f8581a452
>

TBR=jzern@google.com,johannkoenig@google.com,rahulchaudhry@chromium.org,builds@webmproject.org

Change-Id: I0c2ea375aa7ef5fda15b9d9e23e654bb315c941b
2017-05-16 15:54:33 -07:00
Marco
4a7424adba vp8: Real-time mode: reduce mode_check_freq thresh for speed 10.
Reduces quality regression at speed 10 for real-time mode.

Change-Id: I9f624bea9ca262dab32ce9de7d6d91175d6becc8
2017-05-14 18:19:06 -07:00
Rahul Chaudhry
0d88e15454 Add visibility="protected" attribute for global variables referenced in asm files.
During aosp builds with binutils-2.27, we're seeing linker error
messages of this form:
libvpx.a(subpixel_mmx.o): relocation R_386_GOTOFF against preemptible
symbol vp8_bilinear_filters_x86_8 cannot be used when making a shared
object

subpixel_mmx.o is assembled from "vp8/common/x86/subpixel_mmx.asm".
Other messages refer to symbol references from deblock_sse2.o and
subpixel_sse2.o, also assembled from asm files.

This change marks such symbols as having "protected" visibility. This
satisfies the linker as the symbols are not preemptible from outside
the shared library now, which I think is the original intent anyway.

Change-Id: I2817f7a5f43041533d65ebf41aefd63f8581a452
2017-05-12 11:11:16 -07:00
Jerome Jiang
b82b574e76 Fix compile warnings with enable-internal-stats flag.
BUG=webm:1402

Change-Id: Ibe9ecb1b559a4b989f6ccedbd097e369f6edde1e
2017-04-06 14:00:01 -07:00
James Zern
e05f4cf8f4 intrapred: rename d63f to d63e
this is consistent with he/ve/d45e

Change-Id: I75641ae5667430b0ecd370db86fff6e666cb577d
2017-03-24 20:41:39 -07:00
Marco
deea4ede59 vp8: Fix compiler warning in vp8 pickinter.c
Change-Id: I0e5714538fe53d885a2201d808846901ae8fc288
2017-03-15 11:50:14 -07:00
Johann
ccd23215ed ppc: include ppc.h for ppc_simd_caps()
Change-Id: Idc829eb066cf4e905d062cb9c08424e0f1b7e1a7
2017-03-09 09:26:45 -08:00
Rafael de Lucena Valle
51289302ab Add support for POWER8/VSX
Add ppc, ppc64 and ppc64le on all_platforms and ARCH_LIST

Add VSX flags and check for -mvsx

Define empty setup_rtcd_internal

Add Altivec detection based on:
http://freevec.org/function/altivec_runtime_detection_linux

Detect VSX at runtime when enabled

Change-Id: I304f4d8c5fee0ff19b6483cd2e9cc50d6ddec472
Signed-off-by: Rafael de Lucena Valle <rafaeldelucena@gmail.com>
2017-03-08 20:28:08 +00:00
James Zern
9c3c1f3725 vp8_create_decoder_instances: correct pbi[] memset
clear the entire array on error. the size used previously was equal to
the number of elements.

BUG=webm:1364

Change-Id: I2f2e16ed6e867f41d4774a5a8ac9cedaee11ce46
2017-03-03 15:23:32 -08:00