Commit Graph

117 Commits

Author SHA1 Message Date
Alex Converse
e34c7e3f59 Merge "palette: Replace rand() call with custom LCG." 2015-10-26 17:05:00 +00:00
Alex Converse
171fd8999f palette: Replace rand() call with custom LCG.
The custom LCG is based on the POSIX recommend constants for a 16-bit
rand(). This implementation uses less computation than typical standard
library procedures which have been extended for 32-bit support, is
guaranteed to be reentrant, and identical everywhere.

Change-Id: I3140bbd566f44ab820d131c584a5d4ec6134c5a0
Ref: http://pubs.opengroup.org/onlinepubs/9699919799/functions/rand.html
2015-10-24 13:38:23 -07:00
Jingning Han
caeb10bf06 Use explicit block position in foreach_transformed_block
Add the row and column index to the argument list of unit functions
called by foreach_transformed_block wrapper. This avoids the
repeated internal parsing according to the block index.

Change-Id: Ie7508acdac0b498487564639bc5cc6378a8a0df7
2015-10-23 09:19:17 -07:00
Ronald S. Bultje
dbefcc0609 Merge "vp10: don't allow comp_inter_inter on keyframes." 2015-10-22 21:14:00 +00:00
Ronald S. Bultje
a857728267 Merge "vp10: fix tile size in remuxing step." 2015-10-22 21:12:44 +00:00
Ronald S. Bultje
6a032503ca vp10: don't allow comp_inter_inter on keyframes.
Change-Id: Ibd0e13721a2bb71c532d20b36c42f4cccf5c5de2
2015-10-21 15:19:11 -04:00
Ronald S. Bultje
558d93f3a5 vp10: fix tile size in remuxing step.
Change-Id: Id48fb193bbdb3afed1d0db26c4ddded65a293b1b
2015-10-21 15:19:11 -04:00
Ronald S. Bultje
56cfbeefb4 Merge "vp10: disallow coding zero-sized tiles-in-frame/frames-in-superframe." 2015-10-20 19:58:00 +00:00
Ronald S. Bultje
dec4405cfa vp10: disallow coding zero-sized tiles-in-frame/frames-in-superframe.
See issue 1088.

Change-Id: Icb15d33b4e316add848f210b50cbccd7c7847207
2015-10-20 14:48:31 -04:00
Hui Su
96b69deca5 Merge "VP10: some changes to palette mode" 2015-10-20 16:37:31 +00:00
Ronald S. Bultje
2a388b53f2 vp10: write colorspace info for profile 0 intraonly frames.
See issue 1087.

Change-Id: I231f6f12f870d0a56391daf1673536048418b207
2015-10-19 12:18:57 -04:00
Ronald S. Bultje
60c58b5284 vp10: per-segment lossless coding.
Some more testing of this patch would probably be useful, but I
think the basics of it should work fine now.

See issue 1035.

Change-Id: I4a36d58f671c5391cb09d564581784a00ed26245
2015-10-16 19:30:39 -04:00
Ronald S. Bultje
c7dc1d78bf vp10: add extended-intra prediction edges experiment.
This experiment allows using full above/right edges for all transform
sizes whenever available (for d45/d63), and adds bottom/left edges for
d207.

See issue 1043.

Change-Id: I5cf7f345e783e8539bb6b6d2c9972fb1d6d0a78b
2015-10-16 19:30:39 -04:00
Ronald S. Bultje
1eb51a2010 vp10: allow forward updates for keyframe y intra mode probabilities.
See issue 1040 point 5.

Change-Id: I51a70b9eade39efba392a1457bd70a3c515525cb
2015-10-16 19:30:38 -04:00
Ronald S. Bultje
d8f3bb1837 vp10: merge keyframe/interframe uvintramode/partition probabilities.
This has various benefits:
- simplify implementations because we don't have to switch between
  multiple probability tables depending on frametype
- allows fw subexp and bw adaptivity for partitions/uvmode in keyframes

See issue 1040 point 5.

Change-Id: Ia566aa2863252d130cee9deedcf123bb2a0d3765
2015-10-16 19:30:38 -04:00
Ronald S. Bultje
6e5a1165be vp10: make segmentation probs use generic probability model.
Locate them (code-wise) in frame_context, and have them be updated
as any other probability using the subexp forward and adaptive bw
updates.

See issue 1040 point 1.

TODOs:
- real-world default probabilities
- why is counts sometimes NULL in the decoder? Does that mean bw
  adaptivity updates only work on some frames? (I haven't looked
  very closely yet, maybe this is a red herring.)

Change-Id: I23b57b4e5e7574b75f16eb64823b29c22fbab42e
2015-10-16 19:30:38 -04:00
hui su
17c817adfc VP10: some changes to palette mode
Account for rounding in distortion calculation in k-means;
carry out rounding before duplicates removal of base colors;
replace numbers with macros;
use prefix increment.

Slight coding gain (<0.1%) on screen_content testset.

Change-Id: Ie8bd241266da6b82c7b2874befc3a0c72b4fcd8c
2015-10-16 11:41:26 -07:00
hui su
aaf6f6215f Fix palette mode in multi-thread encoding setting
Fix a couple of memory related errors. Also fix thread test failures.

Change-Id: I0103995f832cecf1dd2380000321ac7204f0cfc0
2015-10-15 15:00:57 -07:00
Yaowu Xu
15cc8bc72f Merge "fix a msvc compiler warning" 2015-10-15 14:39:01 +00:00
Yaowu Xu
8ced62f250 fix a msvc compiler warning
Change-Id: Ifd6581c1bdb8d8f4b2ecf676c1a3d385dc129abf
2015-10-15 01:05:13 +00:00
Yaowu Xu
4727fa2a75 Fix two asan failures
Change-Id: I57865e9604ac162ef0d97deb16e81ca436a98428
2015-10-14 18:03:31 -07:00
Hui Su
fe0396cadc Merge "Fix compiler warnings" 2015-10-13 19:30:33 +00:00
Hui Su
b9e31b5163 Merge "VP10: Add palette mode part 1" 2015-10-13 17:34:27 +00:00
hui su
6f31722950 Fix compiler warnings
Change-Id: I761256a8100d83abf1b937f3739580237e3fad2a
2015-10-13 10:33:17 -07:00
Ronald S. Bultje
00170953b1 vp10: allow forward updates for uv_mode probabilities.
See issue 1040 point 4.

Change-Id: I79e06bd71a27f45770c760c47dc71bc3767a77a0
2015-10-12 17:51:01 -04:00
Ronald S. Bultje
5f589826f3 vp10: allow bw adaptivity for skip/tx probabilities in keyframes.
See issue 1040 point 3.

Change-Id: Ieef6d326b7fb50ceca5936525b7c688225a11fd1
2015-10-12 17:51:01 -04:00
Ronald S. Bultje
fee146e60b vp10: don't write tile size marker bit if CONFIG_MISC_FIXES=0.
Change-Id: I41b13b8767e30da391c2c4da9a729ca7292b16b9
2015-10-12 17:50:57 -04:00
Ronald S. Bultje
5b4805d6e9 vp10: remove clamp_mv2() call from vp10_find_best_ref_mvs().
This actually has no effect whatsoever, since the input MVs themselves
are clamped by clamp_mv_ref() already, which is significantly more
restrictive in its bounds.

Change-Id: I4a3a7b2b121ee422c56428c2a12d930c3813c06e
2015-10-12 14:45:18 -04:00
Ronald S. Bultje
2e45ce1493 vp10: update assertion/allocation for tokens.
We only write EOSB tokens if we write tokens (i.e. not for skip blocks),
and we write EOSB tokens per-plane instead of per block.

Change-Id: I8d7ee99f8ec50eb7ae809f9f9282c1c91dbf6537
2015-10-12 14:45:18 -04:00
hui su
5d011cb278 VP10: Add palette mode part 1
Add palette mode for keyframe luma channel. Palette mode is enabled
when using "--tune-content=screen" in encoding config parameters.

on screen_content testset:  +6.89%
on derlr                 :  +0.00%

Design doc (WIP):
https://goo.gl/lD4yJw

Change-Id: Ib368b216bfd3ea21c6c27436934ad87afdaa6f88
2015-10-12 10:02:17 -07:00
Ronald S. Bultje
177e7b53e7 vp10: use subexp probability updates for MV probs.
See issue 1040 point 2.

Change-Id: I0b37fe74be764610696620f1fe296dc74e4806d7
2015-10-05 20:58:32 -04:00
Ronald S. Bultje
3461e8ce64 vp10: skip unreachable cat6 token extrabits.
We have historically added new bits to cat6 whenever we added a new
transform size (or bitdepth, for that matter). However, we have
always coded these new bits regardless of the actual transform size,
which means that for smaller transforms, we code bits that cannot
possibly be set. The coding (quality) impact of this is negligible,
but the bigger issue is that this allows creating bitstreams with
coefficient values that are nonsensible and can cause int overflows,
which then de facto become part of the bitstream spec. By not coding
these bits, we remove this possibility.

See issue 1065.

Change-Id: Ib3186eca2df6a7a15ddc60c8b55af182aadd964d
2015-10-05 20:58:32 -04:00
Ronald S. Bultje
7460798ba5 vp10: use superframe marker index/size mechanism for tile size.
See issue 1042. Should provide slight bitstream savings in most cases
where tiles are being used.

Change-Id: Ie2808cf8ef30b3efe50804396900c4d63a3fa026
2015-10-05 20:58:32 -04:00
Ronald S. Bultje
612104bb8d vp10: extend range for delta Q values.
See issue 1051. 6 bits is fairly arbitrary but at least allows writing
delta Q values that are fairly normal in other codecs. I can extend to
8 if people want full range, although I personally don't have any need
for that.

Change-Id: I0a5a7c3d9b8eb3de4418430ab0e925d4a08cd7a0
2015-10-05 20:58:32 -04:00
Ronald S. Bultje
ce3780251c vp10: make render_width/height referenceable through ref frames.
See issue 1079.

Change-Id: I754a61ec011c3508bbb26826cf8e11dbdfdd8379
2015-10-02 13:39:38 -04:00
Angie Chiang
e40a448e45 Merge "comment out fdct32" 2015-09-28 17:26:22 +00:00
Ronald S. Bultje
cc5dd3ec10 Merge "vp9/10: improve support for render_width/height." 2015-09-28 16:25:28 +00:00
Ronald S. Bultje
3db5721e21 Merge "Rename display_{size,width,height} to render_*." 2015-09-28 16:25:20 +00:00
Ronald S. Bultje
7238492235 Merge "vp10: code reference_mode in uncompressed header." 2015-09-28 16:23:11 +00:00
Ronald S. Bultje
812945a8f1 vp9/10: improve support for render_width/height.
In the decoder, map this to the output variable vpx_image_t.r_w/h.
This is intended as an improved version of VP9D_GET_DISPLAY_SIZE,
which doesn't work with parallel frame decoding. In the encoder,
map this to a codec control func (VP9E_SET_RENDER_SIZE) that takes
a w/h pair argument in a int[2] (identical to VP9D_GET_DISPLAY_SIZE).

Also add render_size to the encoder_param_get_to_decoder unit test.

See issue 1030.

Change-Id: I12124c13602d832bf4c44090db08c1009c94c7e8
2015-09-25 22:18:22 -04:00
James Zern
db2056f341 Merge "vp9/10 encoder: prevent NULL access on failure" 2015-09-26 01:52:52 +00:00
Ronald S. Bultje
36ffe64498 Rename display_{size,width,height} to render_*.
The name "display_*" (or "d_*") is used for non-compatible information
(that is, the cropped frame dimensions in pixels, as opposed to the
intended screen rendering surface size). Therefore, continuing to use
display_* would be confusing to end users. Instead, rename the field
to render_*, so that struct vpx_image can include it.

Change-Id: Iab8d2eae96492b71c4ea60c4bce8121cb2a1fe2d
2015-09-25 21:34:29 -04:00
Ronald S. Bultje
fcd6414e77 Merge "vp10: remove MACROBLOCK.{highbd_,}itxfm_add function pointer." 2015-09-26 01:20:14 +00:00
Ronald S. Bultje
690f662e26 Merge "vp10: remove MACROBLOCK.fwd_txm4x4 function pointer." 2015-09-26 01:19:49 +00:00
Angie Chiang
6a382101dd comment out fdct32
comment out fdct32
remove fdct32 test

Change-Id: I31c47fb435377465cd3265e39621ca50d3aae656
2015-09-25 18:18:27 -07:00
Ronald S. Bultje
8979e9e387 vp10: code reference_mode in uncompressed header.
See issue 1041 point 2.

Change-Id: I6fc6427b1a0edff828e39d43428e3271491f8ac5
2015-09-25 20:32:14 -04:00
Ronald S. Bultje
bab8d38f7f vp10: remove MACROBLOCK.{highbd_,}itxfm_add function pointer.
This is preparatory work for allowing per-segment lossless coding.

See issue 1035.

Change-Id: I9487d02717ee3e766aee61a487780056bb35d2d3
2015-09-25 19:30:46 -04:00
Ronald S. Bultje
c74b33a413 vp10: remove MACROBLOCK.fwd_txm4x4 function pointer.
This is preparatory work for allowing per-segment lossless coding.

See issue 1035.

Change-Id: Idd72e2a42d90fa7319c10122032d1a7c7a54dc05
2015-09-25 19:30:46 -04:00
James Zern
cf8f6559ce vp9/10 encoder: prevent NULL access on failure
Change-Id: I1fc8e0b3d48675cd5428b7b36f7cc28ab32cbf71
2015-09-23 17:55:51 -07:00
James Zern
e7c8b71a86 Revert "remove static from fdct4/8/16/32"
This reverts commit 8903b9fa83.

there is no reason for these to be global

Change-Id: I66a31c06f8426aeca348ef12d9b9ab59d6d5e55d
2015-09-23 17:45:57 -07:00