Compare commits

...

425 Commits

Author SHA1 Message Date
Yongzhe Wang
f708a843b7 enabled alternative transform for inter blocks using ADST_ADST.
DST 32X32 included but not used.

Change-Id: I0183c48a7b43087562a9f048360c139414ec54e0
2014-04-30 17:32:26 -07:00
Yue Chen
a2d6abacf7 Migrating expts from experimental into playground
Migrates experiments from expeirmental to playground.
Included experiments are FILTERINTRA, MASKED_INTERINTER, INTERINTRA
and MASKED_INTERINTRA. Bugs in masked sub-pixel variance calculation
and masked sub-pixel motion search are fixed. Recursive filters for
intra prediction are upgraded to 4-tap filters.

Change-Id: I9964a7ebfefc1efa70bb66be7b35d975c3f66e23
2014-04-11 14:46:40 -07:00
Jingning Han
89b6d40690 Replace cpi->common with cm in vp9_onyx_if
Replace repeated cpi->common fetching with cm variable in a few
places in vp9_onyx_if.c

Change-Id: Ifa16d617f37919b2e0baf8efb256130a647b5eb3
2013-12-18 12:31:41 -08:00
Jingning Han
ae0e383d35 Merge "Make rd_pred_filter update consistent in all bsizes" 2013-12-18 12:31:35 -08:00
Jingning Han
d8557a052c Make rd_pred_filter update consistent in all bsizes
This commit reworks the prediction filter rate-distortion cost update
process consistent for all block sizes.

Change-Id: I5874349ab38df380240f96c2d4ef924072bab68d
2013-12-18 11:54:31 -08:00
Yaowu Xu
f71f581ba2 Merge "Added a test vector that exercises lpf deltas" 2013-12-18 11:41:56 -08:00
Marco Paniconi
02d5ebcfdc Merge "Updates for 1-pass CBR rate control." 2013-12-18 10:28:33 -08:00
Yaowu Xu
2424ba3d8b Added a test vector that exercises lpf deltas
From frame 2, the lpf deltas are all cleared for for even frames, and
a set of values are set and used for odd frames. The intention is to
exercise decoding code around lpf delta/update decoding.

Change-Id: Ic9ff1bc2c2a023f4805852f8573398f2ec2249d7
2013-12-18 10:08:39 -08:00
Marco Paniconi
1b8b8b0d0d Updates for 1-pass CBR rate control.
Adjustments based on buffer level, frame dropper.

Change-Id: Iaa85b570493526a60c4b9fb7ded4c0226b1b3a33
2013-12-18 09:24:24 -08:00
Johann
bb12bbaefb Merge "Fix incorrect size reading" 2013-12-17 21:26:50 -08:00
Johann
b46da98f3a Merge "Only exclude VP8 when it is included" 2013-12-17 21:26:44 -08:00
Frank Galligan
05d5332407 Merge "Increase required number of external frame buffers" 2013-12-17 21:20:34 -08:00
Jim Bankoski
9d754dcca8 Merge "rename loop filter functions" 2013-12-17 18:56:09 -08:00
Johann
85770264ac Fix incorrect size reading
Guard against incorrect size values moving *data past data_end.

Check read length against the difference of the buffers.

Change-Id: Ie0b54e2db517fd41a0f3ceb23402ee44839a4739
2013-12-17 18:48:55 -08:00
Johann
af416c4daf Only exclude VP8 when it is included
If configured with --disable-vp8 kVP8TestVectors is undefined.

Change-Id: I9d83e805923977ab057ab48042580ce0d817ba68
2013-12-17 18:27:04 -08:00
James Zern
ea8482fe74 Merge "Add external constants." 2013-12-17 18:20:31 -08:00
Frank Galligan
9e41d569d7 Increase required number of external frame buffers
Make applications pass in VPX_MAXIMUM_WORK_BUFFERS as well as
VP9_MAXIMUM_REF_BUFFERS.

Change-Id: I9c07ce83fa19c90ed43227b801b2013690e81edd
2013-12-17 17:34:36 -08:00
Jim Bankoski
b720ba165f rename loop filter functions
This renames all the loop filter functions so that they no
longer refer to mb

Change-Id: I8a58a8c7fd253d835cb619bde13913e896ece90b
2013-12-17 17:34:34 -08:00
Frank Galligan
bbf53047b0 Add external constants.
Change-Id: I8d329513c87bd8622306aba27c83bf04ef170fa4
2013-12-17 17:28:23 -08:00
Yaowu Xu
ede392d765 Merge changes I5d28c2f5,Ib00b036f
* changes:
  Remove redundant function and calls
  Add test for partial inverse transforms
2013-12-17 16:57:01 -08:00
Dmitry Kovalev
c6a1ff223b Merge "Calling is_inter_block() only if mbmi is available." 2013-12-17 16:10:56 -08:00
Yaowu Xu
ed90a176af Remove redundant function and calls
lf deltas are later setup in function vp9_setup_past_independence(),
so this commit removed the redundant copy. Also renamed a function
to better align the behavior of the funciton.

Change-Id: I5d28c2f5b12b3d31817e14296ed4605c1fd5c98c
2013-12-17 15:44:25 -08:00
Dmitry Kovalev
eb0c73b6e0 Merge "Converting mode_lf_lut struct member into static lookup table." 2013-12-17 15:20:05 -08:00
Yaowu Xu
ed7e3d2447 Add test for partial inverse transforms
To make sure the results they produce to match their full versions

Change-Id: Ib00b036fecf43fe20af716acfc580af18ef87757
2013-12-16 22:01:02 -08:00
James Zern
0f512788c8 {,vpx_scale}: normalize include guards
Change-Id: Ib8aafeee30d59521ee256dc1801e0db6b4b8a371
2013-12-16 19:41:13 -08:00
James Zern
d2f4940783 vpx_ports: normalize include guards
Change-Id: I4e931aadecfe1761c720b080bdd67a1875794979
2013-12-16 19:41:10 -08:00
James Zern
941e0b6150 vpx_mem: normalize include guards
Change-Id: Iac433b5823c572cfa79e5b6b839cd40b49c0389c
2013-12-16 19:41:07 -08:00
James Zern
7386bde9d2 vpx: normalize include guards
Change-Id: Iee670353cffa1f9e97976ac507ad9519e5dda7f7
2013-12-16 19:41:05 -08:00
James Zern
bb28520891 vp8/encoder: normalize include guards
Change-Id: I82834550503a43ff7ec8422342dc65136453b287
2013-12-16 19:41:01 -08:00
James Zern
074dc67277 vp8/decoder: normalize include guards
Change-Id: Ifa7934927cc8461cd58ca0b05bf76533abd78cb6
2013-12-16 19:40:58 -08:00
James Zern
e903cacf5b vp8/common: normalize include guards
Change-Id: Ia8789a8f864e0edc0bf94f00f6430846f86911c3
2013-12-16 19:40:54 -08:00
James Zern
bd9a388a06 vp9: normalize include guards
Change-Id: If4ddbdcfb3ab387cbca6910b42cf4df8111e6879
2013-12-16 19:40:49 -08:00
Johann
ccffac2b06 Merge "Avoid mixed comparison" 2013-12-16 19:17:57 -08:00
Johann
83baed0b6b Merge "Add const to match declaration" 2013-12-16 19:17:43 -08:00
Johann
3df4d9f62d Merge "Include files in the same directory directly" 2013-12-16 19:17:33 -08:00
Yaowu Xu
1f919cf27d Merge "Define POSITION to differentiate from MV" 2013-12-16 18:21:55 -08:00
Yaowu Xu
36c4e27454 Merge "Move two functions to encoder" 2013-12-16 18:09:51 -08:00
Jingning Han
07a28c77e3 Merge "Fix rd_filter_cache update in sub8x8 RD loop" 2013-12-16 17:57:02 -08:00
Jingning Han
ef838c349c Merge "Remove redefinition in handle_inter_mode" 2013-12-16 17:56:41 -08:00
Deb Mukherjee
9a005c994c Merge "Rate control changes on active_worst_quality" 2013-12-16 17:40:30 -08:00
Yaowu Xu
3cce464342 Define POSITION to differentiate from MV
MV struct was ussed to indicate the postition of a MI_BLOCK with row
and col components. The expression was confusing, this commit added a
new stucture "POSITION" with row and col component to better describe
the position of a mi_block.

Change-Id: I59fdd4b45010fe7d85a8db22a55503265c4f5b2b
2013-12-16 17:28:00 -08:00
Yaowu Xu
50ec6311e6 Move two functions to encoder
As they are used by encoder only.

Change-Id: I7b1e6955b218aba66fe156523521a8121c9a84a4
2013-12-16 17:27:48 -08:00
Yaowu Xu
e71985632e Merge "Added a test vector" 2013-12-16 17:27:37 -08:00
Deb Mukherjee
1e59cbf23b Rate control changes on active_worst_quality
Various cleanups and refactoring.
Removes feedback of active worst qaulity and uses last_q
instead to make the interface cleaner. Active worst quality
is now decided only once for a frame being coded in the
beginning based on last_q and other stats. Also, adds other
cleaups on last_q to store also the last_q for altref frames,
and reduces the altref interval a little.

The output does change a little.
derfraw300: +0.224% (global psnr)
stdhdraw250: +0.442% (global psnr)

Change-Id: Ie634cdc032697044c472dd0fe79c109b3e7f9767
2013-12-16 17:08:16 -08:00
Dmitry Kovalev
3755be94ed Merge "Using MV struct instead of int_mv union in encoder (2)." 2013-12-16 16:56:07 -08:00
Yaowu Xu
a3e919a4ba Added a test vector
The added vector was encoded with aq mode on, with the intent to
exercise the decode code around segment feature.

Change-Id: Iedcb7261e87d3e11b25ecf031d3a69385271148e
2013-12-16 15:48:04 -08:00
Johann
332169d39c Avoid mixed comparison
Silences warning C4018: '>' : signed/unsigned mismatch

Change-Id: I07d34060043e8ada7d995ea6dc8276cb881c7d95
2013-12-16 15:46:11 -08:00
Johann
5894e7ef50 Add const to match declaration
The definition fell out of sync in
I7d2fda72de5fc27e86c6589543b41fa044681dbf

Change-Id: I3ce3f6ba96bb121f51efaa08f64a69ad9f731a9e
2013-12-16 15:46:11 -08:00
Johann
e883c7478d Include files in the same directory directly
Change-Id: I56706a8326d9356a6735d13eb5e0832d04221c91
2013-12-16 15:46:05 -08:00
Dmitry Kovalev
bb7b4bad6d Merge "Getting rid of b_{width, height}_log2 calls in non-420 loop filter." 2013-12-16 15:10:25 -08:00
Dmitry Kovalev
865d5b83f2 Calling is_inter_block() only if mbmi is available.
Modifying vp9_get_intra_inter_context(), vp9_get_reference_mode_context(),
vp9_get_pred_context_single_ref_p1(), vp9_get_pred_context_single_ref_p2()
functions.

Change-Id: Ifaa2c3eb0c76a544ae8bd1fe3155aada266eae78
2013-12-16 15:09:33 -08:00
Jingning Han
75cfadbd1f Fix rd_filter_cache update in sub8x8 RD loop
Properly handle the rd_filter_cache update, when early termination
or skip prediction filter type check is triggered.

Change-Id: Ie7b9a75fed3358f45ffd15817f2b36670c14eb2d
2013-12-16 14:52:20 -08:00
hkuang
fb53409d2a Merge "Remove border extension in intra frame prediction." 2013-12-16 14:48:54 -08:00
Dmitry Kovalev
b1d821704b Merge "Yet another vp9_pred_common.c cleanup." 2013-12-16 14:10:52 -08:00
Dmitry Kovalev
4f0a381b49 Merge "Reusing nmv_frame_counts from FRAME_COUNTS in encoder." 2013-12-16 14:10:13 -08:00
hkuang
25e5552630 Remove border extension in intra frame prediction.
Change-Id: Id677df4d3dbbed6fdf7319ca6464f19cf32c8176
2013-12-16 14:05:58 -08:00
Dmitry Kovalev
1a23a34419 Merge "Cleaning up encode_sb() and encode_b() functions." 2013-12-16 12:21:38 -08:00
Dmitry Kovalev
f00d4e0198 Merge "Removing unnecessary assert(delta != 0) from encode_loopfilter()." 2013-12-16 11:41:36 -08:00
Deb Mukherjee
4a535efcfd Change in data rate test to be less stringent
Makes the thresholds for bitrate control more leniant to
prevent test failures.

Change-Id: I535c1565174a8a46493b033531eb40360def883b
2013-12-16 09:29:37 -08:00
Frank Galligan
fbada948fa Add frame buffer lru cache.
Add an option for libvpx to return the least recently used
frame buffer.

Change-Id: I886a96ffb94984f1c42de53086e0131922df3260
2013-12-15 19:57:42 -08:00
Frank Galligan
d0ee1fd797 Merge "Add support to pass in external frame buffers." 2013-12-15 19:18:25 -08:00
Frank Galligan
10f891696b Add support to pass in external frame buffers.
VP9 decoder can now use frame buffers passed in by the application.

Change-Id: I599527ec85c577f3f5552831d79a693884fafb73
2013-12-15 18:45:46 -08:00
Dmitry Kovalev
4d2d1591a3 Converting mode_lf_lut struct member into static lookup table.
Change-Id: I6e6c7cb5ff5b60fbe6a7c314daec5ccdc2cafcc3
2013-12-14 17:42:12 -08:00
Dmitry Kovalev
2aadc06e0d Yet another vp9_pred_common.c cleanup.
Change-Id: I617d6c610d181076773c5c3d6f3dbc6717b02580
2013-12-14 17:39:24 -08:00
James Zern
c5aaf923d8 webmdec/tests: fix leak when file isn't read to eof
the nestegg packet was only freed by subsequent reads

Change-Id: Ib687a13907861c7575830783e47a596d85169cf1
2013-12-13 19:06:21 -08:00
Dmitry Kovalev
b41574e379 Removing unnecessary assert(delta != 0) from encode_loopfilter().
Change-Id: I8ae093d0b61d71d3c294b95d98d0178f7f67c8f6
2013-12-13 18:05:15 -08:00
Dmitry Kovalev
095b03231c Using MV struct instead of int_mv union in encoder (2).
Change-Id: I068345f722a7116e3119927295ad23a28d3066a0
2013-12-13 17:20:40 -08:00
Dmitry Kovalev
64cf398713 Merge "Using MV struct instead of int_mv union in encoder." 2013-12-13 16:42:54 -08:00
Dmitry Kovalev
33df4f0483 Merge "vp9_convole.c cleanup." 2013-12-13 15:40:00 -08:00
Dmitry Kovalev
f54b515797 Merge "Cleaning up vp9_append_sub8x8_mvs_for_idx()." 2013-12-13 15:38:53 -08:00
Dmitry Kovalev
25da21b14e Using MV struct instead of int_mv union in encoder.
Change-Id: I8b81a3e4b4fa530a654c28d9c136afa0c1d379fd
2013-12-13 15:24:48 -08:00
Yunqing Wang
d4b500d9d7 Merge "Increase disable_filter_search_var_thresh threshold" 2013-12-13 15:11:17 -08:00
Jingning Han
84acc988eb Remove redefinition in handle_inter_mode
Change-Id: I44513b9db6d42e2c52723e1a429f06a93d300c8b
2013-12-13 13:38:05 -08:00
Dmitry Kovalev
466cc94e7a Getting rid of b_{width, height}_log2 calls in non-420 loop filter.
Using num_{4x4, 8x8}_blocks_{wide, high}_lookup instead.

Change-Id: I66a7ab807fa57395253b2d0e636c2479fa8c4adf
2013-12-13 12:53:41 -08:00
James Zern
ec79db6086 Merge "obj_int_extract: fix compile warning" 2013-12-13 12:47:19 -08:00
James Zern
3aa75bcef6 Merge "vp9 asserts: fix compile warning" 2013-12-13 12:41:31 -08:00
Jingning Han
a793cf953f Merge "Rename so -> scan_order in vp9_encodemb.c" 2013-12-13 12:14:48 -08:00
Dmitry Kovalev
df13e01665 Merge "Renaming treed_write() to vp9_write_tree()." 2013-12-13 11:19:04 -08:00
Dmitry Kovalev
15a23c8131 Merge "zz_motion_search() cleanup." 2013-12-13 11:18:13 -08:00
Dmitry Kovalev
33859ad8e3 Merge "Moving mi configuration loop from vp9_read_mode_info to set_offsets." 2013-12-13 11:16:59 -08:00
Jingning Han
2f9d118f21 Merge "Remove some dead code" 2013-12-13 11:10:39 -08:00
Jingning Han
930ae71ef0 Rename so -> scan_order in vp9_encodemb.c
Change-Id: I7ff2899ea18a55b37f5c581431ef59806f01e009
2013-12-13 11:06:23 -08:00
Yunqing Wang
da9f55c3fb Increase disable_filter_search_var_thresh threshold
Increased threshold(t) for interp filter search. This sped up the
encoder with some PSNR loss.

Borg tests were ran at speed 2.
t = 100, PSNR loss:
-0.710%(derf); -0.561%(stdhd); -0.647%(youtube)
speedup:
9%(derf); 3%(stdhd); 5.7%(youtube)

t = 500, PSNR loss:
-1.687%(derf); -1.665%(stdhd); -1.664%(youtube)
speedup:
18%(derf); 10%(stdhd); 8%(youtube)

Change-Id: I180e3657c1e156aaa88dc7c437f8bcbd19f5caba
2013-12-13 10:47:14 -08:00
Adrian Grange
2ec473bb0a Merge "Set rc_2pass_vbr_maxsection_pct to correct value" 2013-12-13 10:30:46 -08:00
Jingning Han
8b73296d7b Merge "Enable adaptive pred filter type for sub8x8" 2013-12-13 09:34:24 -08:00
Adrian Grange
15cf59605f Set rc_2pass_vbr_maxsection_pct to correct value
Corrected a typo that set rc_2pass_vbr_minsection_pct to
two different values on consecutive lines. Second line
should have set rc_2pass_vbr_maxsection_pct.

Change-Id: Ie07ac67cd5455afe556bef34da8127304db9c97c
2013-12-13 08:50:13 -08:00
Dmitry Kovalev
e121bf4c1d Moving mi configuration loop from vp9_read_mode_info to set_offsets.
set_offsets() is a right place to configure all mi-related pointers.

Change-Id: I7d2fda72de5fc27e86c6589543b41fa044681dbf
2013-12-12 19:56:30 -08:00
James Zern
178db94cd6 vp9 asserts: fix compile warning
string literal to int within an assert

Change-Id: I0c889256b67a078e6e2a79577f0b7ae084243258
2013-12-12 19:49:19 -08:00
James Zern
934f0fbbcb obj_int_extract: fix compile warning
string literals should be returned as const char*

Change-Id: Iaab98711ed22f9c6eff1ca922c0576a1ff93a58f
2013-12-12 19:43:01 -08:00
Jingning Han
3b5a90bd86 Enable adaptive pred filter type for sub8x8
This commit enables an adaptive prediction filter type selection
for sub8x8 block sizes. In speed 1, it re-uses the filter type of
collocated 8x8 block if it is tested in the rate-distortion optimization
loop, for the sub8x8 blocks. Otherwise, it runs the normal test
over all the three filter types. In speed 2, it re-uses the 8x8
block's prediction filter type, if available. Otherwise, force it
to be EIGHTTAP.

Compression and speed performance wise:
speed 1
derf -0.266%
yt   -0.138%

bus at 2000 kbps: 33766ms -> 30451ms (10% speed-up)
football at 600 kbps: 48173ms -> 43786ms (9% speed-up)

speed 2
derf -0.026%
yt   +0.134%

bus at 2000 kbps: 18973ms -> 17698ms (6% speed-up)
football at 600 kbps: 26748ms -> 25096ms (6% speed-up)

Change-Id: I77e097533b969fd3472147225fa79fc98095d342
2013-12-12 17:54:34 -08:00
James Zern
c2634188ce Merge "test-data.sha1: add missing sha1sums" 2013-12-12 11:57:10 -08:00
Dmitry Kovalev
52bf93479c zz_motion_search() cleanup.
Change-Id: I4991bc36e1627bd3a9495ca72c0738f1a937da2e
2013-12-12 11:18:17 -08:00
Dmitry Kovalev
629fb85f17 vp9_convole.c cleanup.
Making overall logic more clear, moving "hacked" calculation of base filter
array pointer to get_filter_base() function.

Change-Id: Ibbd38a9f937e48d35bbbfef3ad933ab36664cccb
2013-12-12 11:14:06 -08:00
Frank Galligan
38536f6b1c Cleanup copyright headers.
Change-Id: I7ff2b18e085f3fffaa7f25d40e4e50427b808f43
2013-12-12 08:36:34 -08:00
Frank Galligan
802fc78bd7 Merge "Move test vector list into a separate header." 2013-12-12 08:28:48 -08:00
Frank Galligan
994a552c09 Merge "Add pre decode frame hook to decoder test class." 2013-12-12 08:26:43 -08:00
Frank Galligan
52b2d50db4 Move test vector list into a separate header.
Change-Id: I36f9033492f12fda7f9ce0e7a97a009aab9aab57
2013-12-11 23:15:39 -08:00
James Zern
1586bbf7f1 test-data.sha1: add missing sha1sums
vp90-2-02-size-lf-1920x1080.webm{,.md5} were added in:
ebb583d Add a test vector for loopfilter

Change-Id: I021808338935932cb742ea2621b94f44f22e3037
2013-12-11 19:19:39 -08:00
Dmitry Kovalev
2a6c7a1a9b Merge "Little cleanup in vp9_encode_block_intra()." 2013-12-11 17:58:02 -08:00
Deb Mukherjee
7edd5170b5 Merge "Changes interfaces to vp9_get_compressed_data fn" 2013-12-11 15:50:40 -08:00
Dmitry Kovalev
1b92ab0ecb Little cleanup in vp9_encode_block_intra().
Change-Id: Ibfe04b920648e15bf7116f4fdc98960572a7007e
2013-12-11 15:26:45 -08:00
Dmitry Kovalev
efe5b28c09 Reusing nmv_frame_counts from FRAME_COUNTS in encoder.
Change-Id: Iadf2fcc9a5bfa5d02fc166f31963be1cc814831c
2013-12-11 15:16:10 -08:00
Jingning Han
a4ccfadcc2 Merge "Rename clamp_mv_min_max to set_mv_search_range" 2013-12-11 14:45:06 -08:00
Dmitry Kovalev
b8dc52f4a3 Cleaning up encode_sb() and encode_b() functions.
Trying to make encode_sb() more similar to write_modes_sb() and
decode_mode_sb() because essentially all branching logic should be the
same.

Change-Id: Ib7dec7b48fce29418142abad4d1dcfdb1c770735
2013-12-11 14:38:22 -08:00
Dmitry Kovalev
e79103166f Merge "Renames for consistency in vp9_pred_common.{c, h} files." 2013-12-11 14:30:44 -08:00
Yaowu Xu
3897de6098 Merge "Reduce the number of frames used in lossless test" 2013-12-11 14:26:11 -08:00
Deb Mukherjee
e33855cc47 Changes interfaces to vp9_get_compressed_data fn
Silences some lint warnings in previous patches

Change-Id: I04bf47ebe7e63a95fd322719a3154e589c115d78
2013-12-11 14:22:51 -08:00
Jingning Han
9d6e7ce12d Rename clamp_mv_min_max to set_mv_search_range
This function sets the motion search range limit. Rename it to be
more informative.

Change-Id: I2e8e01073dcb99c9bea9c9acd0a61d672d615444
2013-12-11 14:00:08 -08:00
Jingning Han
cf83dfb283 Merge "Enforce motion search range clamp for sub8x8" 2013-12-11 13:51:32 -08:00
Yaowu Xu
d62af81f6a Reduce the number of frames used in lossless test
Change-Id: I976f70b640b06f20533ad29578a5b2acca134fd4
2013-12-11 13:45:07 -08:00
hkuang
9460226acd Merge "Fix valgrind error." 2013-12-11 13:22:32 -08:00
hkuang
1339f3842c Fix valgrind error.
Temporarily change memcpy to memmove.

Change-Id: I700a197bc1ce496be1ddad7118429c5da465b0ca
2013-12-11 13:21:28 -08:00
James Zern
dce5b82f12 Merge "vp8: remove 2 unused tables" 2013-12-11 13:16:41 -08:00
Adrian Grange
1f07e804f0 Merge "Fix the printf format string" 2013-12-11 12:50:04 -08:00
Jingning Han
a67e654b6c Enforce motion search range clamp for sub8x8
This commit constrains the maximal motion search range for sub8x8
blocks to be [-1023, 1023], in the unit of full pixel.

Change-Id: I955b60649364ab410f2453cafd46a496f2fcb43e
2013-12-11 10:59:27 -08:00
Adrian Grange
8af3e6507e Fix the printf format string
There were two problems with the format string in
the conditionally compiled print statement. It referred
to a variable that is no longer available and it used
incorrect format specifiers.

Change-Id: I315e22bea2691bb535a2e33f5ca206fc55287a37
2013-12-11 10:47:59 -08:00
Frank Galligan
f9d69bd0fd Add pre decode frame hook to decoder test class.
Adds a hook that derived test classes can implement to be notified
before every call to decode a frame.

Change-Id: Iefa836459cf3e5d7df9ee27f8198daf82b1be088
2013-12-11 08:58:21 -08:00
James Zern
3d7cc9d2d1 vp8: remove 2 unused tables
Change-Id: Ib5ba4e0b438107741efa28251848306322fd7f89
2013-12-10 21:13:21 -08:00
James Zern
345fbfef06 vp9 mt decode: reorder tile decode
reorder the tiles based on size and their presumed complexity. this
minimizes the cases where the main thread is waiting on a worker to
complete.

Change-Id: Ie80642c6a1d64ece884f41683d23a3708ab38e0c
2013-12-10 18:33:27 -08:00
Dmitry Kovalev
3274fc30ee Renames for consistency in vp9_pred_common.{c, h} files.
Change-Id: Icba06e84ca55c419abbacedf5825eeb394a1b140
2013-12-10 18:31:46 -08:00
Dmitry Kovalev
021a15fe9f Renaming treed_write() to vp9_write_tree().
Making name consistent with vp9_read_tree().

Change-Id: Ie213ffe0d5345bf3035f28e17f610894fec79205
2013-12-10 18:13:29 -08:00
Dmitry Kovalev
098d13ba10 Cleaning up vp9_append_sub8x8_mvs_for_idx().
Replacing if-else with switch statement, reordering function arguments.

Change-Id: I4825d2ef311ba8999b6d4ceb0eef003587a13434
2013-12-10 17:56:53 -08:00
Yaowu Xu
014b9c70f7 Merge "Fix a bug" 2013-12-10 16:06:42 -08:00
Dmitry Kovalev
1048a7e314 Merge "Cleaning up skip context calculation." 2013-12-10 15:00:22 -08:00
Dmitry Kovalev
bcee73f7ae Merge "Cleaning up read_inter_block_mode_info() function." 2013-12-10 14:59:36 -08:00
Guillaume Martres
020a1e7006 Merge "avoid crash when using --best on cpus with SSE3 (but not SSE4) support" 2013-12-10 14:49:10 -08:00
Yaowu Xu
e0f82c6ed6 Fix a bug
In evaluating partition split case, Wrong partition size is used in
calling partition_plane_context(). This commit change to use the
correct sub partition size. The incorrect partition size used were
causing an ASAN error in unit test.

Change-Id: Iab695b764bc51cc61580075f2ae4001421132362
2013-12-10 14:34:32 -08:00
Dmitry Kovalev
2dd20e468a Cleaning up skip context calculation.
Renames:
  vp9_get_pred_context_mbskip => vp9_get_skip_context
  vp9_get_pred_prob_mbskip    => vp9_get_skip_prob

Change-Id: I2af499848ef73f3f5cd8cdb27852d0bcdfe31d09
2013-12-10 14:11:26 -08:00
Dmitry Kovalev
35b7b0b549 Merge "Removing unused vp9_get_pred_flag_mbskip() function." 2013-12-10 13:58:35 -08:00
hkuang
19bbe41c71 Merge "Refactor inter_predictor function." 2013-12-10 13:34:24 -08:00
Dmitry Kovalev
48088f210d Removing unused vp9_get_pred_flag_mbskip() function.
Change-Id: Ib46a97d8ff9f2915b9fa2abba3cd18b6711fcb0c
2013-12-10 12:53:17 -08:00
Dmitry Kovalev
e18eb7721e Merge "Renaming comp_pred_mode to reference_mode." 2013-12-10 10:52:34 -08:00
hkuang
6c9dcae532 Refactor inter_predictor function.
Change-Id: Ic429b2f16462e926f30efb3af4da3080026359d8
2013-12-10 10:36:44 -08:00
Guillaume Martres
0102f1d5ec avoid crash when using --best on cpus with SSE3 (but not SSE4) support
Change-Id: Ie100114a01b8b4da7248603c40676792cd06b32a
2013-12-10 18:17:10 +01:00
Dmitry Kovalev
d2dad31e79 Merge "Cleaning up vp9_get_pred_context_switchable_interp() functuion." 2013-12-09 17:34:30 -08:00
Johann
af7b7ffb4e Merge "Add include guards to setupintrarecon.h and vpx_once.h" 2013-12-09 17:16:33 -08:00
hkuang
d70a8c09c6 Merge "Implenment on demand border extension. In place extend the border now. Next commit will totally remove the border." 2013-12-09 17:16:31 -08:00
Dmitry Kovalev
9edd4d4db7 Cleaning up vp9_get_pred_context_switchable_interp() functuion.
Change-Id: I67a45a41312ca0efd8fe00ccd8bdc0f97675d09f
2013-12-09 17:02:38 -08:00
hkuang
ff2c96be1f Implenment on demand border extension. In place extend
the border now. Next commit will totally remove the border.

Change-Id: Ic1e1ca9cc34f81c688715b3948689b47df63a151
2013-12-09 16:44:08 -08:00
Jingning Han
54040f94b9 Merge "Clean-ups in diamond_search_sad" 2013-12-09 16:12:39 -08:00
Jingning Han
f92b5842bf Merge "Full range motion search for regular block sizes" 2013-12-09 16:12:35 -08:00
Yaowu Xu
dad8dfe254 Merge "Further clean up of estimate_max_q." 2013-12-09 15:35:00 -08:00
Dmitry Kovalev
08c48ddc01 Renaming comp_pred_mode to reference_mode.
Change-Id: I83ffed2b1878a35ac35f07f9ee74309adc9c7b11
2013-12-09 15:13:34 -08:00
Dmitry Kovalev
347df4ce55 Merge "Renaming vp9_get_pred_context_tx_size() function." 2013-12-09 15:10:49 -08:00
Dmitry Kovalev
7293ef7ac0 Cleaning up read_inter_block_mode_info() function.
Change-Id: Ib4e215a80f00e342d857a54a4ca1b2dc82b6db1d
2013-12-09 14:45:17 -08:00
Dmitry Kovalev
2c3120274a Removing max_uv_txsize_lookup lookup table.
Adding get_uv_tx_size_impl() with tx size selection logic, rewriting
get_uv_tx_size().

Change-Id: I3ecb108059a41be227a8c89a0710bd174f508951
2013-12-09 14:03:23 -08:00
Ehsan Akhgari
45bac0c496 Add include guards to setupintrarecon.h and vpx_once.h
Change-Id: Ife17fc6369ce32f36d5c7f8a2ef5a3b7724d81b9
2013-12-09 10:59:28 -08:00
Paul Wilkins
267daddecc Further clean up of estimate_max_q.
Clean up and simplification of both estimate_max_q
variants and only call once per clip/section.

This leads to a more constrained range of Q values
across a clip / section.

Average gains across all 4 test sets:-

PSNR ~0.5%  SSIM ~0.3%

Change-Id: If77d5f7bb50939a464e117724f4da5b001c62d70
2013-12-09 17:49:46 +00:00
Dmitry Kovalev
a19d694f09 Merge "Removing BLOCK_TYPES and adding PLANE_TYPES constant instead." 2013-12-07 02:20:41 -08:00
Alex Converse
1c3e04bb94 Remove some dead code
Change-Id: I0953a3b28758811f9d6a85787850e77592bd7670
2013-12-06 21:21:04 -08:00
Dmitry Kovalev
cb92f4f042 Renaming vp9_get_pred_context_tx_size() function.
Change-Id: Ia6d6f4dfb1fd1ec0f8ba53796b59a802e9d7881d
2013-12-06 15:31:06 -08:00
Yaowu Xu
2341747805 Disable warning for intentional lossless coding
For VP9, lossless coding is enabled by passing 0 for both min_q and
max_q. This is a valid configuration, and should not be warned.

Change-Id: Idd117579cd89cd14c0723b1d7e482067ac12b401
2013-12-06 14:47:25 -08:00
Jim Bankoski
dcb17eaefc Merge "Disable early exit based on distortion in lossless" 2013-12-06 14:46:28 -08:00
Jingning Han
44627a9677 Clean-ups in diamond_search_sad
Use the pre-fetched stride value.

Change-Id: I8d4aaedab7a83a4870be51c110da27e55ca3bc85
2013-12-06 14:25:20 -08:00
Dmitry Kovalev
b6e5bb27c9 Merge "Renaming reference mode context calculation function." 2013-12-06 14:22:47 -08:00
Dmitry Kovalev
af04bfa300 Merge "Replacing b_width_log2 with num_4x4_blocks_wide_lookup." 2013-12-06 14:19:59 -08:00
Yaowu Xu
f8c06fb2ac Disable early exit based on distortion in lossless
In lossless coding, distortion is always 0. Early exit based on this
metric was incorrect.

This CL also changed to use best_rd instead of distortion as the metric
for easly exit as requested by Jim.

Change-Id: I8ef3e407ac03b4abc3283b273f936a68fad5c2ab
2013-12-06 13:37:55 -08:00
James Zern
18744fe3ab Merge "add tile test vectors" 2013-12-06 12:47:57 -08:00
Jingning Han
b295092b8f Full range motion search for regular block sizes
Add a full range motion search for regular block sizes. This runs
exhaustive search within the given reference area. This commit further
optimizes the search process by combining 4 points test into one
pipeline, which gives 30% speed-up as compared to run each individual
point at a time.

This full range search serves as a best possible motion search reference.
When replacing the diamond search with full range search, the speed 0
runtime of bus CIF at 2000 kbps goes from 153872ms to 623051ms. The
compression performance compared to speed 0 setting gains 0.585% for
derf set.

Change-Id: Ieef1225216b0b86b4ac4872fa7fb9e18bf2eabb3
2013-12-06 12:24:53 -08:00
Dmitry Kovalev
2da30a96d4 Merge "Removing duplicated C code from vp9_loopfilter_filters.c file." 2013-12-06 12:13:24 -08:00
Dmitry Kovalev
52618d28e1 Replacing b_width_log2 with num_4x4_blocks_wide_lookup.
Change-Id: I8ab9bbe2595ed1743f35223b6a6ce6d023b9a20e
2013-12-06 12:04:06 -08:00
Dmitry Kovalev
63963f51ef Renaming reference mode context calculation function.
Renames:
  vp9_get_pred_context_comp_inter_inter => vp9_get_reference_mode_context
  vp9_get_pred_prob_comp_inter_inter    => vp9_get_reference_mode_prob

Change-Id: I3bbb69481e6b0c848028667c9269f567f293d3bd
2013-12-06 11:23:01 -08:00
Dmitry Kovalev
d6b159d4a6 Removing BLOCK_TYPES and adding PLANE_TYPES constant instead.
Change-Id: Ic3bb862e93aedf6a489a33ea6f7e5097d96855ee
2013-12-06 10:54:00 -08:00
Yaowu Xu
2dd730ccb3 Merge "Remove rate correction factor." 2013-12-06 10:39:51 -08:00
Dmitry Kovalev
cf4dfdc8e7 Merge "Moving vp9_tree_probs_from_distribution() to encoder." 2013-12-06 10:18:30 -08:00
Dmitry Kovalev
8eac2ca840 Merge "Renaming constants." 2013-12-06 09:55:02 -08:00
Dmitry Kovalev
5be34ba80f Merge "vp9_get_pred_context_intra_inter() clean up." 2013-12-06 09:14:36 -08:00
Adrian Grange
de2046275d Merge "Remove redundant calls to vp9_update_mode_info_border" 2013-12-06 08:59:47 -08:00
Jingning Han
ee02f3fbed Merge "Remove redundant bsize mapping in motion search" 2013-12-06 08:57:58 -08:00
Paul Wilkins
570b6d25c0 Remove rate correction factor.
Removed an adaptive rate correction factor that was having
a negative impact on quality in many clips. This factor
was influencing the Q range available to each frame
independently of the bits allocated to each.

Average results with DISABLE_RC_LONG_TERM_MEM.

derf +0.199, -0.059.
yt +3.957, +3.798
std hd +1.577, +2.140
yt hd +4.127, +4.513

Average results without  DISABLE_RC_LONG_TERM_MEM

derf -0.628, -0.665
yt +3.432, +3.015
std hd -0.105, +0.153
yt hd +3.432, +3.015

Change-Id: I45bab6b606f49a442e7b27a6d631f3ffd843bbce
2013-12-06 16:57:16 +00:00
James Zern
937c3b990b add tile test vectors
3840x2160

vp90-2-08-tile_1x8_frame_parallel.webm
vp90-2-08-tile_1x8.webm

vpxenc crowd_run_2160p50.y4m \
  --codec=vp9 -p 2 \
  --frame-parallel=${fpm} \
  --tile-columns=${tc} \
  --limit=10 \
  --auto-alt-ref=1 \
  --lag-in-frames=5 \
  --target-bitrate=2500

Change-Id: I6dc19b4fca483d03ef9a897a843bf9037d095c8e
2013-12-05 21:04:46 -08:00
James Zern
d77b9d1ce9 Merge "Fix bug with put slice cb function." 2013-12-05 20:21:16 -08:00
Dmitry Kovalev
4ac6a2552b Moving vp9_tree_probs_from_distribution() to encoder.
Writing custom coeff branch count calculation (which is much clearer) in
adapt_coef_probs() function. Removing vp9_treecoder.c file.

Change-Id: I8880fb7a39996c8bcf6cd0acf9898a8c712ba91f
2013-12-05 18:13:26 -08:00
Dmitry Kovalev
d72c847fe8 Merge "Renaming PREV_COEF_CONTEXTS to COEFF_CONTEXTS." 2013-12-05 17:54:44 -08:00
Dmitry Kovalev
377fa8aff8 Renaming PREV_COEF_CONTEXTS to COEFF_CONTEXTS.
Also adding BAND_COEFF_CONTEXTS macro to simplify for loop logic.

Change-Id: I12a78a49cf1addf81e6b3fe2a3736ec2b79bd79e
2013-12-05 17:08:06 -08:00
Dmitry Kovalev
6fd71e1b09 vp9_get_pred_context_intra_inter() clean up.
Renaming:
 vp9_get_pred_context_intra_inter => vp9_get_intra_inter_context
 vp9_get_pred_prob_intra_inter    => vp9_get_intra_inter_prob

Change-Id: I2c1affea2e84f4e616137c6df82adb11c7845781
2013-12-05 17:01:03 -08:00
Deb Mukherjee
8de1d8bfe3 Merge "Further rate control cleanups" 2013-12-05 16:55:35 -08:00
Dmitry Kovalev
da519166e9 Merge "Cleaning up vp9_detokenize.c file." 2013-12-05 16:45:10 -08:00
Dmitry Kovalev
f7396f3394 Merge "Removing vp9_default_coef_probs.h file." 2013-12-05 16:44:26 -08:00
Deb Mukherjee
52d273674b Further rate control cleanups
Includes various cleanups.
Streamlines the interfaces so that all rate control state
updates happen in the vp9_rc_postencode_update() function.
This will hopefully make it easier to support multiple
rate control schemes.
Removes some unnecessary code, which in rare cases can casue
a difference in the constrained quality mode output, but
other than that there is no bitstream change yet.

Change-Id: I3198cc37249932feea1e3691c0b2650e7b0c22fc
2013-12-05 16:31:04 -08:00
Dmitry Kovalev
0d4b8d7e43 Renaming constants.
NUM_YV12_BUFFERS        => FRAME_BUFFERS
ALLOWED_REFS_PER_FRAME  => REFS_PER_FRAME
NUM_REF_FRAMES_LOG2     => REF_FRAMES_LOG2
NUM_REF_FRAMES          => REF_FRAMES
NUM_FRAME_CONTEXTS_LOG2 => FRAME_CONTEXTS_LOG2
NUM_FRAME_CONTEXTS      => FRAME_CONTEXTS

Change-Id: I4e1ada08f25d8fa30fdf03aebe1b1c9df0f87e63
2013-12-05 16:23:09 -08:00
Dmitry Kovalev
2b95a05bf6 Removing duplicated C code from vp9_loopfilter_filters.c file.
Change-Id: I299b621fca1c8ff5d296afde9698cdcccfecaf3f
2013-12-05 15:49:57 -08:00
Frank Galligan
bbf61e35e7 Fix bug with put slice cb function.
Change-Id: Idfbd87d0a4bebdce7dd587c8446e7fa75b030d91
2013-12-05 15:45:15 -08:00
Adrian Grange
93d8a3fd29 Remove redundant calls to vp9_update_mode_info_border
Removed calls to vp9_update_mode_info_border since
they immediately followed code that initialized the
entire buffer to 0.

Change-Id: Ife06794daa20439a0b607a83a87f88df59afac40
2013-12-05 15:02:32 -08:00
Dmitry Kovalev
3eb0170ea6 Using lookup to determine tx_size in encode_superblock().
Change-Id: I68d6217db6f67da15380cd59ec5eda0c44da7d34
2013-12-05 12:25:03 -08:00
Dmitry Kovalev
6df9ec52a0 Merge "Cleaning up vp9_get_pred_context_tx_size() function." 2013-12-05 09:59:00 -08:00
Yaowu Xu
bdf3f07677 Merge "Disable --tune=ssim for vp9" 2013-12-05 09:15:13 -08:00
Frank Galligan
7ecf3bc91c Fix ref count decrement code.
Buffer 0 would never be decremented, so it could only be used
once.

Change-Id: I605d99fa2a513eadae6a0e230161729880653282
2013-12-04 22:21:00 -08:00
Dmitry Kovalev
5eeffc9fc5 Cleaning up vp9_get_pred_context_tx_size() function.
Change-Id: Ia6ef876e3d1e66b2182a9c0bce3fd758691cd381
2013-12-04 21:35:30 -08:00
Dmitry Kovalev
a1123538a5 Moving vp9_token from common to encoder.
Change-Id: I40a070c353663e82c59e174d7c92eb84f72ed808
2013-12-04 19:36:58 -08:00
Frank Galligan
8363349b84 Merge "Fix the initial references to frame buffers." 2013-12-04 19:26:40 -08:00
Jingning Han
45aa6f15b0 Remove redundant bsize mapping in motion search
Both single frame and compound inter motion search run with luma
component only. Hence removing the block size mapping therein.

Change-Id: I217488e702432ae9fa0e95bf6f516ebb36b5c79b
2013-12-04 17:25:06 -08:00
Dmitry Kovalev
934e10d0f1 Cleaning up vp9_detokenize.c file.
Using consistent names (block_idx => block, dqcoeff_ptr => dqcoeff,
pt => ctx), inlining get_tx_eob() call.

Change-Id: I05208e57df81bbb8f25b8274684a48192e9de464
2013-12-04 17:24:18 -08:00
Jingning Han
61da0870b9 Merge "Add a test vector for loopfilter" 2013-12-04 17:13:57 -08:00
Dmitry Kovalev
4afd141a05 Removing vp9_default_coef_probs.h file.
Moving all probability tables from removed file to vp9_entropy.c.

Change-Id: I12846f1da778c3016d96b82e53384d4634883430
2013-12-04 17:04:35 -08:00
Dmitry Kovalev
cf8e3d2c5c Merge "Cleaning up vp9_dec_build_inter_predictors_sb function." 2013-12-04 16:57:54 -08:00
Frank Galligan
9ed616a56c Fix the initial references to frame buffers.
The old code would start in a mixed state, where all the reference
frames were pointing to frame buffer 0, but the reference counts
were 0. This is why we needed special code for the first frame.

Change-Id: I734961012917654ff8c0c8b317aac00ab75ded1a
2013-12-04 16:53:18 -08:00
Dmitry Kovalev
3712b58c2f Merge "Cleaning up vp9_entropy.h file." 2013-12-04 16:46:41 -08:00
Dmitry Kovalev
97b36b26e0 Merge "Removing old code." 2013-12-04 16:45:11 -08:00
Dmitry Kovalev
16c3a25f71 Merge "Compact formatting default_coef_probs_{4x4, 8x8, 16x16, 32x32}." 2013-12-04 16:37:10 -08:00
Adrian Grange
bc02079cb2 Merge "Modified spatial scalable encoder & unit tests" 2013-12-04 15:49:12 -08:00
Dmitry Kovalev
c6ca5c5ad9 Compact formatting default_coef_probs_{4x4, 8x8, 16x16, 32x32}.
Change-Id: If40b930431766d5179b9769509b5e4ca1628e9cc
2013-12-04 15:45:28 -08:00
Jingning Han
ebb583d291 Add a test vector for loopfilter
The test vector exercises the loopfilter behavior at frame boundary.

blue_sky_1080p25.y4m --good --cpu-used=2 --threads=0 --profile=0
--lag-in-frames=25 --limit=300 --min-q=0 --max-q=63 --cq-level=20
--end-usage=0 --auto-alt-ref=1 -p 2 --kf-max-dist=9999 --kf-min-dist=0
--drop-frame=0 --static-thresh=0 --bias-pct=50 --minsection-pct=0
--maxsection-pct=2000 --arnr-maxframes=7 --arnr-strength=5
--arnr-type=3 --sharpness=0 --undershoot-pct=100 --target-bitrate=6000

Change-Id: Ibd0807395d2fe87f24f81f990369678df3de7c23
2013-12-04 13:05:21 -08:00
Yaowu Xu
d84c098417 Disable --tune=ssim for vp9
The feature is not yet supported.

Change-Id: If46382302d2077b20670391b4a03017045a104f5
2013-12-04 12:39:15 -08:00
Dmitry Kovalev
da2da79012 Merge "Formatting vp9_pareto8_full array." 2013-12-04 12:22:50 -08:00
Dmitry Kovalev
beb35aba19 Cleaning up vp9_dec_build_inter_predictors_sb function.
Using get_plane_block_size() instead of manipulation with subsampling
values, calculating all required values only once without redundant calls
to b_width_log2().

Change-Id: I00303f2a0926f9c4cb17f34591adda60615f8919
2013-12-04 12:11:01 -08:00
Adrian Grange
475d1d60b8 Modified spatial scalable encoder & unit tests
Modifications to the spatial scalable encoder to match
changes made to the scaling code in the decoder.

In particular, the use of a dummy first frame was removed
now that the decoder is able to handle a smaller first
frame.

SvcTest.FirstFrameHasLayers unit test re-enabled.

Change-Id: Ic2e91fbe4eadf95895569947670d36d68abaf458
2013-12-04 11:45:40 -08:00
Yunqing Wang
f6582d6928 Revert "Simplify mask checking in loop filters"
Jingning saw bitstream change with this patch. It could be true
that (mask_16x16_0 & 1) is 1, but (mask_16x16_1 & 1) is 0 in some
edge cases.

This reverts commit 8f05e70340.

Change-Id: I0a529435ce816a1e14653eb510d5090de276070a
2013-12-04 11:31:19 -08:00
Dmitry Kovalev
1470789927 Merge "Moving eob array to the encoder." 2013-12-04 10:58:02 -08:00
Adrian Grange
584c72992a Merge "Change default behavior to assume sampled chroma" 2013-12-04 09:35:14 -08:00
Yunqing Wang
920a074e89 Merge "Improve idct16x16: _256_add_sse2(x1.107)&_10_add_sse2(x1.012)" 2013-12-04 08:50:51 -08:00
Dmitry Kovalev
30a5a07a71 Removing old code.
Change-Id: I7ccbe13e1accd292a3e0e98522416f9c4b4bc82b
2013-12-03 19:44:48 -08:00
Dmitry Kovalev
ff6d6a9f07 Formatting vp9_pareto8_full array.
Change-Id: Ic7f47a8d233daf5e61e82092865837ea4eda4095
2013-12-03 18:49:19 -08:00
Yaowu Xu
ecc0a1ece8 Merge "Fix a spelling mistake in filename" 2013-12-03 18:11:36 -08:00
Yaowu Xu
43110b2c29 Merge "Fix VP8 border replication for very small image" 2013-12-03 18:03:08 -08:00
Dmitry Kovalev
f00d157c12 Moving eob array to the encoder.
In the decoder we don't need to save eobs, we can pass eob as an argument.
That's why removing eob arrays from VP9Decompressor and TileWorkerData,
and moving eob pointer from macroblockd_plane to macroblock_plane.

Change-Id: I8eb919acc837acfb3abdd8319af63d1bbca8217a
2013-12-03 17:59:32 -08:00
Dmitry Kovalev
8e89e2f2e0 Cleaning up vp9_entropy.h file.
Renaming constants for consistency:
  DCT_VAL_CATEGORY1 => CATEGORY1_TOKEN
  DCT_VAL_CATEGORY2 => CATEGORY2_TOKEN
  DCT_VAL_CATEGORY3 => CATEGORY3_TOKEN
  DCT_VAL_CATEGORY4 => CATEGORY4_TOKEN
  DCT_VAL_CATEGORY5 => CATEGORY5_TOKEN
  DCT_VAL_CATEGORY6 => CATEGORY6_TOKEN
  DCT_EOB_TOKEN     => EOB_TOKEN
  DCT_EOB_MODEL_TOKEN => EOB_MODEL_TOKEN
  MAX_ENTROPY_TOKENS => ENTROPY_TOKENS

Moving constants:
  INTER_MODE_CONTEXTS from vp9_entropy.h to vp9_blockd.h.
  EOSB_TOKEN from vp9_entropy.h to vp9_tokenize.h

Change-Id: I5fcbf081318e1d365792b6d290a930c6cb0f3fc2
2013-12-03 17:23:03 -08:00
Yaowu Xu
33e5e35fdb Fix a spelling mistake in filename
Change-Id: Ic06124ed95a50935b1c6509907dcac87c7707bcc
2013-12-03 17:19:41 -08:00
Yaowu Xu
a0f77f6acb Fix VP8 border replication for very small image
Also added a test vector for this issue.

Change-Id: I8a8654f9d33b27afd53c295f1ea44d198550d067
2013-12-03 17:06:17 -08:00
Jingning Han
3c34619125 Fix initialization order for the encoder
This commit makes the coefficient tree initialized prior to token
initialization, where the coefficient costs are filled out according
to the probabilities associated with coefficient value categories.

Change-Id: If4e89c3923058376f8382c683fe4a225a4a38af3
2013-12-03 15:29:24 -08:00
Dmitry Kovalev
fd16baae25 Merge "Making names consistent with REFERENCE_MODE enum name." 2013-12-03 12:48:34 -08:00
Dmitry Kovalev
4585b9dbac Merge "Removing token_to_counttoken array." 2013-12-03 12:29:56 -08:00
Dmitry Kovalev
ac830b3970 Merge "Using local variable for token_cache." 2013-12-03 12:29:50 -08:00
Dmitry Kovalev
09577b8c8d Merge "Removing dummy assignments." 2013-12-03 10:59:34 -08:00
Alex Converse
f63c75de84 Merge "Remove plane_block_idx." 2013-12-03 10:51:13 -08:00
Jingning Han
b88b49a7bc Merge "Fix intra prediction ref selection in skip_encode" 2013-12-03 09:47:41 -08:00
Paul Wilkins
8a4310b160 Merge "Fix use_uv_intra_estimate in rd loop" 2013-12-03 04:30:50 -08:00
Jingning Han
f01ad926d0 Fix intra prediction ref selection in skip_encode
This commit fixes the intra prediction reference source selection
in the settings of skip_encode. Use original boundary pixels as
prediction reference, when the inverse transform and reconstruction
are skipped in the per block size rate-distortion optimization loop.

Change-Id: I36081aa30aa46e203e0e6f4e8a420fd08269469a
2013-12-02 18:48:51 -08:00
Dmitry Kovalev
54b5deff77 Removing token_to_counttoken array.
Change-Id: I02050bcca4c9fd68a00abdea5aba0c3f8993d9a9
2013-12-02 18:41:53 -08:00
Alex Converse
2360a5f093 Remove plane_block_idx.
Its last remaining caller can be passed its results directly without any
additional work. Also, it's not non-4:2:0 safe.

Change-Id: Ia5089ba5f7f66c7617270483c619c9271aefd868
2013-12-02 18:33:50 -08:00
Abo Talib Mahfoodh
e4419ab691 Improve idct16x16: _256_add_sse2(x1.107)&_10_add_sse2(x1.012)
The performance gain of idct16x16_10_add_sse2 function is not
noticeable. However since both functions use the IDCT16_1D,
idct16x16_10_add_sse2 should be modified as well.
Tested with: park_joy_420_720p50.y4m

Change-Id: I02b957e36fcf997c677d15baf496533895271bff
2013-12-02 21:08:56 -05:00
Jingning Han
9f81a50c85 Fix use_uv_intra_estimate in rd loop
This commit fixes the use of uv_intra_estimate by properly restoring
the mode_info struct required by rd_pick_intra_sbuv_mode.

Change-Id: I6a156d79533c4e2e60dfd3b8c5bb0a42a8eca280
2013-12-02 17:30:41 -08:00
Dmitry Kovalev
5ab920d2ae Using local variable for token_cache.
The difference with the old code is that originally the whole token_cache
was initialized with zeros at the beginning of decode_coefs() function.
Now we set several zero values explicitly with "token_cache[scan[c]] = 0".

Change-Id: I88cc5031f01d13012d1a4491739c36cb44f9401e
2013-12-02 15:44:26 -08:00
Dmitry Kovalev
e7922a5b70 Merge "Cleaning up decode_coefs() function." 2013-12-02 15:31:10 -08:00
Yunqing Wang
8f182a1cac Merge "improve vp9_idct32x32_34(x1.472)&1024(x1.032)_add_sse2" 2013-12-02 15:10:05 -08:00
Alex Converse
5cf74bf10c Merge "Disable partitioning in the dominant subsampling direction." 2013-12-02 15:08:22 -08:00
Dmitry Kovalev
9144111296 Cleaning up decode_coefs() function.
Removing goto and using while loop instead, renaming seg_eob to max_eob,
moving eob token counter increment.

Change-Id: Idcc4b3a45e4f313596a71776aef56691a6647e5f
2013-12-02 14:36:06 -08:00
Alex Converse
962fc2e1e7 Disable partitioning in the dominant subsampling direction.
E.g. disable vertical partioning for 4:2:2. Until we come up with something
better to do with the chroma block size, this prevents an assert error.

Change-Id: I9394fb3f14ec1343abc3ad4769de208e6278f285
2013-12-02 13:38:11 -08:00
Yunqing Wang
37e68aba55 Merge "Simplify mask checking in loop filters" 2013-12-02 12:06:26 -08:00
Johann
b9db869a3d Merge branch 'forest'
Bookkeeping. master already contains everything
in forest.

Change-Id: I1471064eef341411c6ed0c9e855fce18cff12ebc
2013-12-02 11:13:36 -08:00
Dmitry Kovalev
862c22cf7d Merge "Moving token-encoding related stuff from common to encoder." 2013-12-02 10:32:04 -08:00
Dmitry Kovalev
526a774adb Merge "Moving reaster_block_offset{,_int16} from vp9_blockd.h to vp9_rdopt.h." 2013-12-02 10:31:31 -08:00
Yaowu Xu
e237b7dea3 Merge "Simplify super_block_yrd()" 2013-12-02 09:39:42 -08:00
Yaowu Xu
56d9a4fcd5 Merge "Merge tx selection into RD calculation" 2013-12-02 09:39:10 -08:00
Deb Mukherjee
e924057d80 Fixing inadvertent change
Fixes an inadvertant change made in a previous patch while doing
some experiments.

Change-Id: I9961f2157c803676491a3d6daf056ff8a37367b3
2013-11-27 14:50:34 -08:00
Yunqing Wang
8f05e70340 Simplify mask checking in loop filters
Considering a horizontal edge, if mask_16x16 is 1 for an even-
indexed 8x8 block, then mask_16x16 is 1 for next 8x8 block in
same row. Similiar to a verticle edge, if mask_16x16 is 1 for
an even-rowed 8x8 block, then mask_16x16 is 1 for the 8x8 block
right below it in next raw. Based on that, the mask_16x16 checking
can be simplified to save cycles. The corresponding 8-pixel
vp9_mb_lpf_horizontal_edge code can also be removed.

Change-Id: Ic3fe7a5674322239208cbe2731dc3216ce2084f3
2013-11-27 14:10:57 -08:00
Dmitry Kovalev
d83d61d942 Moving reaster_block_offset{,_int16} from vp9_blockd.h to vp9_rdopt.h.
Change-Id: I5a5888d4639cc6b7eb266be47581dd15ba08c91e
2013-11-27 12:57:21 -08:00
Deb Mukherjee
a622ed554f Merge "Continued rate control clean-ups" 2013-11-27 12:04:38 -08:00
Deb Mukherjee
d17ac4feb2 Continued rate control clean-ups
Moves all post encode rate control updates to a separate function
plus other cleanups.

Change-Id: I70e8eccf666c88d8b649b969997fd84d27e4baaa
2013-11-27 11:34:48 -08:00
Dmitry Kovalev
f9da823216 Moving token-encoding related stuff from common to encoder.
Change-Id: I0e59d320407b3bed0ba3622a7b29975f6fad7ebf
2013-11-27 11:27:57 -08:00
Dmitry Kovalev
e2f1d02eb3 Merge "Moving mode encodings from common to encoder + cleanup." 2013-11-27 11:00:54 -08:00
Yaowu Xu
e9c19617bf Merge "vp9_short_fdct32x32_rd vp9_short_fdct32x32 optimized for AVX2" 2013-11-27 10:27:32 -08:00
Dmitry Kovalev
d3a2e55af4 Removing qcoeff buffers from the decoder.
We only need qcoeff buffers in the encoder. Reducing TileWorkerData struct
and VP9Decompressor struct sizes by 24K.

Change-Id: Id148868461f7ffa3d3dd634b371503ae9c57e207
2013-11-26 18:52:10 -08:00
Yaowu Xu
971112f965 Simplify super_block_yrd()
Change-Id: Iae16644faeed920e69cd5d1db71e2e1e4bda241c
2013-11-26 17:05:56 -08:00
Dmitry Kovalev
c5bdc9dfd2 Making names consistent with REFERENCE_MODE enum name.
Change-Id: I17268af3e0cbf7e5788c3154466e404947c944b3
2013-11-26 16:46:13 -08:00
Dmitry Kovalev
fc3c3303f1 Removing dummy assignments.
Change-Id: I10d1a4bcac751a982d9dd135f019e3a4d92f8522
2013-11-26 15:35:11 -08:00
Dmitry Kovalev
f4bf712fbb Moving mode encodings from common to encoder + cleanup.
Change-Id: I248ccb1532e2cd95314d0b95108f2c2e71cf084f
2013-11-26 14:53:17 -08:00
Yaowu Xu
b60293e1ce Merge "Amended some comments for clarity" 2013-11-26 14:32:02 -08:00
Dmitry Kovalev
4622cd14c2 Merge "Deleting vp9_treereader.h file." 2013-11-26 14:13:30 -08:00
Dmitry Kovalev
d7efe068d2 Deleting vp9_treereader.h file.
Renaming treed_read() to consistent vp9_read_tree() and moving it from
deleted vp9_treereader.h to vp9_dboolhuff.h file.

Change-Id: Iedd8655acbe25e4fcf62b79e5a13bdea69b6b004
2013-11-26 12:38:58 -08:00
Yaowu Xu
08d6fa6de4 Merge tx selection into RD calculation
Change-Id: I406021e34b31b899202a99b39d3da4fa06ebee69
2013-11-26 12:37:25 -08:00
Yunqing Wang
099d27432b Merge "Add a noise test vector" 2013-11-26 11:56:13 -08:00
James Zern
20a7691c92 Merge "thumb: Fix a typo in a comment" 2013-11-26 11:49:01 -08:00
Yunqing Wang
f234136414 Add a noise test vector
Added the test vector provided by Attila, which caught the bug in
Issue 661 "Decoder produces mismatched outputs with ssse3 enabled
and disabled"

vp90-hantro-stream-001.ivf
size: 320x180; 20 frames

Change-Id: Ic0d2b57ac7596ecb938dd55abc8c706fc2dd6d8f
2013-11-26 11:30:13 -08:00
Yaowu Xu
5e4f4196a9 Merge "Fix unit test failures" 2013-11-26 11:22:30 -08:00
Frank Galligan
b4874e2c82 Fix 16 wide neon horz loopfilter.
Multiply by 3 was on 8bit vectors when it should have been on
16bit vectors.

Change-Id: I248c1429b3134dfd171dfab0ebb109fd2437e1fc
2013-11-26 10:02:40 -08:00
Yaowu Xu
03094a5533 Fix unit test failures
Change-Id: Ibc61ef81fafeb20df6df6e5496b6c01760f3dc84
2013-11-26 09:57:55 -08:00
Yunqing Wang
7a5fd6a1bf Merge "Do vertical loopfiltering in parallel" 2013-11-26 09:35:14 -08:00
Deb Mukherjee
65f14b0067 Merge "Some cleanups on rate control" 2013-11-26 09:34:20 -08:00
Abo Talib Mahfoodh
f97d91ab67 improve vp9_idct32x32_34(x1.472)&1024(x1.032)_add_sse2
vp9_idct32x32_34_add_sse2:
speedup: 1.472
IDCT32_1D_34 and MULTIPLICATION_AND_ADD_2 are optimized
based on the fact that Only upper-left 8x8 has
non-zero values.

vp9_idct32x32_1024_add_sse2:
speedup: 1.032

Tested with: park_joy_420_720p50.y4m

Change-Id: I8670ce547552b48695049de298e2fc46ce28dfbc
2013-11-26 12:28:26 -05:00
Martin Storsjo
f0339cc9cf thumb: Fix a typo in a comment
Change-Id: Ic318be9d74a95793abc41501fe563164de53a6d7
2013-11-26 10:57:01 +02:00
Dmitry Kovalev
5488da280d Merge "Moving mv entropy encodings calculation to the encoder side." 2013-11-25 19:15:21 -08:00
Dmitry Kovalev
d5f6ca8255 Merge "Removing vp9_modecosts.{c, h} files." 2013-11-25 19:14:47 -08:00
Deb Mukherjee
25f1195a25 Some cleanups on rate control
Removes the active_worst_qchanged variable since it is never
set to 1.

Change-Id: I29a291fd1068fd9b504a2db7768d45644c1eae3e
2013-11-25 18:58:45 -08:00
Dmitry Kovalev
56d048c412 Moving mv entropy encodings calculation to the encoder side.
Moved arrays:
  vp9_mv_joint_encodings
  vp9_mv_class_encodings
  vp9_mv_class0_encodings
  vp9_mv_fp_encodings

Change-Id: Iaf5008c579fcbd6d77fdd81d1aef8c71b5f308b7
2013-11-25 16:36:28 -08:00
Dmitry Kovalev
7ba7a5f817 Merge "Removing redundant call of vp9_init_mbmode_probs()." 2013-11-25 16:08:42 -08:00
Dmitry Kovalev
204ff1c868 Removing vp9_modecosts.{c, h} files.
Renaming vp9_init_mode_costs() to fill_mode_costs() and moving it to
vp9_rdopt.c.

Change-Id: Ib2542d216458f6dced9f4b7ccbdd2cd98176aa5a
2013-11-25 12:44:05 -08:00
Tom Finegan
249366b1ac vpxenc: Move config check code into its own source files.
- Add command line args that allow display of warnings without prompting
  for user input.
- Extend warning code to make it somewhat scalable.

Change-Id: I2bad8f9315f6eed120c2e1bbe0a2a5ede15fbf35
2013-11-25 12:05:45 -08:00
Dmitry Kovalev
939b297ac7 Reusing txfrm_block_to_raster_xy in vp9_xform_quant().
Change-Id: Ib273dfff3be284f3c9ae288e5315fb6c6126f9c2
2013-11-25 11:13:55 -08:00
Dmitry Kovalev
22216a8691 Merge "Cleaning up vp9_write_nmv_probs() function." 2013-11-25 11:03:00 -08:00
Dmitry Kovalev
3e72277272 Merge "Adding select_tx_size() function." 2013-11-25 10:59:56 -08:00
Dmitry Kovalev
cfc1f91c9f Merge "Moving {left, right}_block_mode to vp9_blockd.h." 2013-11-25 10:59:24 -08:00
Dmitry Kovalev
e8af3db88a Merge "Renaming COMPPREDMODE_TYPE enum and its members." 2013-11-25 10:59:08 -08:00
Yaowu Xu
dd69337e6e Amended some comments for clarity
Change-Id: I31c3908ba394095deb5d3a5d7b7c9b2b5328c3e8
2013-11-25 10:55:01 -08:00
Yaowu Xu
cc1e05ca5f Merge "In frame Q adjustment experiment." 2013-11-25 10:52:22 -08:00
Jingning Han
f547fb8e07 Merge "Use separate inter predictors for enc/dec" 2013-11-25 10:29:07 -08:00
Paul Wilkins
644bd87e8e In frame Q adjustment experiment.
The idea here is to allow "in frame" adjustment of the final Q
value used to encode each SB64, using segmentation.

There is also adjustment of the rd mult in regions of overspend.

Activated using aq_mode=2

Change-Id: I2f140cd898c9f877c32cd6d2e667f5e11ada4b1c
2013-11-25 10:22:55 -08:00
Yaowu Xu
3183135dd3 Merge "Fix a build issue with visual c." 2013-11-25 10:20:53 -08:00
Guillaume Martres
0c54beb1ee Merge "Rename block_yrd_txfm to block_rd_txfm" 2013-11-25 09:45:55 -08:00
Jingning Han
ba8b5e8d6d Use separate inter predictors for enc/dec
The decoder will construct inter predictor using lazy border extension,
while the encoder, going with multiple runs of motion search in the rate-
distortion optimization loop for each block, does border extension at
frame level. This commit makes separate the inter predictors for encoder
and decoder, respectively.

Change-Id: Ieca2fecba3a7201a6d64ef9f219e5d91e50559c3
2013-11-25 09:43:34 -08:00
Jingning Han
12e5ec6aa8 Merge "Separate setup_scale_factor/extend_frame_borders" 2013-11-25 09:14:46 -08:00
Adrian Grange
3173c21909 Change default behavior to assume sampled chroma
When calling check_initial_width through vp9_set_size_literal
the function was defaulting to using non-subsampled chroma.

This patch changes the default to assume sampled chroma as
an interim solution until complete support for other
color formats is added.

Change-Id: Id8e7e919b350e3473dfdf7551af6fd0716478b04
2013-11-25 08:59:29 -08:00
Yaowu Xu
86368faca9 Fix a build issue with visual c.
Change-Id: Ic8fc16ee1734cfde0d12a2e3abb3e9299382f3b1
2013-11-25 08:11:35 -08:00
Dmitry Kovalev
c6c7557f8e Cleaning up vp9_write_nmv_probs() function.
Change-Id: I9af38f1a0e226ee094c17081f044a722ac1caded
2013-11-24 16:20:59 -08:00
Guillaume Martres
87375e257b Rename block_yrd_txfm to block_rd_txfm
This function is also used with the U and V planes.

Change-Id: Ib6beae0438790bfb690b3a2bda9c5c8b0e89a9b8
2013-11-25 01:18:51 +01:00
Dmitry Kovalev
2d50c8498d Merge "Using partition counts from FRAME_COUNTS struct in the encoder." 2013-11-24 16:08:29 -08:00
Dmitry Kovalev
9fe88870c5 Merge "Cleaning up vp9_append_sub8x8_mvs_for_idx." 2013-11-24 16:08:20 -08:00
Dmitry Kovalev
78d3adbb21 Merge "Inlining and removing vp9_set_pred_flag_seg_id() function." 2013-11-24 16:07:57 -08:00
Paul Wilkins
f345da5238 Merge "Added cpuid compatibility for older MSVC versions" 2013-11-23 03:05:55 -08:00
Dmitry Kovalev
52b43a2876 Inlining and removing vp9_set_pred_flag_seg_id() function.
Change-Id: I0fd76937e847f78378a7ab3fa0af00a7c2c52b42
2013-11-22 17:32:11 -08:00
Dmitry Kovalev
520aa705cb Merge "Organizing all scan tables into lookup table." 2013-11-22 17:16:19 -08:00
Yaowu Xu
8caeeb886a Added cpuid compatibility for older MSVC versions
Change-Id: I891bf936e03411ca611620e7cb2eb5081993a346
2013-11-22 17:06:02 -08:00
Yaowu Xu
28e44bbb0b Merge "Fix bug in extend_frame chroma extended too far" 2013-11-22 17:01:07 -08:00
Dmitry Kovalev
fb9c19c62d Renaming COMPPREDMODE_TYPE enum and its members.
List of renames:
  COMPPREDMODE_TYPE      => REFERENCE_MODE
  SINGLE_PREDICTION_ONLY => SINGLE_REFERENCE
  COMP_PREDICTION_ONLY   => COMPOUND_REFERENCE
  HYBRID_PREDICTION      => REFERENCE_MODE_SELECT (like TX_MODE_SELECT)
  NB_PREDICTION_TYPES    => REFERENCE_MODES

Change-Id: If723dabe9435325d0165dcd028142a2c78b417b4
2013-11-22 16:35:37 -08:00
Dmitry Kovalev
350731e8f9 Organizing all scan tables into lookup table.
Change-Id: Ie829ee58a55157e6972c63cebe69a5d0a3221349
2013-11-22 16:20:45 -08:00
Dmitry Kovalev
52fa10a9a3 Cleaning up vp9_append_sub8x8_mvs_for_idx.
Change-Id: Ic92f15d82ff5cfa3df655d08e460335c2ef8a325
2013-11-22 15:28:32 -08:00
Dmitry Kovalev
75e4377d81 Using partition counts from FRAME_COUNTS struct in the encoder.
Change-Id: I6c3d47b00acabe7ffba22ffc73741173aa9a0bff
2013-11-22 14:26:39 -08:00
Jingning Han
86d2a9b978 Separate setup_scale_factor/extend_frame_borders
This commit takes out vp9_extend_frame_borders from
vp9_setup_scale_factors.

The refactoring is for the preparation of the use of lazy border
extension at decoder. This makes it necessary to handle border
extension separately at encoder/decoder. The use of
vp9_extend_frame_borders will be removed, when lazy border extension
is ready.

Change-Id: Ia3baba3d179d5f11eee1634f19b3b319d2a59186
2013-11-22 12:02:08 -08:00
Adrian Grange
2117fe0593 Fix decoder to handle display size correctly
The decoder ignored the display width & height
specified in the frame header.

This patch adds a control, VP9D_GET_DISPLAY_SIZE, to
allow the application to obtain the display width and
height from the frame header.

vpxdec has been modified to scale the output frame to
this size.

Should the request for the display size fail vpxdec will
use the native width and height of the raw decoded
frame instead.

Change-Id: I25db04407426dac730263720c75a7dd6400af68a
2013-11-22 11:58:07 -08:00
Dmitry Kovalev
0a64f943fc Merge "Cleaning up entropy probability update in encoder." 2013-11-22 10:52:40 -08:00
Dmitry Kovalev
e0ec61187e Merge "Removing txfrm_block_to_raster_xy() call from extend_for_intra()." 2013-11-22 10:51:38 -08:00
Yunqing Wang
384089004d Merge "Improve vp9_fdct4x4_sse2 (x1.2)" 2013-11-22 10:39:55 -08:00
Yunqing Wang
ed36720b66 Do vertical loopfiltering in parallel
This patch followed "Add filter_selectively_vert_row2 to enable
parallel loopfiltering" commit, and added x86 SSE2 optimization
to do 16-pixel filtering in parallel. For other optimizations
(neon and dspr2), current 16-pixel functions were done by calling
8-pixel functions twice, and real 16-pixel functions could be added
later.

Decoder speedup:
tulip clip:     2% speed gain;
old_town_cross: 1.2% speed gain;
bus:            2% speed gain.

Change-Id: I4818a0c72f84b34f5fe678e496cf4a10238574b7
2013-11-22 10:04:51 -08:00
Yaowu Xu
16ad35f64e Merge "Fix the cpuid macro for x86_64 non-gcc build" 2013-11-22 10:03:51 -08:00
Adrian Grange
d427fab587 Fix bug in extend_frame chroma extended too far
This fixes issue 667.

In the case where the frame was an odd number of pixels
wide or high, the border was being extended by one col
or row too far.

The calculation of color plane dimensions was modified
to use those already computed at the time the frame
buffer was allocated.

Also freed the temporary scaling buffer in vpxdec to
prevent a memory leak.

Change-Id: Ied04bdcdfd77469731408c05da205db1a6f89bf5
2013-11-22 09:55:10 -08:00
Jim Bankoski
a64a192c90 Merge changes Id1698a35,Idcabd0b9
* changes:
  detokenization speedups
  Don't write 0's to token_cache
2013-11-22 08:16:17 -08:00
Deb Mukherjee
5576a4e1cb Merge "Refactoring of rate control - part 1" 2013-11-22 08:06:48 -08:00
Deb Mukherjee
f1781e86b7 Refactoring of rate control - part 1
Moves all rate control variables to a separate structure,
removes some currently unused variables,
moves some rate control functions to vp9_ratectrl.c,
and splits the encode_frame_to_data_rate function.

Change-Id: I4ed54c24764b3b6de2dd676484f01473724ab52b
2013-11-22 07:07:24 -08:00
Dmitry Kovalev
7c8cac3c21 Removing txfrm_block_to_raster_xy() call from extend_for_intra().
Change-Id: I6a48d1f35ed5fe7a2c7499675b339994c9c3bdf2
2013-11-21 19:30:58 -08:00
Yaowu Xu
36dfb90c53 Fix the cpuid macro for x86_64 non-gcc build
Change-Id: I0c44800db10db8d74c1ddfe89abecfd1c53d0f8d
2013-11-21 18:02:20 -08:00
Tom Finegan
65ac291f20 Merge "vpxenc: Add vpxenc.h and move/rename the global_config struct" 2013-11-21 17:56:26 -08:00
Jim Bankoski
70ffd5d055 detokenization speedups
removed unnecessary ifs and branches ..

Change-Id: Id1698a35292659388f48926791024d1400f2cea9
2013-11-21 16:55:22 -08:00
Dmitry Kovalev
5925ba08a3 Merge "Using num_4x4_blocks_* instead of b_{width, height}_log2." 2013-11-21 16:48:34 -08:00
Tom Finegan
49dc9cafa6 vpxenc: Add vpxenc.h and move/rename the global_config struct
- Rename the struct to VpxEncoderConfig.
- The idea behind this is to enable checking the global settings against
  stream specific settings in source files other than vpxenc.c.

Change-Id: Ic736cbb714845b9466acb34671780d65b83ad1a8
2013-11-21 16:46:40 -08:00
Dmitry Kovalev
ad3333e2cd Merge "Removing plane_block_{width, height} functions." 2013-11-21 16:37:27 -08:00
Dmitry Kovalev
6042f781f7 Merge "Using txfrm_block_to_raster_xy() in encoder." 2013-11-21 16:24:22 -08:00
Dmitry Kovalev
485682c30a Adding select_tx_size() function.
Change-Id: I9d18b31661a2ccdcd4e25956882c7fc2d4b7002e
2013-11-21 15:55:40 -08:00
Dmitry Kovalev
27e6b5b6bd Using num_4x4_blocks_* instead of b_{width, height}_log2.
Change-Id: I9ea3946c17b19f511565cd771037abe7db8b3ddb
2013-11-21 15:53:06 -08:00
Joshua Litt
3aeebfb231 Merge "Removing PARAMS macro for consistency" 2013-11-21 15:06:51 -08:00
Frank Galligan
fe847e7660 Merge "Revert "Add 16 wide neon horz loopfilter."" 2013-11-21 15:06:17 -08:00
levytamar82
8def766de2 vp9_short_fdct32x32_rd vp9_short_fdct32x32 optimized for AVX2
Change-Id: I6366e84490883b72362f762369d7e5bccb64f02f
2013-11-21 14:19:49 -08:00
Frank Galligan
97d1258375 Revert "Add 16 wide neon horz loopfilter."
The change caused mismatches with some test vectors on neon.

Original CL: https://gerrit.chromium.org/gerrit/#/c/67863/

Change-Id: I913891636d53783e93cb1865ca78ded1821dc4b0
2013-11-21 14:01:33 -08:00
Jim Bankoski
b38e42fe9d Don't write 0's to token_cache
This code only updates the token_cache if the result is non0.

Change-Id: Idcabd0b993a926fea9c29dbec134b9c5c4859b40
2013-11-21 12:52:15 -08:00
Dmitry Kovalev
864e7c51b6 Syncing update_coef_probs() implementation with decoder.
Using for loop based on max_tx_size instead of separate checks. Combining
build_coeff_contexts() with update_coef_probs().

Change-Id: Ie335a7db29830677fbc14478a9c190d3c1068665
2013-11-21 12:36:02 -08:00
Abo Talib Mahfoodh
ec2dbdd107 Improve vp9_fdct4x4_sse2 (x1.2)
Modifications are done to reduce the total clock cycle.
Speedup: 1.2

Tested with: park_joy_420_720p50.y4m

Change-Id: Ia36b87e62e2f80a5fadaf5628729aedc80f38f3f
2013-11-21 15:04:35 -05:00
Dmitry Kovalev
4896d5c7ef Moving {left, right}_block_mode to vp9_blockd.h.
Both functions have no relation to motion vectors, so moving them from
vp9_findnearmv.h to vp9_blockd.h.

Change-Id: I74f524267886ab0fff4a2da793a10c906ed0f43a
2013-11-21 11:43:53 -08:00
Yunqing Wang
e002bb99a8 Merge "Add filter_selectively_vert_row2 to enable parallel loopfiltering" 2013-11-21 11:25:55 -08:00
hkuang
370bf116a2 Merge "Remove unnecessary eob checking." 2013-11-21 11:24:02 -08:00
Frank Galligan
2dd77580c0 Merge "Add 16 wide neon horz loopfilter." 2013-11-21 10:29:30 -08:00
Yunqing Wang
b5e6d6cccf Add filter_selectively_vert_row2 to enable parallel loopfiltering
Added filter_selectively_vert_row2 to be ready for parallel
loopfiltering in vertical direction. This change did 2-row
filtering at a time. If 2 vertically adjacent 8x8 blocks do same
type of filtering, we can do 16-pixel filtering in parallel.

Next, we need to provide 16-pixel loopfiltering functions in c
and optimized versions for codec speedup.

Change-Id: Idf97bbdd70566e55bd30e1fd25cb8544e33291be
2013-11-21 09:53:15 -08:00
Yunqing Wang
6c4964602a Merge "Correct ssse3 8/16-pixel wide sub-pixel filter calculation" 2013-11-21 09:40:02 -08:00
Frank Galligan
98de15137e Add 16 wide neon horz loopfilter.
Add support to do 16 pixel horizontal filtering in Neon.
Nexus devices saw about 0.5% decode speed increase.

Change-Id: I2993f6c2d49f31fa74976879eeaa289fd3f4e15d
2013-11-21 09:39:36 -08:00
Dmitry Kovalev
c90b6bb101 Removing redundant call of vp9_init_mbmode_probs().
This function is called from vp9_setup_past_independence() which is called
before the modified piece of code. Moving reset of inter_mode_probs  into
vp9_init_mbmode_probs() for consistency.

Change-Id: Ib188e8798e1fbe15407fd501406761b746fdda95
2013-11-20 21:56:38 -08:00
Tom Finegan
44dd3274da vpxenc: Warn users about incorrect quantizer settings.
Also, clean up stylistically questionable code near my changes.

Change-Id: I92c96a274cb339b7b74174a608f94ae86aba8354
2013-11-20 17:18:28 -08:00
Dmitry Kovalev
77a865d970 Merge "Removing old code." 2013-11-20 14:43:03 -08:00
Dmitry Kovalev
a218a96784 Merge "Adding MV_FP_SIZE constant." 2013-11-20 14:39:58 -08:00
Dmitry Kovalev
d54893da1d Merge "Using is_inter_block() and has_second_ref() functions." 2013-11-20 14:39:50 -08:00
Dmitry Kovalev
87ff7f2af3 Removing old code.
Change-Id: I67d1681c7b17661deb792c5e6a9e2014a73ff9b7
2013-11-20 14:05:21 -08:00
Dmitry Kovalev
a84c5f0f64 Using txfrm_block_to_raster_xy() in encoder.
Change-Id: Ibe847000467fe46bf8ce87d8f1ef8f2d5ad1eaf4
2013-11-20 13:58:21 -08:00
Yunqing Wang
256cf7ee7d Correct ssse3 8/16-pixel wide sub-pixel filter calculation
Although no mismatch was indicated for 8/16 wide sub-pixel filters
in issue 661, they had similar problems that could cause mismatch
potentially. This patch fixed calculations in HORIZx8/16
and VERTx8/16.

Change-Id: I169961c9d40a20340995b7d22aafc89ccf30bfca
2013-11-20 12:52:56 -08:00
Dmitry Kovalev
79b5a2b142 Removing plane_block_{width, height} functions.
Change-Id: I29c0dfcf41a1253d5e2a0d2ff740c0c38ebaa5a2
2013-11-20 12:39:29 -08:00
Jim Bankoski
302c33e49f Merge "Clean up removal of vp9_pareto8 table." 2013-11-20 12:30:03 -08:00
Dmitry Kovalev
1a69eed2c4 Using is_inter_block() and has_second_ref() functions.
Change-Id: Iadd771a33c8874f3b774923bca4da3c8fe5429ee
2013-11-20 12:08:10 -08:00
Dmitry Kovalev
4956fcd31b Adding MV_FP_SIZE constant.
Change-Id: I98d750ee92ff51fb714980418ea28be3b1d0f3c6
2013-11-20 12:07:57 -08:00
Yunqing Wang
82f8ae4c5b Merge "Support for extended feature flags enumeration leaf in CPUID instruction" 2013-11-20 12:01:39 -08:00
hkuang
6debc446e0 Remove unnecessary eob checking.
Change-Id: Ia568f70bddc1a2b62141a0197459119ca74c22b5
2013-11-20 11:58:11 -08:00
Jim Bankoski
25aae73a30 Merge "remove the model and copy in pack_mb_tokens" 2013-11-20 11:34:30 -08:00
Jim Bankoski
5bbb0c6295 Clean up removal of vp9_pareto8 table.
Change-Id: I5556e8d1fc150be8a3e93af21900829b59a500dc
2013-11-20 11:17:26 -08:00
Erik Niemeyer
9f26861147 Support for extended feature flags enumeration leaf in CPUID instruction
This CL fixes an overcite with the AVX2 support CL previously
merged (Change-Id: Idc03f3fca4bf2d0afd33631ea1d3caf8fc34ec29) that
prevented runtime execution of AVX2 code in WebM. 

Background:
Starting with the Sandybridge processor, the CPUID instruction was
enhanced to add various extended feature flag enumeration leaves.
Reading these leaves requires an additional input value for the CPUID
instruction which is stored in ECX. This change adds this second input
value for all ARCH_X86 and ARCH_x86_64 targets to the CPUID macros,
allowing checks of EBX bit 5 for AVX2 support. This capability will be
required moving forward to check for future processor features.

Change-Id: Ie9d872bc9ff68dad4b6578e4544e4dfd0ae26c36
2013-11-20 11:10:54 -08:00
Jingning Han
81b9fd4310 Merge "Take out assertion from inverse transforms" 2013-11-20 10:55:27 -08:00
Jim Bankoski
03276bf6e6 remove the model and copy in pack_mb_tokens
Change-Id: I00a5203c8ed76c184d936fccf93d76e7c06773d3
2013-11-20 10:06:04 -08:00
Yunqing Wang
0ef63f596d Fix stack pointer in sub-pixel filters
In commit "3d50da5397d20abc932d81453b26cde758293a40", the stack
pointer was modified while aligning the stack, and it needed to
be pop out at the end.

Change-Id: I062971e195f1f2ab9d0ab5fb84dcf215a0fcaa67
2013-11-20 09:42:44 -08:00
Guillaume Martres
b00057c88a Merge "vpxenc: add --aq-mode flag to control adaptive quantization" 2013-11-20 08:13:28 -08:00
Dmitry Kovalev
c511f560bf Cleaning up entropy probability update in encoder.
Change-Id: I94cb9e3d910dff74bf90906dd96e3a4e06ebdbe6
2013-11-19 19:49:56 -08:00
Marco Paniconi
d486427cf1 Undo the vp8 change in "Reduce loop filter in..."
Patch in https://gerrit.chromium.org/gerrit/#/c/41176/
was merged into repository by mistake.

Change-Id: I235c71af26bb2d72698c8aac2301e5a7e9c5f960
2013-11-19 17:16:00 -08:00
Jim Bankoski
7a8a68e2bd Merge "scan order table lookup same for encoder and decoder" 2013-11-19 16:22:48 -08:00
Yunqing Wang
e8f8e77642 Merge "Fix decoder mismatch with ssse3 enabled" 2013-11-19 16:19:32 -08:00
Jingning Han
75673cfc3d Merge "Use restore_dst_buf in handle_inter_mode" 2013-11-19 16:19:04 -08:00
Dmitry Kovalev
e8346f8cf7 Merge "Cleaning up probability/cost functions." 2013-11-19 16:08:16 -08:00
Yaowu Xu
dd04ff506b Merge "Move vp9_setup_interp_filter() to encoder" 2013-11-19 16:01:19 -08:00
Jingning Han
82c32fe1b5 Use restore_dst_buf in handle_inter_mode
There are many places in handle_inter_mode that need to restore the
dst buffer pointers, due to buffer pointer swap and early rd search
breakout. This commit wraps these operations into an inline function
for clean-up.

Change-Id: I0462e8c41c8bc3cd8db07395489cac03d8e5be54
2013-11-19 15:33:16 -08:00
Jim Bankoski
d6667dd54f scan order table lookup same for encoder and decoder
Change-Id: I473947b5ca70b7a81151926284bff86f8555492a
2013-11-19 15:31:43 -08:00
Tom Finegan
a944deae97 Merge "vpxdec: Relocate WebM input support." 2013-11-19 15:30:41 -08:00
Yunqing Wang
3d50da5397 Fix decoder mismatch with ssse3 enabled
This patch fixed issue 661: "Decoder produces mismatched outputs
with ssse3 enabled and disabled." In sub-pixel filters, a pixel
value was multiplied by a filter coefficient, and the results
were added up. The order of adding up these multiplications had to
be arranged carefully to prevent incorrect overflowing.

Change-Id: Id08af4200fea9e1b896fc40157b8651c2c7e80f2
2013-11-19 15:10:04 -08:00
Dmitry Kovalev
65cee2f01a Merge "Simplifying partition context calculation." 2013-11-19 15:09:01 -08:00
Dmitry Kovalev
86b629efb6 Merge "Calculating dst pointer only once per transform block." 2013-11-19 15:05:46 -08:00
Dmitry Kovalev
e55d3e6d1b Cleaning up probability/cost functions.
Change-Id: Ifad4b0e6355ce49fcc6f470becc080e8069452ee
2013-11-19 14:59:12 -08:00
Jim Bankoski
60aba6558f Merge "entropy code speedup" 2013-11-19 14:58:44 -08:00
Yaowu Xu
df78fea166 Move vp9_setup_interp_filter() to encoder
As it is used in encoder only.

Change-Id: I5f2a8abbe72bb18cbf6ce36a3dc7e132aeae8ec2
2013-11-19 14:57:58 -08:00
Jim Bankoski
69541e1dec Merge "Reduce loop filter in cyclic refresh." 2013-11-19 14:42:32 -08:00
Yaowu Xu
f92cfa1ca6 Merge "Move vp9_sadmxn.h from common to encoder" 2013-11-19 14:41:33 -08:00
Jim Bankoski
8cf352abac entropy code speedup
Change-Id: Ic316d3374ff9a2b43897272260947d56765a0fdd
2013-11-19 14:31:38 -08:00
Jim Bankoski
ff4f1c4b76 scan order / neighbors converted to lookup
Change-Id: I64b189dfeee1cf3e90134a1a93497072f3361e5e
2013-11-19 12:55:44 -08:00
Yaowu Xu
30b03050a2 Move vp9_sadmxn.h from common to encoder
Change-Id: I6f6ba91b1b8b280902b171472314d665aa0baf0b
2013-11-19 12:46:08 -08:00
Yaowu Xu
5b3a8563de Merge "Fix a bug in vpxenc reading raw input frame" 2013-11-19 11:26:02 -08:00
Dmitry Kovalev
f6ec323906 Simplifying partition context calculation.
Reversing bit order of partition_context_lookup, and modifying accordingly
update_partition_context() and partition_plane_context().

Change-Id: I64a11f1a94962a3bf217de2f50698cb781db71a5
2013-11-19 11:17:30 -08:00
Johann
296b4be859 Merge "Disable avx/avx2 for Visual Studio 2010" 2013-11-19 11:17:20 -08:00
Yunqing Wang
f16fb829e6 Merge "Improve vp9_iht4x4_16_add_sse2 (x1.341)" 2013-11-19 11:11:47 -08:00
Yaowu Xu
a7c7e78aa5 Fix a bug in vpxenc reading raw input frame
The bug was introduced in 00a35aab. The reading of raw yuv input frame
was off by 4 bytes.

Change-Id: I6923ea5528aa529a47a06b64adca8f94847f19a6
2013-11-19 10:28:30 -08:00
Tom Finegan
2abe2d4664 vpxdec: Relocate WebM input support.
- Move it to webmdec.c and webmdec.h.
- Also, tidy up obvious style nits in the vicinity of code I was
  already touching.

Change-Id: Ie2898d06e73c1e9030d9c8d465b73ee7edc3c02a
2013-11-19 10:26:51 -08:00
Joshua Litt
51490e5654 Removing PARAMS macro for consistency
Change-Id: I23ed873a6c47b15491a2ffbcdd4f0fdeef1207a0
2013-11-19 09:28:18 -08:00
Dmitry Kovalev
953b1e9683 Removing raster_block_offset_uint8() function.
There is no need to use that function, it is much clear to pass offset
directly to the buffer.

Change-Id: I9026cb0c5094c46f97df5d7f7daeb952f2843b24
2013-11-18 19:00:49 -08:00
Dmitry Kovalev
9e1e7bee48 Merge "Finally removing txfrm_block_to_raster_block() function." 2013-11-18 18:43:16 -08:00
Dmitry Kovalev
b5c4520101 Calculating dst pointer only once per transform block.
Change-Id: I23fea0a2e85be8373600e3e2dae98d36acde389c
2013-11-18 18:37:53 -08:00
Dmitry Kovalev
220af9ac2c Merge "Cleaning up vp9_entropy.c file." 2013-11-18 18:04:56 -08:00
Abo Talib Mahfoodh
613e2d2e90 Improve vp9_iht4x4_16_add_sse2 (x1.341)
This rebase is a better implementation of the previous ones.

Modifications are done to reduce the total clock cycle.
Speedup: 1.341
Compiled with -O3
Tested with: park_joy_420_720p50.y4m

Change-Id: I940eaf283f60597ca0d9d2e13d518878d55ff02d
2013-11-18 20:53:13 -05:00
Dmitry Kovalev
d8c06d23da Cleaning up vp9_entropy.c file.
Change-Id: I568f5e2d4ef2f2affe013ba1691ffb546f1fe8c6
2013-11-18 17:18:14 -08:00
Joshua Litt
a782d63954 Decoder performance test added to unit tests
Change-Id: Id578a5fe2039631cefd82dc2ef98cc62683194c3
2013-11-18 17:12:05 -08:00
Tom Finegan
a7c4209724 Merge "vpxdec: Include frame number when decode fails." 2013-11-18 16:23:20 -08:00
Tom Finegan
f225b1e69b vpxdec: Include frame number when decode fails.
Change-Id: I6ea460af884d522319735e4416a2dd66c2f35d27
2013-11-18 16:13:04 -08:00
Yaowu Xu
040dc8c945 Merge "Fixed a bug in commit a4a5a210" 2013-11-18 15:43:41 -08:00
Yaowu Xu
a42ab027fd Merge "Move vp9_extend.{h,c} from common to encoder" 2013-11-18 15:43:32 -08:00
Yaowu Xu
e63aaf9ad1 Fixed a bug in commit a4a5a210
Commit a4a5a210 enabled lossless coding, but the commit incorrectly
disabled the usage of skip in encoder even when skip should be used.
This commit make sure that skip is enabled even in lossless mode.

Change-Id: I276954f952c6ac68f17a316ebc72f09001228a08
2013-11-18 14:51:04 -08:00
Johann
e813843b46 Disable avx/avx2 for Visual Studio 2010
VS2010 only supports avx. There is currently no avx code
in libvpx so don't create a special case for it.

Change-Id: Iacb10ea4762155412e04f23904b4324d01451fbd
2013-11-18 13:30:19 -08:00
Yaowu Xu
1c61e1960d Move vp9_extend.{h,c} from common to encoder
Since they used in encoder only. This commit also re-order includes
for the files that include vp9_extend.h

Change-Id: I929fc113f2135d3198cd1fc6a17434e5a2f8a459
2013-11-18 12:43:36 -08:00
Jingning Han
46ce6ddec4 Merge "Constrain encoder motion search range" 2013-11-18 12:35:34 -08:00
Jingning Han
bbe68fbd2a Constrain encoder motion search range
Explicitly constrain the upper limit of motion search range (in the
unit of full pixel) to be [-1023, +1023]. It is intended to control
the effective motion search range for 4K sequences.

Change-Id: I645539c70885eec0f155781f439d97d333336e88
2013-11-18 11:19:45 -08:00
Yunqing Wang
e3168b0c54 Merge "Do horizontal loopfiltering in parallel" 2013-11-18 10:03:41 -08:00
Yaowu Xu
c8e38a6c69 Merge "Add support for VC++2013" 2013-11-18 09:32:19 -08:00
Jim Bankoski
83eb1975df partition context update speedup
This removes a lot of operations in setting partition context...

Change-Id: I365e6f5607ece85190cb21443988816dfa510ce3
2013-11-17 06:58:08 -08:00
Tom Finegan
5ae4ba5774 vpxdec: Restore IVF support.
Refactored IVF frame reading code out into ivf_read_frame(). Forgot
to actually make the function call in read_frame().

Change-Id: Ie9f6917e70bd26d0352a761932465c60a29a1f81
2013-11-16 08:31:20 -08:00
Yunqing Wang
64f728caef Do horizontal loopfiltering in parallel
This patch followed "Rewrite filter_selectively_horiz for parallel
loopfiltering" commit, and added x86 SSE2 optimization to do
16-pixel filtering in parallel. Also, corrected the declaration
of aligned arrays. For 8-pixel-in-parallel case, improved the
calculation of the masks and filters. Updated the threshold loading
since the thresholds were already duplicated. Updated neon C functions
to call neon loopfilters twice.

Using tulip clip, tests showed it gave a ~1.5% decoder speed gain.

Change-Id: Id02638626ac27a4b0e0b09d71792a24c0499bd35
2013-11-15 16:18:43 -08:00
hkuang
7fb5e73897 Merge "Let the idct vp9_idct32x32_34_add = vp9_idct32x32_1024_add on arm until we implenment real vp9_idct32x32_34_add_neon." 2013-11-15 15:45:49 -08:00
Jingning Han
bdc4371174 Take out assertion from inverse transforms
Separate the rounding and right shift operations of forward transform
from those of inverse transform. Take out the assertion check from
inverse transforms. If the transform coefficients were constructed to
cause intermediate steps of inverse transform overflow, the codec will
just let it overflow without breaking the decoding flow.

Change-Id: I73cfc3706c4e840fc543a77cbc4cdb0b05d07730
2013-11-15 15:30:47 -08:00
Yaowu Xu
dc90541563 Merge "Renamed two files" 2013-11-15 15:20:23 -08:00
hkuang
7424492a0b Let the idct vp9_idct32x32_34_add = vp9_idct32x32_1024_add
on arm until we implenment real vp9_idct32x32_34_add_neon.

This issue is due to commit 47665452f0
Merge "Add 32x32 idct function for eob<=34 case".

Change-Id: I56b5f0abc20e7dd1bba521f78a995e85d65ea296
2013-11-15 14:59:16 -08:00
Dmitry Kovalev
3b9befe52e Merge "Removing vp9_encodeintra.{h, c} files." 2013-11-15 13:38:20 -08:00
Yaowu Xu
49cbe4580d Renamed two files
from vp9_decodframe.{c,h} to vp9_decodeframe.{c,h}

Change-Id: I21ac4b14fc90246e3f16bd90c52c12d126d791f8
2013-11-15 12:48:43 -08:00
Dmitry Kovalev
5380739a87 Removing vp9_encodeintra.{h, c} files.
There was only one function in *.c file, so moving it to vp9_encodemb.c.

Change-Id: I728859d08b3d6c05c33c1c5b21f0ea1d0e0f83af
2013-11-15 12:17:16 -08:00
Tom Finegan
6f25c15d23 Merge "vpx[dec|enc]: Extract IVF support from the apps." 2013-11-15 11:21:57 -08:00
Guillaume Martres
17084657e6 vpxenc: add --aq-mode flag to control adaptive quantization
Change-Id: I57e1ad4bed3487df12893ced77c49093f8755706
2013-11-15 19:42:20 +01:00
Tom Finegan
00a35aab7c vpx[dec|enc]: Extract IVF support from the apps.
- Move IVF reading support into ivfdec.c and ivfdec.h
- Move IVF writing support into ivfenc.c and ivfenc.h
- Removed IVF writing code from the SVC example in favor of ivfenc.

Change-Id: I70adf6240d0320fdd232d8546ed573f0f68dd793
2013-11-15 08:33:24 -08:00
Dmitry Kovalev
49fbbf72fa Finally removing txfrm_block_to_raster_block() function.
We only use txfrm_block_to_raster_xy() now.

Change-Id: I4242cd592da99e761041acf9fef1bac3d55a48e1
2013-11-14 13:45:51 -08:00
Yaowu Xu
a638bdf4c4 Add support for VC++2013
Change-Id: Iccc15aacee1fee9995dfd974bc89913891ad67a9
2013-11-14 12:05:59 -08:00
Marco Paniconi
07ce775189 Reduce loop filter in cyclic refresh.
Reduce the delta loop filter for blocks that are cyclicly refreshed.
This helps to reduce the dot artifacts that may happen
when zero_mv blocks are repeatedly loop-filtered.

This change, along with the fix in:
https://gerrit.chromium.org/gerrit/#/c/40409/
helps to reduce this artifact, but cannot remove the dot artifacts completely.

Change-Id: I44675e7a0f59295b648a3b7d4956fb301231a97f
2013-01-11 16:46:09 -08:00
276 changed files with 21150 additions and 8397 deletions

6
args.h
View File

@@ -9,8 +9,8 @@
*/
#ifndef ARGS_H
#define ARGS_H
#ifndef ARGS_H_
#define ARGS_H_
#include <stdio.h>
struct arg {
@@ -48,4 +48,4 @@ unsigned int arg_parse_uint(const struct arg *arg);
int arg_parse_int(const struct arg *arg);
struct vpx_rational arg_parse_rational(const struct arg *arg);
int arg_parse_enum_or_int(const struct arg *arg);
#endif
#endif // ARGS_H_

View File

@@ -321,7 +321,7 @@ bail:
return 1;
}
char *parse_elf_string_table(elf_obj_t *elf, int s_idx, int idx) {
const char *parse_elf_string_table(elf_obj_t *elf, int s_idx, int idx) {
if (elf->bits == 32) {
Elf32_Shdr shdr;

View File

@@ -24,7 +24,7 @@ sub FixThumbInstructions($$)
# with left shift, addition and a right shift (to restore the
# register to the original value). Currently the right shift
# isn't necessary in the code base since the values in these
# registers aren't used, but doing the shift for consitency.
# registers aren't used, but doing the shift for consistency.
# This converts instructions such as "add r12, r12, r5, lsl r4"
# into the sequence "lsl r5, r4", "add r12, r12, r5", "lsr r5, r4".
s/^(\s*)(add)(\s+)(r\d+),\s*(r\d+),\s*(r\d+),\s*lsl (r\d+)/$1lsl$3$6, $7\n$1$2$3$4, $5, $6\n$1lsr$3$6, $7/g;

10
configure vendored
View File

@@ -24,6 +24,7 @@ Advanced options:
${toggle_examples} examples
${toggle_docs} documentation
${toggle_unit_tests} unit tests
${toggle_decode_perf_tests} build decoder perf tests with unit tests
--libc=PATH path to alternate libc
--as={yasm|nasm|auto} use specified assembler [auto, yasm preferred]
--sdk-path=PATH path to root of sdk (android builds only)
@@ -255,7 +256,14 @@ EXPERIMENT_LIST="
multiple_arf
non420
alpha
masked_interinter
interintra
masked_interintra
filterintra
ext_tx
ext_tx_dst32
"
CONFIG_LIST="
external_build
install_docs
@@ -302,6 +310,7 @@ CONFIG_LIST="
postproc_visualizer
os_support
unit_tests
decode_perf_tests
multi_res_encoding
temporal_denoising
experimental
@@ -355,6 +364,7 @@ CMDLINE_SELECT="
small
postproc_visualizer
unit_tests
decode_perf_tests
multi_res_encoding
temporal_denoising
experimental

View File

@@ -23,7 +23,9 @@ vpxdec.SRCS += md5_utils.c md5_utils.h
vpxdec.SRCS += vpx_ports/vpx_timer.h
vpxdec.SRCS += vpx/vpx_integer.h
vpxdec.SRCS += args.c args.h
vpxdec.SRCS += ivfdec.c ivfdec.h
vpxdec.SRCS += tools_common.c tools_common.h
vpxdec.SRCS += webmdec.c webmdec.h
vpxdec.SRCS += nestegg/halloc/halloc.h
vpxdec.SRCS += nestegg/halloc/src/align.h
vpxdec.SRCS += nestegg/halloc/src/halloc.c
@@ -35,8 +37,11 @@ vpxdec.SRCS += $(LIBYUV_SRCS)
vpxdec.GUID = BA5FE66F-38DD-E034-F542-B1578C5FB950
vpxdec.DESCRIPTION = Full featured decoder
UTILS-$(CONFIG_ENCODERS) += vpxenc.c
vpxenc.SRCS += args.c args.h y4minput.c y4minput.h
vpxenc.SRCS += args.c args.h y4minput.c y4minput.h vpxenc.h
vpxenc.SRCS += ivfdec.c ivfdec.h
vpxenc.SRCS += ivfenc.c ivfenc.h
vpxenc.SRCS += tools_common.c tools_common.h
vpxenc.SRCS += warnings.c warnings.h
vpxenc.SRCS += webmenc.c webmenc.h
vpxenc.SRCS += vpx_ports/mem_ops.h
vpxenc.SRCS += vpx_ports/mem_ops_aligned.h
@@ -53,18 +58,11 @@ vp8_scalable_patterns.GUID = 0D6A210B-F482-4D6F-8570-4A9C01ACC88C
vp8_scalable_patterns.DESCRIPTION = Temporal Scalability Encoder
UTILS-$(CONFIG_VP9_ENCODER) += vp9_spatial_scalable_encoder.c
vp9_spatial_scalable_encoder.SRCS += args.c args.h
vp9_spatial_scalable_encoder.SRCS += ivfenc.c ivfenc.h
vp9_spatial_scalable_encoder.SRCS += tools_common.c tools_common.h
vp9_spatial_scalable_encoder.GUID = 4A38598D-627D-4505-9C7B-D4020C84100D
vp9_spatial_scalable_encoder.DESCRIPTION = Spatial Scalable Encoder
# Clean up old ivfenc, ivfdec binaries.
ifeq ($(CONFIG_MSVS),yes)
CLEAN-OBJS += $(foreach p,$(VS_PLATFORMS),$(p)/Release/ivfenc.exe)
CLEAN-OBJS += $(foreach p,$(VS_PLATFORMS),$(p)/Release/ivfdec.exe)
else
CLEAN-OBJS += ivfenc{.c.o,.c.d,.dox,.exe,}
CLEAN-OBJS += ivfdec{.c.o,.c.d,.dox,.exe,}
endif
# XMA example disabled for now, not used in VP8
#UTILS-$(CONFIG_DECODERS) += example_xma.c
#example_xma.GUID = A955FC4A-73F1-44F7-135E-30D84D32F022

119
ivfdec.c Normal file
View File

@@ -0,0 +1,119 @@
/*
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "./ivfdec.h"
#include <stdio.h>
#include <stdlib.h>
int file_is_ivf(struct VpxInputContext *input_ctx) {
char raw_hdr[32];
int is_ivf = 0;
// TODO(tomfinegan): This can eventually go away, but for now it's required
// because the means by which file types are detected differ in vpxdec and
// vpxenc.
rewind(input_ctx->file);
if (fread(raw_hdr, 1, 32, input_ctx->file) == 32) {
if (raw_hdr[0] == 'D' && raw_hdr[1] == 'K' &&
raw_hdr[2] == 'I' && raw_hdr[3] == 'F') {
is_ivf = 1;
if (mem_get_le16(raw_hdr + 4) != 0) {
fprintf(stderr, "Error: Unrecognized IVF version! This file may not"
" decode properly.");
}
input_ctx->fourcc = mem_get_le32(raw_hdr + 8);
input_ctx->width = mem_get_le16(raw_hdr + 12);
input_ctx->height = mem_get_le16(raw_hdr + 14);
input_ctx->framerate.numerator = mem_get_le32(raw_hdr + 16);
input_ctx->framerate.denominator = mem_get_le32(raw_hdr + 20);
/* Some versions of vpxenc used 1/(2*fps) for the timebase, so
* we can guess the framerate using only the timebase in this
* case. Other files would require reading ahead to guess the
* timebase, like we do for webm.
*/
if (input_ctx->framerate.numerator < 1000) {
/* Correct for the factor of 2 applied to the timebase in the
* encoder.
*/
if (input_ctx->framerate.numerator & 1)
input_ctx->framerate.denominator <<= 1;
else
input_ctx->framerate.numerator >>= 1;
} else {
/* Don't know FPS for sure, and don't have readahead code
* (yet?), so just default to 30fps.
*/
input_ctx->framerate.numerator = 30;
input_ctx->framerate.denominator = 1;
}
}
}
if (!is_ivf) {
rewind(input_ctx->file);
input_ctx->detect.buf_read = 0;
} else {
input_ctx->detect.position = 4;
}
return is_ivf;
}
int ivf_read_frame(struct VpxInputContext *input_ctx,
uint8_t **buffer,
size_t *bytes_read,
size_t *buffer_size) {
char raw_header[IVF_FRAME_HDR_SZ] = {0};
size_t frame_size = 0;
FILE *infile = input_ctx->file;
if (input_ctx->file_type != FILE_TYPE_IVF)
return 0;
if (fread(raw_header, IVF_FRAME_HDR_SZ, 1, infile) != 1) {
if (!feof(infile))
warn("Failed to read frame size\n");
} else {
frame_size = mem_get_le32(raw_header);
if (frame_size > 256 * 1024 * 1024) {
warn("Read invalid frame size (%u)\n", (unsigned int)frame_size);
frame_size = 0;
}
if (frame_size > *buffer_size) {
uint8_t *new_buffer = realloc(*buffer, 2 * frame_size);
if (new_buffer) {
*buffer = new_buffer;
*buffer_size = 2 * frame_size;
} else {
warn("Failed to allocate compressed data buffer\n");
frame_size = 0;
}
}
}
if (!feof(infile)) {
if (fread(*buffer, 1, frame_size, infile) != frame_size) {
warn("Failed to read full frame\n");
return 1;
}
*bytes_read = frame_size;
return 0;
}
return 1;
}

30
ivfdec.h Normal file
View File

@@ -0,0 +1,30 @@
/*
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef IVFDEC_H_
#define IVFDEC_H_
#include "./tools_common.h"
#ifdef __cplusplus
extern "C" {
#endif
int file_is_ivf(struct VpxInputContext *input);
int ivf_read_frame(struct VpxInputContext *input,
uint8_t **buffer,
size_t *bytes_read,
size_t *buffer_size);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif // IVFDEC_H_

62
ivfenc.c Normal file
View File

@@ -0,0 +1,62 @@
/*
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "./ivfenc.h"
#include "./tools_common.h"
#include "vpx/vpx_encoder.h"
#include "vpx_ports/mem_ops.h"
void ivf_write_file_header(FILE *outfile,
const struct vpx_codec_enc_cfg *cfg,
unsigned int fourcc,
int frame_cnt) {
char header[32];
if (cfg->g_pass != VPX_RC_ONE_PASS && cfg->g_pass != VPX_RC_LAST_PASS)
return;
header[0] = 'D';
header[1] = 'K';
header[2] = 'I';
header[3] = 'F';
mem_put_le16(header + 4, 0); /* version */
mem_put_le16(header + 6, 32); /* headersize */
mem_put_le32(header + 8, fourcc); /* four CC */
mem_put_le16(header + 12, cfg->g_w); /* width */
mem_put_le16(header + 14, cfg->g_h); /* height */
mem_put_le32(header + 16, cfg->g_timebase.den); /* rate */
mem_put_le32(header + 20, cfg->g_timebase.num); /* scale */
mem_put_le32(header + 24, frame_cnt); /* length */
mem_put_le32(header + 28, 0); /* unused */
(void) fwrite(header, 1, 32, outfile);
}
void ivf_write_frame_header(FILE *outfile, const struct vpx_codec_cx_pkt *pkt) {
char header[12];
vpx_codec_pts_t pts;
if (pkt->kind != VPX_CODEC_CX_FRAME_PKT)
return;
pts = pkt->data.frame.pts;
mem_put_le32(header, (int)pkt->data.frame.sz);
mem_put_le32(header + 4, pts & 0xFFFFFFFF);
mem_put_le32(header + 8, pts >> 32);
(void) fwrite(header, 1, 12, outfile);
}
void ivf_write_frame_size(FILE *outfile, size_t size) {
char header[4];
mem_put_le32(header, (int)size);
(void) fwrite(header, 1, 4, outfile);
}

33
ivfenc.h Normal file
View File

@@ -0,0 +1,33 @@
/*
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef IVFENC_H_
#define IVFENC_H_
#include "./tools_common.h"
struct vpx_codec_enc_cfg;
struct vpx_codec_cx_pkt;
#ifdef __cplusplus
extern "C" {
#endif
void ivf_write_file_header(FILE *outfile,
const struct vpx_codec_enc_cfg *cfg,
uint32_t fourcc,
int frame_cnt);
void ivf_write_frame_header(FILE *outfile, const struct vpx_codec_cx_pkt *pkt);
void ivf_write_frame_size(FILE *outfile, size_t size);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif // IVFENC_H_

View File

@@ -183,6 +183,7 @@ CODEC_EXPORTS-$(CONFIG_DECODERS) += vpx/exports_dec
INSTALL-LIBS-yes += include/vpx/vpx_codec.h
INSTALL-LIBS-yes += include/vpx/vpx_image.h
INSTALL-LIBS-yes += include/vpx/vpx_external_frame_buffer.h
INSTALL-LIBS-yes += include/vpx/vpx_integer.h
INSTALL-LIBS-$(CONFIG_DECODERS) += include/vpx/vpx_decoder.h
INSTALL-LIBS-$(CONFIG_ENCODERS) += include/vpx/vpx_encoder.h

View File

@@ -20,8 +20,8 @@
* Still in the public domain.
*/
#ifndef MD5_H
#define MD5_H
#ifndef MD5_UTILS_H_
#define MD5_UTILS_H_
#define md5byte unsigned char
#define UWORD32 unsigned int
@@ -38,4 +38,4 @@ void MD5Update(struct MD5Context *context, md5byte const *buf, unsigned len);
void MD5Final(unsigned char digest[16], struct MD5Context *context);
void MD5Transform(UWORD32 buf[4], UWORD32 const in[16]);
#endif /* !MD5_H */
#endif // MD5_UTILS_H_

View File

@@ -26,6 +26,11 @@ class ACMRandom {
void Reset(int seed) {
random_.Reseed(seed);
}
uint16_t Rand16(void) {
const uint32_t value =
random_.Generate(testing::internal::Random::kMaxRange);
return (value >> 16) & 0xffff;
}
uint8_t Rand8(void) {
const uint32_t value =

View File

@@ -67,7 +67,7 @@ TEST_P(BordersTest, TestLowBitrate) {
cfg_.g_lag_in_frames = 25;
cfg_.rc_2pass_vbr_minsection_pct = 5;
cfg_.rc_2pass_vbr_minsection_pct = 2000;
cfg_.rc_2pass_vbr_maxsection_pct = 2000;
cfg_.rc_target_bitrate = 200;
cfg_.rc_min_quantizer = 40;

View File

@@ -26,6 +26,8 @@ extern "C" {
#include "test/encode_test_driver.h"
namespace libvpx_test {
const int kCodecFactoryParam = 0;
class CodecFactory {
public:
CodecFactory() {}

View File

@@ -44,6 +44,8 @@ struct ConvolveFunctions {
convolve_fn_t hv8_avg_;
};
typedef std::tr1::tuple<int, int, const ConvolveFunctions*> convolve_param_t;
// Reference 8-tap subpixel filter, slightly modified to fit into this test.
#define VP9_FILTER_WEIGHT 128
#define VP9_FILTER_SHIFT 7
@@ -169,7 +171,7 @@ void filter_average_block2d_8_c(const uint8_t *src_ptr,
output_width, output_height);
}
class ConvolveTest : public PARAMS(int, int, const ConvolveFunctions*) {
class ConvolveTest : public ::testing::TestWithParam<convolve_param_t> {
public:
static void SetUpTestCase() {
// Force input_ to be unaligned, output to be 16 byte aligned.

View File

@@ -193,7 +193,10 @@ class DatarateTestVP9 : public ::libvpx_test::EncoderTest,
virtual void ResetModel() {
last_pts_ = 0;
bits_in_buffer_model_ = cfg_.rc_target_bitrate * cfg_.rc_buf_initial_sz;
frame_number_ = 0;
first_drop_ = 0;
num_drops_ = 0;
bits_total_ = 0;
duration_ = 0.0;
}
@@ -209,8 +212,29 @@ class DatarateTestVP9 : public ::libvpx_test::EncoderTest,
}
virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
// Time since last timestamp = duration.
vpx_codec_pts_t duration = pkt->data.frame.pts - last_pts_;
// Add to the buffer the bits we'd expect from a constant bitrate server.
bits_in_buffer_model_ += duration * timebase_ * cfg_.rc_target_bitrate
* 1000;
// Buffer should not go negative.
ASSERT_GE(bits_in_buffer_model_, 0) << "Buffer Underrun at frame "
<< pkt->data.frame.pts;
const int frame_size_in_bits = pkt->data.frame.sz * 8;
bits_total_ += frame_size_in_bits;
// If first drop not set and we have a drop set it to this time.
if (!first_drop_ && duration > 1)
first_drop_ = last_pts_ + 1;
// Update the number of frame drops.
if (duration > 1) {
num_drops_+= (duration - 1);
}
// Update the most recent pts.
last_pts_ = pkt->data.frame.pts;
++frame_number_;
@@ -231,13 +255,17 @@ class DatarateTestVP9 : public ::libvpx_test::EncoderTest,
double duration_;
double effective_datarate_;
int set_cpu_used_;
int bits_in_buffer_model_;
int first_drop_;
int num_drops_;
};
// There is no buffer model/frame dropper in VP9 currently, so for now we
// have separate test for VP9 rate targeting for 1-pass CBR. We only check
// that effective datarate is within some range of target bitrate.
// No frame dropper, so we can't go to low bitrates.
// Check basic rate targeting,
TEST_P(DatarateTestVP9, BasicRateTargeting) {
cfg_.rc_buf_initial_sz = 500;
cfg_.rc_buf_optimal_sz = 500;
cfg_.rc_buf_sz = 1000;
cfg_.rc_dropframe_thresh = 1;
cfg_.rc_min_quantizer = 0;
cfg_.rc_max_quantizer = 63;
cfg_.rc_end_usage = VPX_CBR;
@@ -248,13 +276,58 @@ TEST_P(DatarateTestVP9, BasicRateTargeting) {
cfg_.rc_target_bitrate = i;
ResetModel();
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
ASSERT_GE(cfg_.rc_target_bitrate, effective_datarate_ * 0.9)
ASSERT_GE(static_cast<double>(cfg_.rc_target_bitrate),
effective_datarate_ * 0.85)
<< " The datarate for the file exceeds the target by too much!";
ASSERT_LE(cfg_.rc_target_bitrate, effective_datarate_ * 1.1)
ASSERT_LE(static_cast<double>(cfg_.rc_target_bitrate),
effective_datarate_ * 1.15)
<< " The datarate for the file missed the target!";
}
}
// Check that (1) the first dropped frame gets earlier and earlier
// as the drop frame threshold is increased, and (2) that the total number of
// frame drops does not decrease as we increase frame drop threshold.
// Use a lower qp-max to force some frame drops.
TEST_P(DatarateTestVP9, ChangingDropFrameThresh) {
cfg_.rc_buf_initial_sz = 500;
cfg_.rc_buf_optimal_sz = 500;
cfg_.rc_buf_sz = 1000;
cfg_.rc_undershoot_pct = 20;
cfg_.rc_undershoot_pct = 20;
cfg_.rc_dropframe_thresh = 10;
cfg_.rc_min_quantizer = 0;
cfg_.rc_max_quantizer = 50;
cfg_.rc_end_usage = VPX_CBR;
cfg_.rc_target_bitrate = 200;
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
30, 1, 0, 140);
const int kDropFrameThreshTestStep = 30;
int last_drop = 140;
int last_num_drops = 0;
for (int i = 10; i < 100; i += kDropFrameThreshTestStep) {
cfg_.rc_dropframe_thresh = i;
ResetModel();
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
ASSERT_GE(effective_datarate_, cfg_.rc_target_bitrate * 0.85)
<< " The datarate for the file is lower than target by too much!";
ASSERT_LE(effective_datarate_, cfg_.rc_target_bitrate * 1.15)
<< " The datarate for the file is greater than target by too much!";
ASSERT_LE(first_drop_, last_drop)
<< " The first dropped frame for drop_thresh " << i
<< " > first dropped frame for drop_thresh "
<< i - kDropFrameThreshTestStep;
ASSERT_GE(num_drops_, last_num_drops)
<< " The number of dropped frames for drop_thresh " << i
<< " < number of dropped frames for drop_thresh "
<< i - kDropFrameThreshTestStep;
last_drop = first_drop_;
last_num_drops = num_drops_;
}
}
VP8_INSTANTIATE_TEST_CASE(DatarateTest, ALL_TEST_MODES);
VP9_INSTANTIATE_TEST_CASE(DatarateTestVP9,
::testing::Values(::libvpx_test::kOnePassGood),

View File

@@ -264,6 +264,9 @@ typedef void (*fht_t) (const int16_t *in, int16_t *out, int stride,
typedef void (*iht_t) (const int16_t *in, uint8_t *out, int stride,
int tx_type);
typedef std::tr1::tuple<fdct_t, idct_t, int> dct_16x16_param_t;
typedef std::tr1::tuple<fht_t, iht_t, int> ht_16x16_param_t;
void fdct16x16_ref(const int16_t *in, int16_t *out, int stride, int tx_type) {
vp9_fdct16x16_c(in, out, stride);
}
@@ -412,8 +415,9 @@ class Trans16x16TestBase {
fht_t fwd_txfm_ref;
};
class Trans16x16DCT : public Trans16x16TestBase,
public PARAMS(fdct_t, idct_t, int) {
class Trans16x16DCT
: public Trans16x16TestBase,
public ::testing::TestWithParam<dct_16x16_param_t> {
public:
virtual ~Trans16x16DCT() {}
@@ -454,8 +458,9 @@ TEST_P(Trans16x16DCT, InvAccuracyCheck) {
RunInvAccuracyCheck();
}
class Trans16x16HT : public Trans16x16TestBase,
public PARAMS(fht_t, iht_t, int) {
class Trans16x16HT
: public Trans16x16TestBase,
public ::testing::TestWithParam<ht_16x16_param_t> {
public:
virtual ~Trans16x16HT() {}

View File

@@ -77,7 +77,9 @@ void reference_32x32_dct_2d(const int16_t input[kNumCoeffs],
typedef void (*fwd_txfm_t)(const int16_t *in, int16_t *out, int stride);
typedef void (*inv_txfm_t)(const int16_t *in, uint8_t *out, int stride);
class Trans32x32Test : public PARAMS(fwd_txfm_t, inv_txfm_t, int) {
typedef std::tr1::tuple<fwd_txfm_t, inv_txfm_t, int> trans_32x32_param_t;
class Trans32x32Test : public ::testing::TestWithParam<trans_32x32_param_t> {
public:
virtual ~Trans32x32Test() {}
virtual void SetUp() {
@@ -258,4 +260,14 @@ INSTANTIATE_TEST_CASE_P(
make_tuple(&vp9_fdct32x32_rd_sse2,
&vp9_idct32x32_1024_add_sse2, 1)));
#endif
#if HAVE_AVX2
INSTANTIATE_TEST_CASE_P(
AVX2, Trans32x32Test,
::testing::Values(
make_tuple(&vp9_fdct32x32_avx2,
&vp9_idct32x32_1024_add_sse2, 0),
make_tuple(&vp9_fdct32x32_rd_avx2,
&vp9_idct32x32_1024_add_sse2, 1)));
#endif
} // namespace

105
test/decode_perf_test.cc Normal file
View File

@@ -0,0 +1,105 @@
/*
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "test/codec_factory.h"
#include "test/decode_test_driver.h"
#include "test/ivf_video_source.h"
#include "test/md5_helper.h"
#include "test/util.h"
#include "test/webm_video_source.h"
#include "vpx_ports/vpx_timer.h"
#include "./vpx_version.h"
using std::tr1::make_tuple;
namespace {
#define VIDEO_NAME 0
#define THREADS 1
const double kUsecsInSec = 1000000.0;
/*
DecodePerfTest takes a tuple of filename + number of threads to decode with
*/
typedef std::tr1::tuple<const char *const, unsigned> decode_perf_param_t;
const decode_perf_param_t kVP9DecodePerfVectors[] = {
make_tuple("vp90-2-bbb_426x240_tile_1x1_180kbps.webm", 1),
make_tuple("vp90-2-bbb_640x360_tile_1x2_337kbps.webm", 2),
make_tuple("vp90-2-bbb_854x480_tile_1x2_651kbps.webm", 2),
make_tuple("vp90-2-bbb_1280x720_tile_1x4_1310kbps.webm", 4),
make_tuple("vp90-2-bbb_1920x1080_tile_1x1_2581kbps.webm", 1),
make_tuple("vp90-2-bbb_1920x1080_tile_1x4_2586kbps.webm", 4),
make_tuple("vp90-2-bbb_1920x1080_tile_1x4_fpm_2304kbps.webm", 4),
make_tuple("vp90-2-sintel_426x182_tile_1x1_171kbps.webm", 1),
make_tuple("vp90-2-sintel_640x272_tile_1x2_318kbps.webm", 2),
make_tuple("vp90-2-sintel_854x364_tile_1x2_621kbps.webm", 2),
make_tuple("vp90-2-sintel_1280x546_tile_1x4_1257kbps.webm", 4),
make_tuple("vp90-2-sintel_1920x818_tile_1x4_fpm_2279kbps.webm", 4),
make_tuple("vp90-2-tos_426x178_tile_1x1_181kbps.webm", 1),
make_tuple("vp90-2-tos_640x266_tile_1x2_336kbps.webm", 2),
make_tuple("vp90-2-tos_854x356_tile_1x2_656kbps.webm", 2),
make_tuple("vp90-2-tos_1280x534_tile_1x4_1306kbps.webm", 4),
make_tuple("vp90-2-tos_1920x800_tile_1x4_fpm_2335kbps.webm", 4),
};
/*
In order to reflect real world performance as much as possible, Perf tests
*DO NOT* do any correctness checks. Please run them alongside correctness
tests to ensure proper codec integrity. Furthermore, in this test we
deliberately limit the amount of system calls we make to avoid OS
preemption.
TODO(joshualitt) create a more detailed perf measurement test to collect
power/temp/min max frame decode times/etc
*/
class DecodePerfTest : public ::testing::TestWithParam<decode_perf_param_t> {
};
TEST_P(DecodePerfTest, PerfTest) {
const char *const video_name = GET_PARAM(VIDEO_NAME);
const unsigned threads = GET_PARAM(THREADS);
libvpx_test::WebMVideoSource video(video_name);
video.Init();
vpx_codec_dec_cfg_t cfg = {0};
cfg.threads = threads;
libvpx_test::VP9Decoder decoder(cfg, 0);
vpx_usec_timer t;
vpx_usec_timer_start(&t);
for (video.Begin(); video.cxdata() != NULL; video.Next()) {
decoder.DecodeFrame(video.cxdata(), video.frame_size());
}
vpx_usec_timer_mark(&t);
const double elapsed_secs = double(vpx_usec_timer_elapsed(&t))
/ kUsecsInSec;
const unsigned frames = video.frame_number();
const double fps = double(frames) / elapsed_secs;
printf("{\n");
printf("\t\"version\" : \"%s\",\n", VERSION_STRING_NOSP);
printf("\t\"videoName\" : \"%s\",\n", video_name);
printf("\t\"threadCount\" : %u,\n", threads);
printf("\t\"decodeTimeSecs\" : %f,\n", elapsed_secs);
printf("\t\"totalFrames\" : %u,\n", frames);
printf("\t\"framesPerSecond\" : %f\n", fps);
printf("}\n");
}
INSTANTIATE_TEST_CASE_P(VP9, DecodePerfTest,
::testing::ValuesIn(kVP9DecodePerfVectors));
} // namespace

View File

@@ -30,6 +30,7 @@ void DecoderTest::RunLoop(CompressedVideoSource *video) {
// Decode frames.
for (video->Begin(); video->cxdata(); video->Next()) {
PreDecodeFrameHook(*video, decoder);
vpx_codec_err_t res_dec = decoder->DecodeFrame(video->cxdata(),
video->frame_size());
ASSERT_EQ(VPX_CODEC_OK, res_dec) << decoder->DecodeError();

View File

@@ -76,6 +76,16 @@ class Decoder {
return detail ? detail : vpx_codec_error(&decoder_);
}
// Passes the external frame buffer information to libvpx.
vpx_codec_err_t SetExternalFrameBuffers(
vpx_codec_frame_buffer_t *fb_list, int fb_count,
vpx_realloc_frame_buffer_cb_fn_t cb, void *user_priv) {
InitOnce();
return vpx_codec_set_frame_buffers(&decoder_,
fb_list, fb_count,
cb, user_priv);
}
protected:
virtual const vpx_codec_iface_t* CodecInterface() const = 0;
@@ -101,6 +111,10 @@ class DecoderTest {
// Main decoding loop
virtual void RunLoop(CompressedVideoSource *video);
// Hook to be called before decompressing every frame.
virtual void PreDecodeFrameHook(const CompressedVideoSource& video,
Decoder *decoder) {}
// Hook to be called on every decompressed frame.
virtual void DecompressedFrameHook(const vpx_image_t& img,
const unsigned int frame_number) {}

View File

@@ -1,12 +1,12 @@
/*
Copyright (c) 2012 The WebM project authors. All Rights Reserved.
Use of this source code is governed by a BSD-style license
that can be found in the LICENSE file in the root of the source
tree. An additional intellectual property rights grant can be found
in the file PATENTS. All contributing project authors may
be found in the AUTHORS file in the root of the source tree.
*/
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "test/codec_factory.h"

View File

@@ -0,0 +1,322 @@
/*
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <string>
#include "test/codec_factory.h"
#include "test/decode_test_driver.h"
#include "test/ivf_video_source.h"
#include "test/md5_helper.h"
#include "test/test_vectors.h"
#include "test/util.h"
#include "test/webm_video_source.h"
namespace {
const int kVideoNameParam = 1;
const char kVP9TestFile[] = "vp90-2-02-size-lf-1920x1080.webm";
// Callback used by libvpx to request the application to allocate a frame
// buffer of at least |new_size| in bytes.
int realloc_vp9_frame_buffer(void *user_priv, size_t new_size,
vpx_codec_frame_buffer_t *fb) {
(void)user_priv;
if (fb == NULL)
return -1;
delete [] fb->data;
fb->data = new uint8_t[new_size];
fb->size = new_size;
return 0;
}
// Callback will not allocate data for frame buffer.
int zero_realloc_vp9_frame_buffer(void *user_priv, size_t new_size,
vpx_codec_frame_buffer_t *fb) {
(void)user_priv;
if (fb == NULL)
return -1;
delete [] fb->data;
fb->data = NULL;
fb->size = new_size;
return 0;
}
// Callback will allocate one less byte.
int one_less_byte_realloc_vp9_frame_buffer(void *user_priv, size_t new_size,
vpx_codec_frame_buffer_t *fb) {
(void)user_priv;
if (fb == NULL)
return -1;
delete [] fb->data;
const size_t error_size = new_size - 1;
fb->data = new uint8_t[error_size];
fb->size = error_size;
return 0;
}
// Class for testing passing in external frame buffers to libvpx.
class ExternalFrameBufferMD5Test
: public ::libvpx_test::DecoderTest,
public ::libvpx_test::CodecTestWithParam<const char*> {
protected:
ExternalFrameBufferMD5Test()
: DecoderTest(GET_PARAM(::libvpx_test::kCodecFactoryParam)),
md5_file_(NULL),
num_buffers_(0),
frame_buffers_(NULL) {}
virtual ~ExternalFrameBufferMD5Test() {
for (int i = 0; i < num_buffers_; ++i) {
delete [] frame_buffers_[i].data;
}
delete [] frame_buffers_;
if (md5_file_ != NULL)
fclose(md5_file_);
}
virtual void PreDecodeFrameHook(
const libvpx_test::CompressedVideoSource &video,
libvpx_test::Decoder *decoder) {
if (num_buffers_ > 0 && video.frame_number() == 0) {
// Have libvpx use frame buffers we create.
frame_buffers_ = new vpx_codec_frame_buffer_t[num_buffers_];
memset(frame_buffers_, 0, sizeof(frame_buffers_[0]) * num_buffers_);
ASSERT_EQ(VPX_CODEC_OK,
decoder->SetExternalFrameBuffers(
frame_buffers_, num_buffers_,
realloc_vp9_frame_buffer, NULL));
}
}
void OpenMD5File(const std::string &md5_file_name_) {
md5_file_ = libvpx_test::OpenTestDataFile(md5_file_name_);
ASSERT_TRUE(md5_file_ != NULL) << "Md5 file open failed. Filename: "
<< md5_file_name_;
}
virtual void DecompressedFrameHook(const vpx_image_t &img,
const unsigned int frame_number) {
ASSERT_TRUE(md5_file_ != NULL);
char expected_md5[33];
char junk[128];
// Read correct md5 checksums.
const int res = fscanf(md5_file_, "%s %s", expected_md5, junk);
ASSERT_NE(EOF, res) << "Read md5 data failed";
expected_md5[32] = '\0';
::libvpx_test::MD5 md5_res;
md5_res.Add(&img);
const char *const actual_md5 = md5_res.Get();
// Check md5 match.
ASSERT_STREQ(expected_md5, actual_md5)
<< "Md5 checksums don't match: frame number = " << frame_number;
}
void set_num_buffers(int num_buffers) { num_buffers_ = num_buffers; }
int num_buffers() const { return num_buffers_; }
private:
FILE *md5_file_;
int num_buffers_;
vpx_codec_frame_buffer_t *frame_buffers_;
};
class ExternalFrameBufferTest : public ::testing::Test {
protected:
ExternalFrameBufferTest()
: video_(NULL),
decoder_(NULL),
num_buffers_(0),
frame_buffers_(NULL) {}
virtual void SetUp() {
video_ = new libvpx_test::WebMVideoSource(kVP9TestFile);
video_->Init();
video_->Begin();
vpx_codec_dec_cfg_t cfg = {0};
decoder_ = new libvpx_test::VP9Decoder(cfg, 0);
}
virtual void TearDown() {
for (int i = 0; i < num_buffers_; ++i) {
delete [] frame_buffers_[i].data;
}
delete [] frame_buffers_;
delete decoder_;
delete video_;
}
// Passes the external frame buffer information to libvpx.
vpx_codec_err_t SetExternalFrameBuffers(
int num_buffers,
vpx_realloc_frame_buffer_cb_fn_t cb) {
if (num_buffers > 0) {
num_buffers_ = num_buffers;
// Have libvpx use frame buffers we create.
frame_buffers_ = new vpx_codec_frame_buffer_t[num_buffers_];
memset(frame_buffers_, 0, sizeof(frame_buffers_[0]) * num_buffers_);
}
return decoder_->SetExternalFrameBuffers(frame_buffers_, num_buffers_,
cb, NULL);
}
// Pass Null frame buffer list to libvpx.
vpx_codec_err_t SetNullFrameBuffers(
int num_buffers,
vpx_realloc_frame_buffer_cb_fn_t cb) {
return decoder_->SetExternalFrameBuffers(NULL, num_buffers,
cb, NULL);
}
vpx_codec_err_t DecodeOneFrame() {
const vpx_codec_err_t res =
decoder_->DecodeFrame(video_->cxdata(), video_->frame_size());
if (res == VPX_CODEC_OK)
video_->Next();
return res;
}
vpx_codec_err_t DecodeRemainingFrames() {
for (; video_->cxdata(); video_->Next()) {
const vpx_codec_err_t res =
decoder_->DecodeFrame(video_->cxdata(), video_->frame_size());
if (res != VPX_CODEC_OK)
return res;
libvpx_test::DxDataIterator dec_iter = decoder_->GetDxData();
const vpx_image_t *img = NULL;
// Get decompressed data
while ((img = dec_iter.Next())) {
}
}
return VPX_CODEC_OK;
}
libvpx_test::WebMVideoSource *video_;
libvpx_test::VP9Decoder *decoder_;
int num_buffers_;
vpx_codec_frame_buffer_t *frame_buffers_;
};
// This test runs through the set of test vectors, and decodes them.
// Libvpx will call into the application to allocate a frame buffer when
// needed. The md5 checksums are computed for each frame in the video file.
// If md5 checksums match the correct md5 data, then the test is passed.
// Otherwise, the test failed.
TEST_P(ExternalFrameBufferMD5Test, ExtFBMD5Match) {
const std::string filename = GET_PARAM(kVideoNameParam);
libvpx_test::CompressedVideoSource *video = NULL;
// Number of buffers equals number of possible reference buffers(8), plus
// one working buffer, plus four jitter buffers.
const int num_buffers = 13;
set_num_buffers(num_buffers);
#if CONFIG_VP8_DECODER
// Tell compiler we are not using kVP8TestVectors.
(void)libvpx_test::kVP8TestVectors;
#endif
// Open compressed video file.
if (filename.substr(filename.length() - 3, 3) == "ivf") {
video = new libvpx_test::IVFVideoSource(filename);
} else if (filename.substr(filename.length() - 4, 4) == "webm") {
video = new libvpx_test::WebMVideoSource(filename);
}
video->Init();
// Construct md5 file name.
const std::string md5_filename = filename + ".md5";
OpenMD5File(md5_filename);
// Decode frame, and check the md5 matching.
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
delete video;
}
TEST_F(ExternalFrameBufferTest, NineFrameBuffers) {
// Minimum number of external frame buffers for VP9 is
// #VP9_MAXIMUM_REF_BUFFERS + #VPX_MAXIMUM_WORK_BUFFERS.
const int num_buffers = VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS;
ASSERT_EQ(VPX_CODEC_OK,
SetExternalFrameBuffers(num_buffers, realloc_vp9_frame_buffer));
ASSERT_EQ(VPX_CODEC_OK, DecodeRemainingFrames());
}
TEST_F(ExternalFrameBufferTest, EightJitterBuffers) {
// Number of buffers equals #VP9_MAXIMUM_REF_BUFFERS +
// #VPX_MAXIMUM_WORK_BUFFERS + eight jitter buffers.
const int jitter_buffers = 8;
const int num_buffers =
VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS + jitter_buffers;
ASSERT_EQ(VPX_CODEC_OK,
SetExternalFrameBuffers(num_buffers, realloc_vp9_frame_buffer));
ASSERT_EQ(VPX_CODEC_OK, DecodeRemainingFrames());
}
TEST_F(ExternalFrameBufferTest, NotEnoughBuffers) {
// Minimum number of external frame buffers for VP9 is
// #VP9_MAXIMUM_REF_BUFFERS + #VPX_MAXIMUM_WORK_BUFFERS. Set one less.
const int num_buffers =
VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS - 1;
ASSERT_EQ(VPX_CODEC_INVALID_PARAM,
SetExternalFrameBuffers(num_buffers, realloc_vp9_frame_buffer));
}
TEST_F(ExternalFrameBufferTest, NullFrameBufferList) {
// Number of buffers equals #VP9_MAXIMUM_REF_BUFFERS +
// #VPX_MAXIMUM_WORK_BUFFERS + four jitter buffers.
const int jitter_buffers = 4;
const int num_buffers =
VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS + jitter_buffers;
ASSERT_EQ(VPX_CODEC_INVALID_PARAM,
SetNullFrameBuffers(num_buffers, realloc_vp9_frame_buffer));
}
TEST_F(ExternalFrameBufferTest, NullRealloc) {
// Number of buffers equals #VP9_MAXIMUM_REF_BUFFERS +
// #VPX_MAXIMUM_WORK_BUFFERS + four jitter buffers.
const int jitter_buffers = 4;
const int num_buffers =
VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS + jitter_buffers;
ASSERT_EQ(VPX_CODEC_OK,
SetExternalFrameBuffers(num_buffers,
zero_realloc_vp9_frame_buffer));
ASSERT_EQ(VPX_CODEC_MEM_ERROR, DecodeOneFrame());
}
TEST_F(ExternalFrameBufferTest, ReallocOneLessByte) {
// Number of buffers equals #VP9_MAXIMUM_REF_BUFFERS +
// #VPX_MAXIMUM_WORK_BUFFERS + four jitter buffers.
const int jitter_buffers = 4;
const int num_buffers =
VP9_MAXIMUM_REF_BUFFERS + VPX_MAXIMUM_WORK_BUFFERS + jitter_buffers;
ASSERT_EQ(VPX_CODEC_OK,
SetExternalFrameBuffers(num_buffers,
one_less_byte_realloc_vp9_frame_buffer));
ASSERT_EQ(VPX_CODEC_MEM_ERROR, DecodeOneFrame());
}
VP9_INSTANTIATE_TEST_CASE(ExternalFrameBufferMD5Test,
::testing::ValuesIn(libvpx_test::kVP9TestVectors));
} // namespace

View File

@@ -36,6 +36,9 @@ typedef void (*fht_t) (const int16_t *in, int16_t *out, int stride,
typedef void (*iht_t) (const int16_t *in, uint8_t *out, int stride,
int tx_type);
typedef std::tr1::tuple<fdct_t, idct_t, int> dct_4x4_param_t;
typedef std::tr1::tuple<fht_t, iht_t, int> ht_4x4_param_t;
void fdct4x4_ref(const int16_t *in, int16_t *out, int stride, int tx_type) {
vp9_fdct4x4_c(in, out, stride);
}
@@ -183,7 +186,7 @@ class Trans4x4TestBase {
class Trans4x4DCT
: public Trans4x4TestBase,
public PARAMS(fdct_t, idct_t, int) {
public ::testing::TestWithParam<dct_4x4_param_t> {
public:
virtual ~Trans4x4DCT() {}
@@ -226,7 +229,7 @@ TEST_P(Trans4x4DCT, InvAccuracyCheck) {
class Trans4x4HT
: public Trans4x4TestBase,
public PARAMS(fht_t, iht_t, int) {
public ::testing::TestWithParam<ht_4x4_param_t> {
public:
virtual ~Trans4x4HT() {}

View File

@@ -35,6 +35,9 @@ typedef void (*fht_t) (const int16_t *in, int16_t *out, int stride,
typedef void (*iht_t) (const int16_t *in, uint8_t *out, int stride,
int tx_type);
typedef std::tr1::tuple<fdct_t, idct_t, int> dct_8x8_param_t;
typedef std::tr1::tuple<fht_t, iht_t, int> ht_8x8_param_t;
void fdct8x8_ref(const int16_t *in, int16_t *out, int stride, int tx_type) {
vp9_fdct8x8_c(in, out, stride);
}
@@ -215,8 +218,9 @@ class FwdTrans8x8TestBase {
fht_t fwd_txfm_ref;
};
class FwdTrans8x8DCT : public FwdTrans8x8TestBase,
public PARAMS(fdct_t, idct_t, int) {
class FwdTrans8x8DCT
: public FwdTrans8x8TestBase,
public ::testing::TestWithParam<dct_8x8_param_t> {
public:
virtual ~FwdTrans8x8DCT() {}
@@ -254,8 +258,9 @@ TEST_P(FwdTrans8x8DCT, ExtremalCheck) {
RunExtremalCheck();
}
class FwdTrans8x8HT : public FwdTrans8x8TestBase,
public PARAMS(fht_t, iht_t, int) {
class FwdTrans8x8HT
: public FwdTrans8x8TestBase,
public ::testing::TestWithParam<ht_8x8_param_t> {
public:
virtual ~FwdTrans8x8HT() {}

View File

@@ -0,0 +1,207 @@
/*
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <queue>
#include <string>
#include "test/codec_factory.h"
#include "test/decode_test_driver.h"
#include "test/ivf_video_source.h"
#include "test/md5_helper.h"
#include "test/util.h"
#include "test/webm_video_source.h"
namespace {
const int kVideoNameParam = 1;
const char *kLRUTestVectors[] = {
"vp90-2-02-size-lf-1920x1080.webm",
"vp90-2-05-resize.ivf",
};
// Callback used by libvpx to request the application to allocate a frame
// buffer of at least |new_size| in bytes.
int realloc_vp9_frame_buffer(void *user_priv, size_t new_size,
vpx_codec_frame_buffer_t *fb) {
(void)user_priv;
if (fb == NULL)
return -1;
delete [] fb->data;
fb->data = new uint8_t[new_size];
fb->size = new_size;
return 0;
}
// Class for testing libvpx is using the least recently
// used frame buffer when a new buffer is requested.
class LRUFrameBufferTest
: public ::libvpx_test::DecoderTest,
public ::libvpx_test::CodecTestWithParam<const char*> {
protected:
struct FrameBufferMD5Sum {
int frame_buffer_index;
vpx_image_t img;
std::string md5;
};
LRUFrameBufferTest()
: DecoderTest(GET_PARAM(::libvpx_test::kCodecFactoryParam)),
num_buffers_(0),
num_jitter_buffers_(0),
frame_buffers_(NULL) {}
virtual ~LRUFrameBufferTest() {
for (int i = 0; i < num_buffers_; ++i) {
delete [] frame_buffers_[i].data;
}
delete [] frame_buffers_;
}
virtual void PreDecodeFrameHook(
const libvpx_test::CompressedVideoSource &video,
libvpx_test::Decoder *decoder) {
// Use external buffers for testing jitter buffers.
if (num_jitter_buffers_ > 0 && video.frame_number() == 0) {
const int max_reference_buffers = 8;
// Add 1 for a work buffer.
num_buffers_ = max_reference_buffers + 1 + num_jitter_buffers_;
// Have libvpx use frame buffers we create.
frame_buffers_ = new vpx_codec_frame_buffer_t[num_buffers_];
memset(frame_buffers_, 0, sizeof(frame_buffers_[0]) * num_buffers_);
decoder->SetExternalFrameBuffers(frame_buffers_, num_buffers_,
realloc_vp9_frame_buffer, NULL);
}
// Turn on frame buffer LRU cache.
decoder->Control(VP9D_SET_FRAME_BUFFER_LRU_CACHE, 1);
}
virtual void DecompressedFrameHook(const vpx_image_t &img,
const unsigned int frame_number) {
const uint32_t ximg_y_plane = 0;
const uint8_t *const y_buffer = img.planes[ximg_y_plane];
// Find which external buffer contains the y_buffer.
int i = 0;
for (i = 0; i < num_buffers_; ++i) {
if (y_buffer >= frame_buffers_[i].data &&
y_buffer < (frame_buffers_[i].data + frame_buffers_[i].size)) {
break;
}
}
FrameBufferMD5Sum fb_md5;
fb_md5.frame_buffer_index = i;
fb_md5.img = img;
libvpx_test::MD5 md5;
md5.Add(&img);
fb_md5.md5 = md5.Get();
jitter_buffer_md5_sums_.push(fb_md5);
// Check to see if any of the reconstructed image changed.
if (jitter_buffer_md5_sums_.size() >
static_cast<size_t>(num_jitter_buffers_)) {
fb_md5 = jitter_buffer_md5_sums_.front();
libvpx_test::MD5 md5;
md5.Add(&fb_md5.img);
const std::string check_str = md5.Get();
ASSERT_EQ(fb_md5.md5, check_str);
jitter_buffer_md5_sums_.pop();
}
}
libvpx_test::CompressedVideoSource *OpenCompressedFile(
const std::string &filename) {
if (filename.substr(filename.length() - 3, 3) == "ivf") {
return new libvpx_test::IVFVideoSource(filename);
} else if (filename.substr(filename.length() - 4, 4) == "webm") {
return new libvpx_test::WebMVideoSource(filename);
}
return NULL;
}
void set_num_jitter_buffers(int num_buffers) {
num_jitter_buffers_ = num_buffers;
}
private:
// Total number of external frame buffers.
int num_buffers_;
int num_jitter_buffers_;
// External frame buffers used by libvpx.
vpx_codec_frame_buffer_t *frame_buffers_;
// Save the md5 checksums for later comparison.
std::queue<FrameBufferMD5Sum> jitter_buffer_md5_sums_;
};
// This test runs through a set of test vectors, and decodes them.
// Libvpx will call into the application to allocate a frame buffer when
// needed. The md5 checksums are computed for each frame after it is
// decoded and stored to be checked later. After a jitter frame buffer
// has expired, the md5 checksum is computed again for the expired jitter
// buffer frame and checked against the md5 checksum after the frame was
// decoded. If md5 checksums match, then the test is passed. Otherwise,
// the test failed.
TEST_P(LRUFrameBufferTest, CheckLRUOneJitterBuffer) {
const std::string filename = GET_PARAM(kVideoNameParam);
set_num_jitter_buffers(1);
libvpx_test::CompressedVideoSource *const video =
OpenCompressedFile(filename);
video->Init();
// Decode frame, and check the md5 matching.
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
delete video;
}
TEST_P(LRUFrameBufferTest, CheckLRUFourJitterBuffers) {
const std::string filename = GET_PARAM(kVideoNameParam);
set_num_jitter_buffers(4);
libvpx_test::CompressedVideoSource *const video =
OpenCompressedFile(filename);
video->Init();
// Decode frame, and check the md5 matching.
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
delete video;
}
TEST_P(LRUFrameBufferTest, CheckLRUEightJitterBuffers) {
const std::string filename = GET_PARAM(kVideoNameParam);
set_num_jitter_buffers(8);
libvpx_test::CompressedVideoSource *const video =
OpenCompressedFile(filename);
video->Init();
// Decode frame, and check the md5 matching.
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
delete video;
}
VP9_INSTANTIATE_TEST_CASE(LRUFrameBufferTest,
::testing::ValuesIn(kLRUTestVectors));
} // namespace

172
test/partial_idct_test.cc Normal file
View File

@@ -0,0 +1,172 @@
/*
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
extern "C" {
#include "./vp9_rtcd.h"
#include "vp9/common/vp9_blockd.h"
#include "vp9/common/vp9_scan.h"
}
#include "vpx/vpx_integer.h"
using libvpx_test::ACMRandom;
namespace {
typedef void (*fwd_txfm_t)(const int16_t *in, int16_t *out, int stride);
typedef void (*inv_txfm_t)(const int16_t *in, uint8_t *out, int stride);
typedef std::tr1::tuple<inv_txfm_t,
inv_txfm_t,
TX_SIZE, int> partial_itxfm_param_t;
const int kMaxNumCoeffs = 1024;
class PartialIDctTest : public ::testing::TestWithParam<partial_itxfm_param_t> {
public:
virtual ~PartialIDctTest() {}
virtual void SetUp() {
full_itxfm_ = GET_PARAM(0);
partial_itxfm_ = GET_PARAM(1);
tx_size_ = GET_PARAM(2);
last_nonzero_ = GET_PARAM(3);
}
virtual void TearDown() { libvpx_test::ClearSystemState(); }
protected:
int last_nonzero_;
TX_SIZE tx_size_;
inv_txfm_t full_itxfm_;
inv_txfm_t partial_itxfm_;
};
TEST_P(PartialIDctTest, ResultsMatch) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
int size;
switch (tx_size_) {
case TX_4X4:
size = 4;
break;
case TX_8X8:
size = 8;
break;
case TX_16X16:
size = 16;
break;
case TX_32X32:
size = 32;
break;
default:
FAIL() << "Wrong Size!";
break;
}
DECLARE_ALIGNED_ARRAY(16, int16_t, test_coef_block1, kMaxNumCoeffs);
DECLARE_ALIGNED_ARRAY(16, int16_t, test_coef_block2, kMaxNumCoeffs);
DECLARE_ALIGNED_ARRAY(16, uint8_t, dst1, kMaxNumCoeffs);
DECLARE_ALIGNED_ARRAY(16, uint8_t, dst2, kMaxNumCoeffs);
const int count_test_block = 1000;
const int max_coeff = 32766 / 4;
const int block_size = size * size;
int max_error = 0;
for (int i = 0; i < count_test_block; ++i) {
// clear out destination buffer
memset(dst1, 0, sizeof(*dst1) * block_size);
memset(dst2, 0, sizeof(*dst2) * block_size);
memset(test_coef_block1, 0, sizeof(*test_coef_block1) * block_size);
memset(test_coef_block2, 0, sizeof(*test_coef_block2) * block_size);
int max_energy_leftover = max_coeff * max_coeff;
for (int j = 0; j < last_nonzero_; ++j) {
int16_t coef = static_cast<int16_t>(sqrt(max_energy_leftover) *
(rnd.Rand16() - 32768) / 65536);
max_energy_leftover -= coef * coef;
if (max_energy_leftover < 0) {
max_energy_leftover = 0;
coef = 0;
}
test_coef_block1[vp9_default_scan_orders[tx_size_].scan[j]] = coef;
}
memcpy(test_coef_block2, test_coef_block1,
sizeof(*test_coef_block2) * block_size);
REGISTER_STATE_CHECK(full_itxfm_(test_coef_block1, dst1, size));
REGISTER_STATE_CHECK(partial_itxfm_(test_coef_block2, dst2, size));
for (int j = 0; j < block_size; ++j) {
const int diff = dst1[j] - dst2[j];
const int error = diff * diff;
if (max_error < error)
max_error = error;
}
}
EXPECT_EQ(0, max_error)
<< "Error: partial inverse transform produces different results";
}
using std::tr1::make_tuple;
INSTANTIATE_TEST_CASE_P(
C, PartialIDctTest,
::testing::Values(
make_tuple(vp9_idct32x32_1024_add_c,
vp9_idct32x32_34_add_c,
TX_32X32, 34),
make_tuple(vp9_idct32x32_1024_add_c,
vp9_idct32x32_1_add_c,
TX_32X32, 1),
make_tuple(vp9_idct16x16_256_add_c,
vp9_idct16x16_10_add_c,
TX_16X16, 10),
make_tuple(vp9_idct16x16_256_add_c,
vp9_idct16x16_1_add_c,
TX_16X16, 1),
make_tuple(vp9_idct8x8_64_add_c,
vp9_idct8x8_10_add_c,
TX_8X8, 10),
make_tuple(vp9_idct8x8_64_add_c,
vp9_idct8x8_1_add_c,
TX_8X8, 1),
make_tuple(vp9_idct4x4_16_add_c,
vp9_idct4x4_1_add_c,
TX_4X4, 1)));
#if HAVE_SSE2
INSTANTIATE_TEST_CASE_P(
SSE2, PartialIDctTest,
::testing::Values(
make_tuple(vp9_idct32x32_1024_add_c,
vp9_idct32x32_34_add_sse2,
TX_32X32, 34),
make_tuple(vp9_idct32x32_1024_add_c,
vp9_idct32x32_1_add_sse2,
TX_32X32, 1),
make_tuple(vp9_idct16x16_256_add_c,
vp9_idct16x16_10_add_sse2,
TX_16X16, 10),
make_tuple(vp9_idct16x16_256_add_c,
vp9_idct16x16_1_add_sse2,
TX_16X16, 1),
make_tuple(vp9_idct8x8_64_add_c,
vp9_idct8x8_10_add_sse2,
TX_8X8, 10),
make_tuple(vp9_idct8x8_64_add_c,
vp9_idct8x8_1_add_sse2,
TX_8X8, 1),
make_tuple(vp9_idct4x4_16_add_c,
vp9_idct4x4_1_add_sse2,
TX_4X4, 1)));
#endif
} // namespace

View File

@@ -1,12 +1,12 @@
/*
* Copyright (c) 2012 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <math.h>
#include <stdlib.h>
@@ -32,7 +32,10 @@ typedef void (*sixtap_predict_fn_t)(uint8_t *src_ptr,
uint8_t *dst_ptr,
int dst_pitch);
class SixtapPredictTest : public PARAMS(int, int, sixtap_predict_fn_t) {
typedef std::tr1::tuple<int, int, sixtap_predict_fn_t> sixtap_predict_param_t;
class SixtapPredictTest
: public ::testing::TestWithParam<sixtap_predict_param_t> {
public:
static void SetUpTestCase() {
src_ = reinterpret_cast<uint8_t*>(vpx_memalign(kDataAlignment, kSrcSize));

View File

@@ -41,7 +41,6 @@ class SvcTest : public ::testing::Test {
virtual ~SvcTest() {}
virtual void SetUp() {
svc_.first_frame_full_size = 1;
svc_.encoding_mode = INTER_LAYER_PREDICTION_IP;
svc_.log_level = SVC_LOG_DEBUG;
svc_.log_print = 0;
@@ -185,7 +184,6 @@ TEST_F(SvcTest, SetQuantizers) {
res = vpx_svc_set_quantizers(&svc_, NULL);
EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res);
svc_.first_frame_full_size = 0;
svc_.spatial_layers = 2;
res = vpx_svc_set_quantizers(&svc_, "40");
EXPECT_EQ(VPX_CODEC_OK, res);
@@ -206,7 +204,6 @@ TEST_F(SvcTest, SetScaleFactors) {
res = vpx_svc_set_scale_factors(&svc_, NULL);
EXPECT_EQ(VPX_CODEC_INVALID_PARAM, res);
svc_.first_frame_full_size = 0;
svc_.spatial_layers = 2;
res = vpx_svc_set_scale_factors(&svc_, "4/16");
EXPECT_EQ(VPX_CODEC_OK, res);
@@ -220,11 +217,8 @@ TEST_F(SvcTest, SetScaleFactors) {
codec_initialized_ = true;
}
// test that decoder can handle an SVC frame as the first frame in a sequence
// this test is disabled since it always fails because of a decoder issue
// https://code.google.com/p/webm/issues/detail?id=654
TEST_F(SvcTest, DISABLED_FirstFrameHasLayers) {
svc_.first_frame_full_size = 0;
// Test that decoder can handle an SVC frame as the first frame in a sequence.
TEST_F(SvcTest, FirstFrameHasLayers) {
svc_.spatial_layers = 2;
vpx_svc_set_scale_factors(&svc_, "4/16,16/16");
vpx_svc_set_quantizers(&svc_, "40,30");
@@ -252,7 +246,6 @@ TEST_F(SvcTest, DISABLED_FirstFrameHasLayers) {
}
TEST_F(SvcTest, EncodeThreeFrames) {
svc_.first_frame_full_size = 1;
svc_.spatial_layers = 2;
vpx_svc_set_scale_factors(&svc_, "4/16,16/16");
vpx_svc_set_quantizers(&svc_, "40,30");
@@ -265,9 +258,9 @@ TEST_F(SvcTest, EncodeThreeFrames) {
libvpx_test::I420VideoSource video(test_file_name_, kWidth, kHeight,
codec_enc_.g_timebase.den,
codec_enc_.g_timebase.num, 0, 30);
// FRAME 1
// FRAME 0
video.Begin();
// this frame is full size, with only one layer
// This frame is a keyframe.
res = vpx_svc_encode(&svc_, &codec_, video.img(), video.pts(),
video.duration(), VPX_DL_REALTIME);
ASSERT_EQ(VPX_CODEC_OK, res);
@@ -278,13 +271,13 @@ TEST_F(SvcTest, EncodeThreeFrames) {
vpx_svc_get_frame_size(&svc_));
ASSERT_EQ(VPX_CODEC_OK, res_dec) << decoder_->DecodeError();
// FRAME 2
// FRAME 1
video.Next();
// this is an I-frame
// This is a P-frame.
res = vpx_svc_encode(&svc_, &codec_, video.img(), video.pts(),
video.duration(), VPX_DL_REALTIME);
ASSERT_EQ(VPX_CODEC_OK, res);
EXPECT_EQ(1, vpx_svc_is_keyframe(&svc_));
EXPECT_EQ(0, vpx_svc_is_keyframe(&svc_));
res_dec = decoder_->DecodeFrame(
static_cast<const uint8_t *>(vpx_svc_get_buffer(&svc_)),
@@ -293,7 +286,7 @@ TEST_F(SvcTest, EncodeThreeFrames) {
// FRAME 2
video.Next();
// this is a P-frame
// This is a P-frame.
res = vpx_svc_encode(&svc_, &codec_, video.img(), video.pts(),
video.duration(), VPX_DL_REALTIME);
ASSERT_EQ(VPX_CODEC_OK, res);
@@ -306,7 +299,6 @@ TEST_F(SvcTest, EncodeThreeFrames) {
}
TEST_F(SvcTest, GetLayerResolution) {
svc_.first_frame_full_size = 0;
svc_.spatial_layers = 2;
vpx_svc_set_scale_factors(&svc_, "4/16,8/16");
vpx_svc_set_quantizers(&svc_, "40,30");

View File

@@ -61,6 +61,7 @@ c87599cbecd72d4cd4f7ace3313b7a6bc6eb8163 vp80-05-sharpness-1438.ivf
aff51d865c2621b60510459244ea83e958e4baed vp80-05-sharpness-1439.ivf
da386e72b19b5485a6af199c5eb60ef25e510dd1 vp80-05-sharpness-1440.ivf
6759a095203d96ccd267ce09b1b050b8cc4c2f1f vp80-05-sharpness-1443.ivf
b95d3cc1d0df991e63e150a801710a72f20d9ba0 vp80-06-smallsize.ivf
db55ec7fd02c864ba996ff060b25b1e08611330b vp80-00-comprehensive-001.ivf.md5
29db0ad011cba1e45f856d5623cd38dac3e3bf19 vp80-00-comprehensive-002.ivf.md5
e84f258f69e173e7d68f8f8c037a0a3766902182 vp80-00-comprehensive-003.ivf.md5
@@ -122,6 +123,7 @@ f95eb6214571434f1f73ab7833b9ccdf47588020 vp80-03-segmentation-1437.ivf.md5
086c56378df81b6cee264d7540a7b8f2b405c7a4 vp80-05-sharpness-1439.ivf.md5
d32dc2c4165eb266ea4c23c14a45459b363def32 vp80-05-sharpness-1440.ivf.md5
8c69dc3d8e563f56ffab5ad1e400d9e689dd23df vp80-05-sharpness-1443.ivf.md5
d6f246df012c241b5fa6c1345019a3703d85c419 vp80-06-smallsize.ivf.md5
ce881e567fe1d0fbcb2d3e9e6281a1a8d74d82e0 vp90-2-00-quantizer-00.webm
ac5eda33407d0521c7afca43a63fd305c0cd9d13 vp90-2-00-quantizer-00.webm.md5
2ca0463f2cfb93d25d7dded174db70b7cb87cb48 vp90-2-00-quantizer-01.webm
@@ -542,3 +544,32 @@ c9b237dfcc01c1b414fbcaa481d014a906ef7998 vp90-2-08-tile_1x4.webm.md5
ae7451810247fd13975cc257aa0301ff17102255 vp90-2-08-tile-4x4.webm.md5
2ec6e15422ac7a61af072dc5f27fcaf1942ce116 vp90-2-08-tile-4x1.webm
0094f5ee5e46345017c30e0aa4835b550212d853 vp90-2-08-tile-4x1.webm.md5
edea45dac4a3c2e5372339f8851d24c9bef803d6 vp90-2-09-subpixel-00.ivf
5428efc4bf92191faedf4a727fcd1d94966a7abc vp90-2-09-subpixel-00.ivf.md5
8cdd435d89029987ee196896e21520e5f879f04d vp90-2-bbb_1280x720_tile_1x4_1310kbps.webm
091b373aa2ecb59aa5c647affd5bcafcc7547364 vp90-2-bbb_1920x1080_tile_1x1_2581kbps.webm
87ee28032b0963a44b73a850fcc816a6dc83efbb vp90-2-bbb_1920x1080_tile_1x4_2586kbps.webm
c6ce25c4bfd4bdfc2932b70428e3dfe11210ec4f vp90-2-bbb_1920x1080_tile_1x4_fpm_2304kbps.webm
2064bdb22aa71c2691e0469fb62e8087a43f08f8 vp90-2-bbb_426x240_tile_1x1_180kbps.webm
8080eda22694910162f0996e8a962612f381a57f vp90-2-bbb_640x360_tile_1x2_337kbps.webm
a484b335c27ea189c0f0d77babea4a510ce12d50 vp90-2-bbb_854x480_tile_1x2_651kbps.webm
3eacf1f006250be4cc5c92a7ef146e385ee62653 vp90-2-sintel_1280x546_tile_1x4_1257kbps.webm
217f089a16447490823127b36ce0d945522accfd vp90-2-sintel_1920x818_tile_1x4_fpm_2279kbps.webm
eedb3c641e60dacbe082491a16df529a5c9187df vp90-2-sintel_426x182_tile_1x1_171kbps.webm
cb7e4955af183dff33bcba0c837f0922ab066400 vp90-2-sintel_640x272_tile_1x2_318kbps.webm
48613f9380e2580002f8a09d6e412ea4e89a52b9 vp90-2-sintel_854x364_tile_1x2_621kbps.webm
990a91f24dd284562d21d714ae773dff5452cad8 vp90-2-tos_1280x534_tile_1x4_1306kbps.webm
b6dd558c90bca466b4bcbd03b3371648186465a7 vp90-2-tos_1920x800_tile_1x4_fpm_2335kbps.webm
1a9c2914ba932a38f0a143efc1ad0e318e78888b vp90-2-tos_426x178_tile_1x1_181kbps.webm
a3d2b09f24debad4747a1b3066f572be4273bced vp90-2-tos_640x266_tile_1x2_336kbps.webm
c64b03b5c090e6888cb39685c31f00a6b79fa45c vp90-2-tos_854x356_tile_1x2_656kbps.webm
0e7cd4135b231c9cea8d76c19f9e84b6fd77acec vp90-2-08-tile_1x8_frame_parallel.webm
c9b6850af28579b031791066457f4cb40df6e1c7 vp90-2-08-tile_1x8_frame_parallel.webm.md5
e448b6e83490bca0f8d58b4f4b1126a17baf4b0c vp90-2-08-tile_1x8.webm
5e524165f0397e6141d914f4f0a66267d7658376 vp90-2-08-tile_1x8.webm.md5
a34e14923d6d17b1144254d8187d7f85b700a63c vp90-2-02-size-lf-1920x1080.webm
e3b28ddcfaeb37fb4d132b93f92642a9ad17c22d vp90-2-02-size-lf-1920x1080.webm.md5
d48c5db1b0f8e60521a7c749696b8067886033a3 vp90-2-09-aq2.webm
84c1599298aac78f2fc05ae2274575d10569dfa0 vp90-2-09-aq2.webm.md5
55fc55ed73d578ed60fad05692579873f8bad758 vp90-2-09-lf_deltas.webm
54638c38009198c38c8f3b25c182b709b6c1fd2e vp90-2-09-lf_deltas.webm.md5

View File

@@ -7,6 +7,8 @@ LIBVPX_TEST_SRCS-yes += codec_factory.h
LIBVPX_TEST_SRCS-yes += test_libvpx.cc
LIBVPX_TEST_SRCS-yes += util.h
LIBVPX_TEST_SRCS-yes += video_source.h
LIBVPX_TEST_SRCS-yes += test_vectors.h
LIBVPX_TEST_SRCS-yes += test_vectors.cc
##
## BLACK BOX TESTS
@@ -32,6 +34,8 @@ LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += ../md5_utils.h ../md5_utils.c
LIBVPX_TEST_SRCS-yes += decode_test_driver.cc
LIBVPX_TEST_SRCS-yes += decode_test_driver.h
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += ivf_video_source.h
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += external_frame_buffer_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_DECODER) += lru_frame_buffer_test.cc
## WebM Parsing
NESTEGG_SRCS += ../nestegg/halloc/halloc.h
@@ -44,6 +48,10 @@ LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += $(NESTEGG_SRCS)
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += webm_video_source.h
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += test_vector_test.cc
# Currently we only support decoder perf tests for vp9
ifeq ($(CONFIG_DECODE_PERF_TESTS)$(CONFIG_VP9_DECODER), yesyes)
LIBVPX_TEST_SRCS-yes += decode_perf_test.cc
endif
##
## WHITE BOX TESTS
@@ -84,6 +92,7 @@ LIBVPX_TEST_SRCS-yes += vp9_boolcoder_test.cc
# IDCT test currently depends on FDCT function
LIBVPX_TEST_SRCS-yes += idct8x8_test.cc
LIBVPX_TEST_SRCS-yes += partial_idct_test.cc
LIBVPX_TEST_SRCS-yes += superframe_test.cc
LIBVPX_TEST_SRCS-yes += tile_independence_test.cc
endif
@@ -171,6 +180,7 @@ LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1438.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1439.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1440.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1443.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-06-smallsize.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-001.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-002.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-00-comprehensive-003.ivf.md5
@@ -232,6 +242,7 @@ LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1438.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1439.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1440.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-05-sharpness-1443.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP8_DECODER) += vp80-06-smallsize.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-00.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-00.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-00-quantizer-01.webm
@@ -502,6 +513,8 @@ LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x64.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x64.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x66.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-66x66.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-lf-1920x1080.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-02-size-lf-1920x1080.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-196x196.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-196x196.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-03-size-196x198.webm
@@ -646,9 +659,59 @@ LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x4_frame_parallel.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x4_frame_parallel.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x4.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x4.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x8_frame_parallel.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x8_frame_parallel.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x8.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile_1x8.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile-4x4.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile-4x4.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile-4x1.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-08-tile-4x1.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-09-subpixel-00.ivf
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-09-subpixel-00.ivf.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-09-aq2.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-09-aq2.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-09-lf_deltas.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp90-2-09-lf_deltas.webm.md5
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp91-2-04-yv444.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += vp91-2-04-yv444.webm.md5
ifeq ($(CONFIG_DECODE_PERF_TESTS),yes)
# BBB VP9 streams
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
vp90-2-bbb_426x240_tile_1x1_180kbps.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
vp90-2-bbb_640x360_tile_1x2_337kbps.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
vp90-2-bbb_854x480_tile_1x2_651kbps.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
vp90-2-bbb_1280x720_tile_1x4_1310kbps.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
vp90-2-bbb_1920x1080_tile_1x1_2581kbps.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
vp90-2-bbb_1920x1080_tile_1x4_2586kbps.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
vp90-2-bbb_1920x1080_tile_1x4_fpm_2304kbps.webm
#Sintel VP9 streams
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
vp90-2-sintel_426x182_tile_1x1_171kbps.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
vp90-2-sintel_640x272_tile_1x2_318kbps.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
vp90-2-sintel_854x364_tile_1x2_621kbps.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
vp90-2-sintel_1280x546_tile_1x4_1257kbps.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
vp90-2-sintel_1920x818_tile_1x4_fpm_2279kbps.webm
# TOS VP9 streams
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
vp90-2-tos_426x178_tile_1x1_181kbps.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
vp90-2-tos_640x266_tile_1x2_336kbps.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
vp90-2-tos_854x356_tile_1x2_656kbps.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
vp90-2-tos_1280x534_tile_1x4_1306kbps.webm
LIBVPX_TEST_DATA-$(CONFIG_VP9_DECODER) += \
vp90-2-tos_1920x800_tile_1x4_fpm_2335kbps.webm
endif # CONFIG_DECODE_PERF_TESTS

View File

@@ -22,8 +22,10 @@ extern void vp9_rtcd();
}
#include "third_party/googletest/src/include/gtest/gtest.h"
static void append_gtest_filter(const char *str) {
static void append_negative_gtest_filter(const char *str) {
std::string filter = ::testing::FLAGS_gtest_filter;
// Negative patterns begin with one '-' followed by a ':' separated list.
if (filter.find('-') == std::string::npos) filter += '-';
filter += str;
::testing::FLAGS_gtest_filter = filter;
}
@@ -34,21 +36,21 @@ int main(int argc, char **argv) {
#if ARCH_X86 || ARCH_X86_64
const int simd_caps = x86_simd_caps();
if (!(simd_caps & HAS_MMX))
append_gtest_filter(":-MMX/*");
append_negative_gtest_filter(":-MMX/*");
if (!(simd_caps & HAS_SSE))
append_gtest_filter(":-SSE/*");
append_negative_gtest_filter(":-SSE/*");
if (!(simd_caps & HAS_SSE2))
append_gtest_filter(":-SSE2/*");
append_negative_gtest_filter(":-SSE2/*");
if (!(simd_caps & HAS_SSE3))
append_gtest_filter(":-SSE3/*");
append_negative_gtest_filter(":-SSE3/*");
if (!(simd_caps & HAS_SSSE3))
append_gtest_filter(":-SSSE3/*");
append_negative_gtest_filter(":-SSSE3/*");
if (!(simd_caps & HAS_SSE4_1))
append_gtest_filter(":-SSE4_1/*");
append_negative_gtest_filter(":-SSE4_1/*");
if (!(simd_caps & HAS_AVX))
append_gtest_filter(":-AVX/*");
append_negative_gtest_filter(":AVX/*");
if (!(simd_caps & HAS_AVX2))
append_gtest_filter(":-AVX2/*");
append_negative_gtest_filter(":AVX2/*");
#endif
#if !CONFIG_SHARED

View File

@@ -1,11 +1,11 @@
/*
Copyright (c) 2012 The WebM project authors. All Rights Reserved.
Use of this source code is governed by a BSD-style license
that can be found in the LICENSE file in the root of the source
tree. An additional intellectual property rights grant can be found
in the file PATENTS. All contributing project authors may
be found in the AUTHORS file in the root of the source tree.
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <cstdio>
@@ -15,161 +15,15 @@
#include "test/codec_factory.h"
#include "test/decode_test_driver.h"
#include "test/ivf_video_source.h"
#include "test/webm_video_source.h"
#include "test/util.h"
#include "test/md5_helper.h"
#include "test/test_vectors.h"
#include "test/util.h"
#include "test/webm_video_source.h"
extern "C" {
#include "vpx_mem/vpx_mem.h"
}
namespace {
#if CONFIG_VP8_DECODER
const char *kVP8TestVectors[] = {
"vp80-00-comprehensive-001.ivf",
"vp80-00-comprehensive-002.ivf", "vp80-00-comprehensive-003.ivf",
"vp80-00-comprehensive-004.ivf", "vp80-00-comprehensive-005.ivf",
"vp80-00-comprehensive-006.ivf", "vp80-00-comprehensive-007.ivf",
"vp80-00-comprehensive-008.ivf", "vp80-00-comprehensive-009.ivf",
"vp80-00-comprehensive-010.ivf", "vp80-00-comprehensive-011.ivf",
"vp80-00-comprehensive-012.ivf", "vp80-00-comprehensive-013.ivf",
"vp80-00-comprehensive-014.ivf", "vp80-00-comprehensive-015.ivf",
"vp80-00-comprehensive-016.ivf", "vp80-00-comprehensive-017.ivf",
"vp80-00-comprehensive-018.ivf", "vp80-01-intra-1400.ivf",
"vp80-01-intra-1411.ivf", "vp80-01-intra-1416.ivf",
"vp80-01-intra-1417.ivf", "vp80-02-inter-1402.ivf",
"vp80-02-inter-1412.ivf", "vp80-02-inter-1418.ivf",
"vp80-02-inter-1424.ivf", "vp80-03-segmentation-01.ivf",
"vp80-03-segmentation-02.ivf", "vp80-03-segmentation-03.ivf",
"vp80-03-segmentation-04.ivf", "vp80-03-segmentation-1401.ivf",
"vp80-03-segmentation-1403.ivf", "vp80-03-segmentation-1407.ivf",
"vp80-03-segmentation-1408.ivf", "vp80-03-segmentation-1409.ivf",
"vp80-03-segmentation-1410.ivf", "vp80-03-segmentation-1413.ivf",
"vp80-03-segmentation-1414.ivf", "vp80-03-segmentation-1415.ivf",
"vp80-03-segmentation-1425.ivf", "vp80-03-segmentation-1426.ivf",
"vp80-03-segmentation-1427.ivf", "vp80-03-segmentation-1432.ivf",
"vp80-03-segmentation-1435.ivf", "vp80-03-segmentation-1436.ivf",
"vp80-03-segmentation-1437.ivf", "vp80-03-segmentation-1441.ivf",
"vp80-03-segmentation-1442.ivf", "vp80-04-partitions-1404.ivf",
"vp80-04-partitions-1405.ivf", "vp80-04-partitions-1406.ivf",
"vp80-05-sharpness-1428.ivf", "vp80-05-sharpness-1429.ivf",
"vp80-05-sharpness-1430.ivf", "vp80-05-sharpness-1431.ivf",
"vp80-05-sharpness-1433.ivf", "vp80-05-sharpness-1434.ivf",
"vp80-05-sharpness-1438.ivf", "vp80-05-sharpness-1439.ivf",
"vp80-05-sharpness-1440.ivf", "vp80-05-sharpness-1443.ivf"
};
#endif
#if CONFIG_VP9_DECODER
const char *kVP9TestVectors[] = {
"vp90-2-00-quantizer-00.webm", "vp90-2-00-quantizer-01.webm",
"vp90-2-00-quantizer-02.webm", "vp90-2-00-quantizer-03.webm",
"vp90-2-00-quantizer-04.webm", "vp90-2-00-quantizer-05.webm",
"vp90-2-00-quantizer-06.webm", "vp90-2-00-quantizer-07.webm",
"vp90-2-00-quantizer-08.webm", "vp90-2-00-quantizer-09.webm",
"vp90-2-00-quantizer-10.webm", "vp90-2-00-quantizer-11.webm",
"vp90-2-00-quantizer-12.webm", "vp90-2-00-quantizer-13.webm",
"vp90-2-00-quantizer-14.webm", "vp90-2-00-quantizer-15.webm",
"vp90-2-00-quantizer-16.webm", "vp90-2-00-quantizer-17.webm",
"vp90-2-00-quantizer-18.webm", "vp90-2-00-quantizer-19.webm",
"vp90-2-00-quantizer-20.webm", "vp90-2-00-quantizer-21.webm",
"vp90-2-00-quantizer-22.webm", "vp90-2-00-quantizer-23.webm",
"vp90-2-00-quantizer-24.webm", "vp90-2-00-quantizer-25.webm",
"vp90-2-00-quantizer-26.webm", "vp90-2-00-quantizer-27.webm",
"vp90-2-00-quantizer-28.webm", "vp90-2-00-quantizer-29.webm",
"vp90-2-00-quantizer-30.webm", "vp90-2-00-quantizer-31.webm",
"vp90-2-00-quantizer-32.webm", "vp90-2-00-quantizer-33.webm",
"vp90-2-00-quantizer-34.webm", "vp90-2-00-quantizer-35.webm",
"vp90-2-00-quantizer-36.webm", "vp90-2-00-quantizer-37.webm",
"vp90-2-00-quantizer-38.webm", "vp90-2-00-quantizer-39.webm",
"vp90-2-00-quantizer-40.webm", "vp90-2-00-quantizer-41.webm",
"vp90-2-00-quantizer-42.webm", "vp90-2-00-quantizer-43.webm",
"vp90-2-00-quantizer-44.webm", "vp90-2-00-quantizer-45.webm",
"vp90-2-00-quantizer-46.webm", "vp90-2-00-quantizer-47.webm",
"vp90-2-00-quantizer-48.webm", "vp90-2-00-quantizer-49.webm",
"vp90-2-00-quantizer-50.webm", "vp90-2-00-quantizer-51.webm",
"vp90-2-00-quantizer-52.webm", "vp90-2-00-quantizer-53.webm",
"vp90-2-00-quantizer-54.webm", "vp90-2-00-quantizer-55.webm",
"vp90-2-00-quantizer-56.webm", "vp90-2-00-quantizer-57.webm",
"vp90-2-00-quantizer-58.webm", "vp90-2-00-quantizer-59.webm",
"vp90-2-00-quantizer-60.webm", "vp90-2-00-quantizer-61.webm",
"vp90-2-00-quantizer-62.webm", "vp90-2-00-quantizer-63.webm",
"vp90-2-01-sharpness-1.webm", "vp90-2-01-sharpness-2.webm",
"vp90-2-01-sharpness-3.webm", "vp90-2-01-sharpness-4.webm",
"vp90-2-01-sharpness-5.webm", "vp90-2-01-sharpness-6.webm",
"vp90-2-01-sharpness-7.webm", "vp90-2-02-size-08x08.webm",
"vp90-2-02-size-08x10.webm", "vp90-2-02-size-08x16.webm",
"vp90-2-02-size-08x18.webm", "vp90-2-02-size-08x32.webm",
"vp90-2-02-size-08x34.webm", "vp90-2-02-size-08x64.webm",
"vp90-2-02-size-08x66.webm", "vp90-2-02-size-10x08.webm",
"vp90-2-02-size-10x10.webm", "vp90-2-02-size-10x16.webm",
"vp90-2-02-size-10x18.webm", "vp90-2-02-size-10x32.webm",
"vp90-2-02-size-10x34.webm", "vp90-2-02-size-10x64.webm",
"vp90-2-02-size-10x66.webm", "vp90-2-02-size-16x08.webm",
"vp90-2-02-size-16x10.webm", "vp90-2-02-size-16x16.webm",
"vp90-2-02-size-16x18.webm", "vp90-2-02-size-16x32.webm",
"vp90-2-02-size-16x34.webm", "vp90-2-02-size-16x64.webm",
"vp90-2-02-size-16x66.webm", "vp90-2-02-size-18x08.webm",
"vp90-2-02-size-18x10.webm", "vp90-2-02-size-18x16.webm",
"vp90-2-02-size-18x18.webm", "vp90-2-02-size-18x32.webm",
"vp90-2-02-size-18x34.webm", "vp90-2-02-size-18x64.webm",
"vp90-2-02-size-18x66.webm", "vp90-2-02-size-32x08.webm",
"vp90-2-02-size-32x10.webm", "vp90-2-02-size-32x16.webm",
"vp90-2-02-size-32x18.webm", "vp90-2-02-size-32x32.webm",
"vp90-2-02-size-32x34.webm", "vp90-2-02-size-32x64.webm",
"vp90-2-02-size-32x66.webm", "vp90-2-02-size-34x08.webm",
"vp90-2-02-size-34x10.webm", "vp90-2-02-size-34x16.webm",
"vp90-2-02-size-34x18.webm", "vp90-2-02-size-34x32.webm",
"vp90-2-02-size-34x34.webm", "vp90-2-02-size-34x64.webm",
"vp90-2-02-size-34x66.webm", "vp90-2-02-size-64x08.webm",
"vp90-2-02-size-64x10.webm", "vp90-2-02-size-64x16.webm",
"vp90-2-02-size-64x18.webm", "vp90-2-02-size-64x32.webm",
"vp90-2-02-size-64x34.webm", "vp90-2-02-size-64x64.webm",
"vp90-2-02-size-64x66.webm", "vp90-2-02-size-66x08.webm",
"vp90-2-02-size-66x10.webm", "vp90-2-02-size-66x16.webm",
"vp90-2-02-size-66x18.webm", "vp90-2-02-size-66x32.webm",
"vp90-2-02-size-66x34.webm", "vp90-2-02-size-66x64.webm",
"vp90-2-02-size-66x66.webm", "vp90-2-03-size-196x196.webm",
"vp90-2-03-size-196x198.webm", "vp90-2-03-size-196x200.webm",
"vp90-2-03-size-196x202.webm", "vp90-2-03-size-196x208.webm",
"vp90-2-03-size-196x210.webm", "vp90-2-03-size-196x224.webm",
"vp90-2-03-size-196x226.webm", "vp90-2-03-size-198x196.webm",
"vp90-2-03-size-198x198.webm", "vp90-2-03-size-198x200.webm",
"vp90-2-03-size-198x202.webm", "vp90-2-03-size-198x208.webm",
"vp90-2-03-size-198x210.webm", "vp90-2-03-size-198x224.webm",
"vp90-2-03-size-198x226.webm", "vp90-2-03-size-200x196.webm",
"vp90-2-03-size-200x198.webm", "vp90-2-03-size-200x200.webm",
"vp90-2-03-size-200x202.webm", "vp90-2-03-size-200x208.webm",
"vp90-2-03-size-200x210.webm", "vp90-2-03-size-200x224.webm",
"vp90-2-03-size-200x226.webm", "vp90-2-03-size-202x196.webm",
"vp90-2-03-size-202x198.webm", "vp90-2-03-size-202x200.webm",
"vp90-2-03-size-202x202.webm", "vp90-2-03-size-202x208.webm",
"vp90-2-03-size-202x210.webm", "vp90-2-03-size-202x224.webm",
"vp90-2-03-size-202x226.webm", "vp90-2-03-size-208x196.webm",
"vp90-2-03-size-208x198.webm", "vp90-2-03-size-208x200.webm",
"vp90-2-03-size-208x202.webm", "vp90-2-03-size-208x208.webm",
"vp90-2-03-size-208x210.webm", "vp90-2-03-size-208x224.webm",
"vp90-2-03-size-208x226.webm", "vp90-2-03-size-210x196.webm",
"vp90-2-03-size-210x198.webm", "vp90-2-03-size-210x200.webm",
"vp90-2-03-size-210x202.webm", "vp90-2-03-size-210x208.webm",
"vp90-2-03-size-210x210.webm", "vp90-2-03-size-210x224.webm",
"vp90-2-03-size-210x226.webm", "vp90-2-03-size-224x196.webm",
"vp90-2-03-size-224x198.webm", "vp90-2-03-size-224x200.webm",
"vp90-2-03-size-224x202.webm", "vp90-2-03-size-224x208.webm",
"vp90-2-03-size-224x210.webm", "vp90-2-03-size-224x224.webm",
"vp90-2-03-size-224x226.webm", "vp90-2-03-size-226x196.webm",
"vp90-2-03-size-226x198.webm", "vp90-2-03-size-226x200.webm",
"vp90-2-03-size-226x202.webm", "vp90-2-03-size-226x208.webm",
"vp90-2-03-size-226x210.webm", "vp90-2-03-size-226x224.webm",
"vp90-2-03-size-226x226.webm", "vp90-2-03-deltaq.webm",
"vp90-2-05-resize.ivf", "vp90-2-06-bilinear.webm",
"vp90-2-07-frame_parallel.webm",
"vp90-2-08-tile_1x2_frame_parallel.webm", "vp90-2-08-tile_1x2.webm",
"vp90-2-08-tile_1x4_frame_parallel.webm", "vp90-2-08-tile_1x4.webm",
"vp90-2-08-tile-4x4.webm", "vp90-2-08-tile-4x1.webm",
#if CONFIG_NON420
"vp91-2-04-yv444.webm"
#endif
};
#endif
class TestVectorTest : public ::libvpx_test::DecoderTest,
public ::libvpx_test::CodecTestWithParam<const char*> {
@@ -237,8 +91,8 @@ TEST_P(TestVectorTest, MD5Match) {
}
VP8_INSTANTIATE_TEST_CASE(TestVectorTest,
::testing::ValuesIn(kVP8TestVectors));
::testing::ValuesIn(libvpx_test::kVP8TestVectors));
VP9_INSTANTIATE_TEST_CASE(TestVectorTest,
::testing::ValuesIn(kVP9TestVectors));
::testing::ValuesIn(libvpx_test::kVP9TestVectors));
} // namespace

169
test/test_vectors.cc Normal file
View File

@@ -0,0 +1,169 @@
/*
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "test/test_vectors.h"
namespace libvpx_test {
#if CONFIG_VP8_DECODER
const char *kVP8TestVectors[kNumVp8TestVectors] = {
"vp80-00-comprehensive-001.ivf",
"vp80-00-comprehensive-002.ivf", "vp80-00-comprehensive-003.ivf",
"vp80-00-comprehensive-004.ivf", "vp80-00-comprehensive-005.ivf",
"vp80-00-comprehensive-006.ivf", "vp80-00-comprehensive-007.ivf",
"vp80-00-comprehensive-008.ivf", "vp80-00-comprehensive-009.ivf",
"vp80-00-comprehensive-010.ivf", "vp80-00-comprehensive-011.ivf",
"vp80-00-comprehensive-012.ivf", "vp80-00-comprehensive-013.ivf",
"vp80-00-comprehensive-014.ivf", "vp80-00-comprehensive-015.ivf",
"vp80-00-comprehensive-016.ivf", "vp80-00-comprehensive-017.ivf",
"vp80-00-comprehensive-018.ivf", "vp80-01-intra-1400.ivf",
"vp80-01-intra-1411.ivf", "vp80-01-intra-1416.ivf",
"vp80-01-intra-1417.ivf", "vp80-02-inter-1402.ivf",
"vp80-02-inter-1412.ivf", "vp80-02-inter-1418.ivf",
"vp80-02-inter-1424.ivf", "vp80-03-segmentation-01.ivf",
"vp80-03-segmentation-02.ivf", "vp80-03-segmentation-03.ivf",
"vp80-03-segmentation-04.ivf", "vp80-03-segmentation-1401.ivf",
"vp80-03-segmentation-1403.ivf", "vp80-03-segmentation-1407.ivf",
"vp80-03-segmentation-1408.ivf", "vp80-03-segmentation-1409.ivf",
"vp80-03-segmentation-1410.ivf", "vp80-03-segmentation-1413.ivf",
"vp80-03-segmentation-1414.ivf", "vp80-03-segmentation-1415.ivf",
"vp80-03-segmentation-1425.ivf", "vp80-03-segmentation-1426.ivf",
"vp80-03-segmentation-1427.ivf", "vp80-03-segmentation-1432.ivf",
"vp80-03-segmentation-1435.ivf", "vp80-03-segmentation-1436.ivf",
"vp80-03-segmentation-1437.ivf", "vp80-03-segmentation-1441.ivf",
"vp80-03-segmentation-1442.ivf", "vp80-04-partitions-1404.ivf",
"vp80-04-partitions-1405.ivf", "vp80-04-partitions-1406.ivf",
"vp80-05-sharpness-1428.ivf", "vp80-05-sharpness-1429.ivf",
"vp80-05-sharpness-1430.ivf", "vp80-05-sharpness-1431.ivf",
"vp80-05-sharpness-1433.ivf", "vp80-05-sharpness-1434.ivf",
"vp80-05-sharpness-1438.ivf", "vp80-05-sharpness-1439.ivf",
"vp80-05-sharpness-1440.ivf", "vp80-05-sharpness-1443.ivf",
"vp80-06-smallsize.ivf"
};
#endif // CONFIG_VP8_DECODER
#if CONFIG_VP9_DECODER
const char *kVP9TestVectors[kNumVp9TestVectors] = {
"vp90-2-00-quantizer-00.webm", "vp90-2-00-quantizer-01.webm",
"vp90-2-00-quantizer-02.webm", "vp90-2-00-quantizer-03.webm",
"vp90-2-00-quantizer-04.webm", "vp90-2-00-quantizer-05.webm",
"vp90-2-00-quantizer-06.webm", "vp90-2-00-quantizer-07.webm",
"vp90-2-00-quantizer-08.webm", "vp90-2-00-quantizer-09.webm",
"vp90-2-00-quantizer-10.webm", "vp90-2-00-quantizer-11.webm",
"vp90-2-00-quantizer-12.webm", "vp90-2-00-quantizer-13.webm",
"vp90-2-00-quantizer-14.webm", "vp90-2-00-quantizer-15.webm",
"vp90-2-00-quantizer-16.webm", "vp90-2-00-quantizer-17.webm",
"vp90-2-00-quantizer-18.webm", "vp90-2-00-quantizer-19.webm",
"vp90-2-00-quantizer-20.webm", "vp90-2-00-quantizer-21.webm",
"vp90-2-00-quantizer-22.webm", "vp90-2-00-quantizer-23.webm",
"vp90-2-00-quantizer-24.webm", "vp90-2-00-quantizer-25.webm",
"vp90-2-00-quantizer-26.webm", "vp90-2-00-quantizer-27.webm",
"vp90-2-00-quantizer-28.webm", "vp90-2-00-quantizer-29.webm",
"vp90-2-00-quantizer-30.webm", "vp90-2-00-quantizer-31.webm",
"vp90-2-00-quantizer-32.webm", "vp90-2-00-quantizer-33.webm",
"vp90-2-00-quantizer-34.webm", "vp90-2-00-quantizer-35.webm",
"vp90-2-00-quantizer-36.webm", "vp90-2-00-quantizer-37.webm",
"vp90-2-00-quantizer-38.webm", "vp90-2-00-quantizer-39.webm",
"vp90-2-00-quantizer-40.webm", "vp90-2-00-quantizer-41.webm",
"vp90-2-00-quantizer-42.webm", "vp90-2-00-quantizer-43.webm",
"vp90-2-00-quantizer-44.webm", "vp90-2-00-quantizer-45.webm",
"vp90-2-00-quantizer-46.webm", "vp90-2-00-quantizer-47.webm",
"vp90-2-00-quantizer-48.webm", "vp90-2-00-quantizer-49.webm",
"vp90-2-00-quantizer-50.webm", "vp90-2-00-quantizer-51.webm",
"vp90-2-00-quantizer-52.webm", "vp90-2-00-quantizer-53.webm",
"vp90-2-00-quantizer-54.webm", "vp90-2-00-quantizer-55.webm",
"vp90-2-00-quantizer-56.webm", "vp90-2-00-quantizer-57.webm",
"vp90-2-00-quantizer-58.webm", "vp90-2-00-quantizer-59.webm",
"vp90-2-00-quantizer-60.webm", "vp90-2-00-quantizer-61.webm",
"vp90-2-00-quantizer-62.webm", "vp90-2-00-quantizer-63.webm",
"vp90-2-01-sharpness-1.webm", "vp90-2-01-sharpness-2.webm",
"vp90-2-01-sharpness-3.webm", "vp90-2-01-sharpness-4.webm",
"vp90-2-01-sharpness-5.webm", "vp90-2-01-sharpness-6.webm",
"vp90-2-01-sharpness-7.webm", "vp90-2-02-size-08x08.webm",
"vp90-2-02-size-08x10.webm", "vp90-2-02-size-08x16.webm",
"vp90-2-02-size-08x18.webm", "vp90-2-02-size-08x32.webm",
"vp90-2-02-size-08x34.webm", "vp90-2-02-size-08x64.webm",
"vp90-2-02-size-08x66.webm", "vp90-2-02-size-10x08.webm",
"vp90-2-02-size-10x10.webm", "vp90-2-02-size-10x16.webm",
"vp90-2-02-size-10x18.webm", "vp90-2-02-size-10x32.webm",
"vp90-2-02-size-10x34.webm", "vp90-2-02-size-10x64.webm",
"vp90-2-02-size-10x66.webm", "vp90-2-02-size-16x08.webm",
"vp90-2-02-size-16x10.webm", "vp90-2-02-size-16x16.webm",
"vp90-2-02-size-16x18.webm", "vp90-2-02-size-16x32.webm",
"vp90-2-02-size-16x34.webm", "vp90-2-02-size-16x64.webm",
"vp90-2-02-size-16x66.webm", "vp90-2-02-size-18x08.webm",
"vp90-2-02-size-18x10.webm", "vp90-2-02-size-18x16.webm",
"vp90-2-02-size-18x18.webm", "vp90-2-02-size-18x32.webm",
"vp90-2-02-size-18x34.webm", "vp90-2-02-size-18x64.webm",
"vp90-2-02-size-18x66.webm", "vp90-2-02-size-32x08.webm",
"vp90-2-02-size-32x10.webm", "vp90-2-02-size-32x16.webm",
"vp90-2-02-size-32x18.webm", "vp90-2-02-size-32x32.webm",
"vp90-2-02-size-32x34.webm", "vp90-2-02-size-32x64.webm",
"vp90-2-02-size-32x66.webm", "vp90-2-02-size-34x08.webm",
"vp90-2-02-size-34x10.webm", "vp90-2-02-size-34x16.webm",
"vp90-2-02-size-34x18.webm", "vp90-2-02-size-34x32.webm",
"vp90-2-02-size-34x34.webm", "vp90-2-02-size-34x64.webm",
"vp90-2-02-size-34x66.webm", "vp90-2-02-size-64x08.webm",
"vp90-2-02-size-64x10.webm", "vp90-2-02-size-64x16.webm",
"vp90-2-02-size-64x18.webm", "vp90-2-02-size-64x32.webm",
"vp90-2-02-size-64x34.webm", "vp90-2-02-size-64x64.webm",
"vp90-2-02-size-64x66.webm", "vp90-2-02-size-66x08.webm",
"vp90-2-02-size-66x10.webm", "vp90-2-02-size-66x16.webm",
"vp90-2-02-size-66x18.webm", "vp90-2-02-size-66x32.webm",
"vp90-2-02-size-66x34.webm", "vp90-2-02-size-66x64.webm",
"vp90-2-02-size-66x66.webm", "vp90-2-03-size-196x196.webm",
"vp90-2-03-size-196x198.webm", "vp90-2-03-size-196x200.webm",
"vp90-2-03-size-196x202.webm", "vp90-2-03-size-196x208.webm",
"vp90-2-03-size-196x210.webm", "vp90-2-03-size-196x224.webm",
"vp90-2-03-size-196x226.webm", "vp90-2-03-size-198x196.webm",
"vp90-2-03-size-198x198.webm", "vp90-2-03-size-198x200.webm",
"vp90-2-03-size-198x202.webm", "vp90-2-03-size-198x208.webm",
"vp90-2-03-size-198x210.webm", "vp90-2-03-size-198x224.webm",
"vp90-2-03-size-198x226.webm", "vp90-2-03-size-200x196.webm",
"vp90-2-03-size-200x198.webm", "vp90-2-03-size-200x200.webm",
"vp90-2-03-size-200x202.webm", "vp90-2-03-size-200x208.webm",
"vp90-2-03-size-200x210.webm", "vp90-2-03-size-200x224.webm",
"vp90-2-03-size-200x226.webm", "vp90-2-03-size-202x196.webm",
"vp90-2-03-size-202x198.webm", "vp90-2-03-size-202x200.webm",
"vp90-2-03-size-202x202.webm", "vp90-2-03-size-202x208.webm",
"vp90-2-03-size-202x210.webm", "vp90-2-03-size-202x224.webm",
"vp90-2-03-size-202x226.webm", "vp90-2-03-size-208x196.webm",
"vp90-2-03-size-208x198.webm", "vp90-2-03-size-208x200.webm",
"vp90-2-03-size-208x202.webm", "vp90-2-03-size-208x208.webm",
"vp90-2-03-size-208x210.webm", "vp90-2-03-size-208x224.webm",
"vp90-2-03-size-208x226.webm", "vp90-2-03-size-210x196.webm",
"vp90-2-03-size-210x198.webm", "vp90-2-03-size-210x200.webm",
"vp90-2-03-size-210x202.webm", "vp90-2-03-size-210x208.webm",
"vp90-2-03-size-210x210.webm", "vp90-2-03-size-210x224.webm",
"vp90-2-03-size-210x226.webm", "vp90-2-03-size-224x196.webm",
"vp90-2-03-size-224x198.webm", "vp90-2-03-size-224x200.webm",
"vp90-2-03-size-224x202.webm", "vp90-2-03-size-224x208.webm",
"vp90-2-03-size-224x210.webm", "vp90-2-03-size-224x224.webm",
"vp90-2-03-size-224x226.webm", "vp90-2-03-size-226x196.webm",
"vp90-2-03-size-226x198.webm", "vp90-2-03-size-226x200.webm",
"vp90-2-03-size-226x202.webm", "vp90-2-03-size-226x208.webm",
"vp90-2-03-size-226x210.webm", "vp90-2-03-size-226x224.webm",
"vp90-2-03-size-226x226.webm", "vp90-2-03-deltaq.webm",
"vp90-2-05-resize.ivf", "vp90-2-06-bilinear.webm",
"vp90-2-07-frame_parallel.webm",
"vp90-2-08-tile_1x2_frame_parallel.webm", "vp90-2-08-tile_1x2.webm",
"vp90-2-08-tile_1x4_frame_parallel.webm", "vp90-2-08-tile_1x4.webm",
"vp90-2-08-tile_1x8_frame_parallel.webm", "vp90-2-08-tile_1x8.webm",
"vp90-2-08-tile-4x4.webm", "vp90-2-08-tile-4x1.webm",
"vp90-2-09-subpixel-00.ivf",
"vp90-2-02-size-lf-1920x1080.webm",
"vp90-2-09-aq2.webm",
"vp90-2-09-lf_deltas.webm",
#if CONFIG_NON420
"vp91-2-04-yv444.webm"
#endif
};
#endif // CONFIG_VP9_DECODER
} // namespace libvpx_test

35
test/test_vectors.h Normal file
View File

@@ -0,0 +1,35 @@
/*
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef TEST_TEST_VECTORS_H_
#define TEST_TEST_VECTORS_H_
#include "./vpx_config.h"
namespace libvpx_test {
#if CONFIG_VP8_DECODER
const int kNumVp8TestVectors = 62;
extern const char *kVP8TestVectors[kNumVp8TestVectors];
#endif
#if CONFIG_VP9_DECODER
#if CONFIG_NON420
const int kNumVp9TestVectors = 216;
#else
const int kNumVp9TestVectors = 215;
#endif
extern const char *kVP9TestVectors[kNumVp9TestVectors];
#endif // CONFIG_VP9_DECODER
} // namespace libvpx_test
#endif // TEST_TEST_VECTORS_H_

View File

@@ -1,11 +1,11 @@
/*
Copyright (c) 2012 The WebM project authors. All Rights Reserved.
Use of this source code is governed by a BSD-style license
that can be found in the LICENSE file in the root of the source
tree. An additional intellectual property rights grant can be found
in the file PATENTS. All contributing project authors may
be found in the AUTHORS file in the root of the source tree.
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <cstdio>

View File

@@ -17,7 +17,6 @@
#include "vpx/vpx_image.h"
// Macros
#define PARAMS(...) ::testing::TestWithParam< std::tr1::tuple< __VA_ARGS__ > >
#define GET_PARAM(k) std::tr1::get< k >(GetParam())
static double compute_psnr(const vpx_image_t *img1,

View File

@@ -1,13 +1,12 @@
/*
* Copyright (c) 2012 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <math.h>
#include <stddef.h>
@@ -16,7 +15,6 @@
#include <string.h>
#include <sys/types.h>
extern "C" {
#include "./vp8_rtcd.h"
}
@@ -25,7 +23,6 @@ extern "C" {
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "vpx/vpx_integer.h"
namespace {
const int cospi8sqrt2minus1 = 20091;

View File

@@ -1,12 +1,12 @@
/*
Copyright (c) 2012 The WebM project authors. All Rights Reserved.
Use of this source code is governed by a BSD-style license
that can be found in the LICENSE file in the root of the source
tree. An additional intellectual property rights grant can be found
in the file PATENTS. All contributing project authors may
be found in the AUTHORS file in the root of the source tree.
*/
* Copyright (c) 2013 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "test/codec_factory.h"
@@ -66,7 +66,7 @@ TEST_P(LossLessTest, TestLossLessEncoding) {
// intentionally changed the dimension for better testing coverage
libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
timebase.den, timebase.num, 0, 30);
timebase.den, timebase.num, 0, 10);
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
const double psnr_lossless = GetMinPsnr();
EXPECT_GE(psnr_lossless, kMaxPsnr);

View File

@@ -41,8 +41,8 @@ TEST_P(VP9SubtractBlockTest, SimpleSubtract) {
// FIXME(rbultje) split in its own file
for (BLOCK_SIZE bsize = BLOCK_4X4; bsize < BLOCK_SIZES;
bsize = static_cast<BLOCK_SIZE>(static_cast<int>(bsize) + 1)) {
const int block_width = 4 << b_width_log2(bsize);
const int block_height = 4 << b_height_log2(bsize);
const int block_width = 4 * num_4x4_blocks_wide_lookup[bsize];
const int block_height = 4 * num_4x4_blocks_high_lookup[bsize];
int16_t *diff = reinterpret_cast<int16_t *>(
vpx_memalign(16, sizeof(*diff) * block_width * block_height * 2));
uint8_t *pred = reinterpret_cast<uint8_t *>(

View File

@@ -141,10 +141,12 @@ TEST(VP9DecodeMTTest, MTDecode2) {
"68ede6abd66bae0a2edf2eb9232241b6" },
{ "vp90-2-08-tile_1x4_frame_parallel.webm",
"368ebc6ebf3a5e478d85b2c3149b2848" },
{ "vp90-2-08-tile_1x8_frame_parallel.webm",
"17e439da2388aff3a0f69cb22579c6c1" },
};
for (int i = 0; i < static_cast<int>(sizeof(files) / sizeof(files[0])); ++i) {
for (int t = 2; t <= 4; ++t) {
for (int t = 2; t <= 8; ++t) {
EXPECT_STREQ(files[i].expected_md5, DecodeFile(files[i].name, t).c_str())
<< "threads = " << t;
}

View File

@@ -90,8 +90,12 @@ class WebMVideoSource : public CompressedVideoSource {
virtual ~WebMVideoSource() {
if (input_file_)
fclose(input_file_);
if (nestegg_ctx_)
if (nestegg_ctx_ != NULL) {
if (pkt_ != NULL) {
nestegg_free_packet(pkt_);
}
nestegg_destroy(nestegg_ctx_);
}
}
virtual void Init() {
@@ -136,8 +140,10 @@ class WebMVideoSource : public CompressedVideoSource {
do {
/* End of this packet, get another. */
if (pkt_)
if (pkt_ != NULL) {
nestegg_free_packet(pkt_);
pkt_ = NULL;
}
int again = nestegg_read_packet(nestegg_ctx_, &pkt_);
ASSERT_GE(again, 0) << "nestegg_read_packet failed";

View File

@@ -7,10 +7,13 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "tools_common.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if defined(_WIN32) || defined(__OS2__)
#include <io.h>
@@ -56,3 +59,74 @@ void fatal(const char *fmt, ...) {
void warn(const char *fmt, ...) {
LOG_ERROR("Warning");
}
uint16_t mem_get_le16(const void *data) {
uint16_t val;
const uint8_t *mem = (const uint8_t*)data;
val = mem[1] << 8;
val |= mem[0];
return val;
}
uint32_t mem_get_le32(const void *data) {
uint32_t val;
const uint8_t *mem = (const uint8_t*)data;
val = mem[3] << 24;
val |= mem[2] << 16;
val |= mem[1] << 8;
val |= mem[0];
return val;
}
int read_yuv_frame(struct VpxInputContext *input_ctx, vpx_image_t *yuv_frame) {
FILE *f = input_ctx->file;
struct FileTypeDetectionBuffer *detect = &input_ctx->detect;
int plane = 0;
int shortread = 0;
for (plane = 0; plane < 3; ++plane) {
uint8_t *ptr;
const int w = (plane ? (1 + yuv_frame->d_w) / 2 : yuv_frame->d_w);
const int h = (plane ? (1 + yuv_frame->d_h) / 2 : yuv_frame->d_h);
int r;
/* Determine the correct plane based on the image format. The for-loop
* always counts in Y,U,V order, but this may not match the order of
* the data on disk.
*/
switch (plane) {
case 1:
ptr = yuv_frame->planes[
yuv_frame->fmt == VPX_IMG_FMT_YV12 ? VPX_PLANE_V : VPX_PLANE_U];
break;
case 2:
ptr = yuv_frame->planes[
yuv_frame->fmt == VPX_IMG_FMT_YV12 ? VPX_PLANE_U : VPX_PLANE_V];
break;
default:
ptr = yuv_frame->planes[plane];
}
for (r = 0; r < h; ++r) {
size_t needed = w;
size_t buf_position = 0;
const size_t left = detect->buf_read - detect->position;
if (left > 0) {
const size_t more = (left < needed) ? left : needed;
memcpy(ptr, detect->buf + detect->position, more);
buf_position = more;
needed -= more;
detect->position += more;
}
if (needed > 0) {
shortread |= (fread(ptr + buf_position, 1, needed, f) < needed);
}
ptr += yuv_frame->stride[plane];
}
}
return shortread;
}

View File

@@ -13,6 +13,12 @@
#include <stdio.h>
#include "./vpx_config.h"
#include "vpx/vpx_image.h"
#include "vpx/vpx_integer.h"
#if CONFIG_ENCODERS
#include "./y4minput.h"
#endif
#if defined(_MSC_VER)
/* MSVS doesn't define off_t, and uses _f{seek,tell}i64. */
@@ -52,11 +58,55 @@ typedef long off_t; /* NOLINT */
#define PATH_MAX 512
#endif
#define IVF_FRAME_HDR_SZ (4 + 8) /* 4 byte size + 8 byte timestamp */
#define IVF_FILE_HDR_SZ 32
#define RAW_FRAME_HDR_SZ sizeof(uint32_t)
#define VP8_FOURCC (0x30385056)
#define VP9_FOURCC (0x30395056)
#define VP8_FOURCC_MASK (0x00385056)
#define VP9_FOURCC_MASK (0x00395056)
enum VideoFileType {
FILE_TYPE_RAW,
FILE_TYPE_IVF,
FILE_TYPE_Y4M,
FILE_TYPE_WEBM
};
struct FileTypeDetectionBuffer {
char buf[4];
size_t buf_read;
size_t position;
};
struct VpxRational {
int numerator;
int denominator;
};
struct VpxInputContext {
const char *filename;
FILE *file;
off_t length;
struct FileTypeDetectionBuffer detect;
enum VideoFileType file_type;
uint32_t width;
uint32_t height;
int use_i420;
int only_i420;
uint32_t fourcc;
struct VpxRational framerate;
#if CONFIG_ENCODERS
y4m_input y4m;
#endif
};
#ifdef __cplusplus
extern "C" {
#endif
/* Sets a stdio stream into binary mode */
FILE *set_binary_mode(FILE *stream);
@@ -67,4 +117,13 @@ void warn(const char *fmt, ...);
/* The tool including this file must define usage_exit() */
void usage_exit();
uint16_t mem_get_le16(const void *data);
uint32_t mem_get_le32(const void *data);
int read_yuv_frame(struct VpxInputContext *input_ctx, vpx_image_t *yuv_frame);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif // TOOLS_COMMON_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef __INC_ALLOCCOMMON_H
#define __INC_ALLOCCOMMON_H
#ifndef VP8_COMMON_ALLOCCOMMON_H_
#define VP8_COMMON_ALLOCCOMMON_H_
#include "onyxc_int.h"
@@ -20,4 +20,4 @@ void vp8_de_alloc_frame_buffers(VP8_COMMON *oci);
int vp8_alloc_frame_buffers(VP8_COMMON *oci, int width, int height);
void vp8_setup_version(VP8_COMMON *oci);
#endif
#endif // VP8_COMMON_ALLOCCOMMON_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef BILINEARFILTER_ARM_H
#define BILINEARFILTER_ARM_H
#ifndef VP8_COMMON_ARM_BILINEARFILTER_ARM_H_
#define VP8_COMMON_ARM_BILINEARFILTER_ARM_H_
extern void vp8_filter_block2d_bil_first_pass_armv6
(
@@ -32,4 +32,4 @@ extern void vp8_filter_block2d_bil_second_pass_armv6
const short *vp8_filter
);
#endif /* BILINEARFILTER_ARM_H */
#endif // VP8_COMMON_ARM_BILINEARFILTER_ARM_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef __INC_BLOCKD_H
#define __INC_BLOCKD_H
#ifndef VP8_COMMON_BLOCKD_H_
#define VP8_COMMON_BLOCKD_H_
void vpx_log(const char *format, ...);
@@ -297,4 +297,4 @@ typedef struct macroblockd
extern void vp8_build_block_doffsets(MACROBLOCKD *x);
extern void vp8_setup_block_dptrs(MACROBLOCKD *x);
#endif /* __INC_BLOCKD_H */
#endif // VP8_COMMON_BLOCKD_H_

View File

@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef VP8_COMMON_COEFUPDATEPROBS_H_
#define VP8_COMMON_COEFUPDATEPROBS_H_
/* Update probabilities for the nodes in the token entropy tree.
Generated file included by entropy.c */
@@ -183,3 +185,5 @@ const vp8_prob vp8_coef_update_probs [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTE
},
},
};
#endif // VP8_COMMON_COEFUPDATEPROBS_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef common_h
#define common_h 1
#ifndef VP8_COMMON_COMMON_H_
#define VP8_COMMON_COMMON_H_
#include <assert.h>
@@ -37,4 +37,4 @@
#define vp8_zero_array( Dest, N) vpx_memset( Dest, 0, N * sizeof( *Dest));
#endif /* common_h */
#endif // VP8_COMMON_COMMON_H_

View File

@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef VP8_COMMON_DEFAULT_COEF_PROBS_H_
#define VP8_COMMON_DEFAULT_COEF_PROBS_H_
/*Generated file, included by entropy.c*/
@@ -186,3 +188,5 @@ static const vp8_prob default_coef_probs [BLOCK_TYPES]
}
}
};
#endif // VP8_COMMON_DEFAULT_COEF_PROBS_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef __INC_ENTROPY_H
#define __INC_ENTROPY_H
#ifndef VP8_COMMON_ENTROPY_H_
#define VP8_COMMON_ENTROPY_H_
#include "treecoder.h"
#include "blockd.h"
@@ -98,4 +98,4 @@ extern DECLARE_ALIGNED(16, const short, vp8_default_zig_zag_mask[16]);
extern const int vp8_mb_feature_data_bits[MB_LVL_MAX];
void vp8_coef_tree_initialize(void);
#endif
#endif // VP8_COMMON_ENTROPY_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef __INC_ENTROPYMODE_H
#define __INC_ENTROPYMODE_H
#ifndef VP8_COMMON_ENTROPYMODE_H_
#define VP8_COMMON_ENTROPYMODE_H_
#include "onyxc_int.h"
#include "treecoder.h"
@@ -77,4 +77,4 @@ void vp8_init_mbmode_probs(VP8_COMMON *x);
void vp8_default_bmode_probs(vp8_prob dest [VP8_BINTRAMODES-1]);
void vp8_kf_default_bmode_probs(vp8_prob dest [VP8_BINTRAMODES] [VP8_BINTRAMODES] [VP8_BINTRAMODES-1]);
#endif
#endif // VP8_COMMON_ENTROPYMODE_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef __INC_ENTROPYMV_H
#define __INC_ENTROPYMV_H
#ifndef VP8_COMMON_ENTROPYMV_H_
#define VP8_COMMON_ENTROPYMV_H_
#include "treecoder.h"
@@ -41,4 +41,4 @@ typedef struct mv_context
extern const MV_CONTEXT vp8_mv_update_probs[2], vp8_default_mv_context[2];
#endif
#endif // VP8_COMMON_ENTROPYMV_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef __INC_EXTEND_H
#define __INC_EXTEND_H
#ifndef VP8_COMMON_EXTEND_H_
#define VP8_COMMON_EXTEND_H_
#include "vpx_scale/yv12config.h"
@@ -22,4 +22,4 @@ void vp8_copy_and_extend_frame_with_rect(YV12_BUFFER_CONFIG *src,
int srcy, int srcx,
int srch, int srcw);
#endif
#endif // VP8_COMMON_EXTEND_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef FILTER_H
#define FILTER_H
#ifndef VP8_COMMON_FILTER_H_
#define VP8_COMMON_FILTER_H_
#include "vpx_ports/mem.h"
@@ -21,4 +21,4 @@
extern DECLARE_ALIGNED(16, const short, vp8_bilinear_filters[8][2]);
extern DECLARE_ALIGNED(16, const short, vp8_sub_pel_filters[8][6]);
#endif
#endif // VP8_COMMON_FILTER_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef __INC_FINDNEARMV_H
#define __INC_FINDNEARMV_H
#ifndef VP8_COMMON_FINDNEARMV_H_
#define VP8_COMMON_FINDNEARMV_H_
#include "mv.h"
#include "blockd.h"
@@ -179,4 +179,4 @@ static B_PREDICTION_MODE above_block_mode(const MODE_INFO *cur_mb, int b, int mi
return (cur_mb->bmi + b - 4)->as_mode;
}
#endif
#endif // VP8_COMMON_FINDNEARMV_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef __INC_HEADER_H
#define __INC_HEADER_H
#ifndef VP8_COMMON_HEADER_H_
#define VP8_COMMON_HEADER_H_
/* 24 bits total */
typedef struct
@@ -40,4 +40,4 @@ typedef struct
#endif
#endif
#endif // VP8_COMMON_HEADER_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef __INC_INVTRANS_H
#define __INC_INVTRANS_H
#ifndef VP8_COMMON_INVTRANS_H_
#define VP8_COMMON_INVTRANS_H_
#include "vpx_config.h"
#include "vp8_rtcd.h"
@@ -59,4 +59,4 @@ static void vp8_inverse_transform_mby(MACROBLOCKD *xd)
xd->dst.y_buffer,
xd->dst.y_stride, xd->eobs);
}
#endif
#endif // VP8_COMMON_INVTRANS_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef loopfilter_h
#define loopfilter_h
#ifndef VP8_COMMON_LOOPFILTER_H_
#define VP8_COMMON_LOOPFILTER_H_
#include "vpx_ports/mem.h"
#include "vpx_config.h"
@@ -102,4 +102,4 @@ void vp8_loop_filter_row_simple(struct VP8Common *cm,
int mb_row, int post_ystride, int post_uvstride,
unsigned char *y_ptr, unsigned char *u_ptr,
unsigned char *v_ptr);
#endif
#endif // VP8_COMMON_LOOPFILTER_H_

View File

@@ -9,9 +9,9 @@
*/
#ifndef __INC_MODECONT_H
#define __INC_MODECONT_H
#ifndef VP8_COMMON_MODECONT_H_
#define VP8_COMMON_MODECONT_H_
extern const int vp8_mode_contexts[6][4];
#endif
#endif // VP8_COMMON_MODECONT_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef __INC_MV_H
#define __INC_MV_H
#ifndef VP8_COMMON_MV_H_
#define VP8_COMMON_MV_H_
#include "vpx/vpx_integer.h"
typedef struct
@@ -25,4 +25,4 @@ typedef union int_mv
MV as_mv;
} int_mv; /* facilitates faster equality tests and copies */
#endif
#endif // VP8_COMMON_MV_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef __INC_VP8_H
#define __INC_VP8_H
#ifndef VP8_COMMON_ONYX_H_
#define VP8_COMMON_ONYX_H_
#ifdef __cplusplus
extern "C"
@@ -267,4 +267,4 @@ extern "C"
}
#endif
#endif
#endif // VP8_COMMON_ONYX_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef __INC_VP8C_INT_H
#define __INC_VP8C_INT_H
#ifndef VP8_COMMON_ONYXC_INT_H_
#define VP8_COMMON_ONYXC_INT_H_
#include "vpx_config.h"
#include "vp8_rtcd.h"
@@ -174,4 +174,4 @@ typedef struct VP8Common
int cpu_caps;
} VP8_COMMON;
#endif
#endif // VP8_COMMON_ONYXC_INT_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef __INC_VP8D_H
#define __INC_VP8D_H
#ifndef VP8_COMMON_ONYXD_H_
#define VP8_COMMON_ONYXD_H_
/* Create/destroy static data structures. */
@@ -60,4 +60,4 @@ extern "C"
#endif
#endif
#endif // VP8_COMMON_ONYXD_H_

View File

@@ -71,11 +71,6 @@ static const unsigned char MV_REFERENCE_FRAME_colors[MAX_REF_FRAMES][3] =
};
#endif
static const short kernel5[] =
{
1, 1, 4, 1, 1
};
const short vp8_rv[] =
{
8, 5, 2, 2, 8, 12, 4, 9, 8, 3,

View File

@@ -9,8 +9,8 @@
*/
#ifndef POSTPROC_H
#define POSTPROC_H
#ifndef VP8_COMMON_POSTPROC_H_
#define VP8_COMMON_POSTPROC_H_
#include "vpx_ports/mem.h"
struct postproc_state
@@ -47,4 +47,4 @@ void vp8_deblock(struct VP8Common *oci,
#define MFQE_PRECISION 4
void vp8_multiframe_quality_enhance(struct VP8Common *cm);
#endif
#endif // VP8_COMMON_POSTPROC_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef __INC_PPFLAGS_H
#define __INC_PPFLAGS_H
#ifndef VP8_COMMON_PPFLAGS_H_
#define VP8_COMMON_PPFLAGS_H_
enum
{
VP8D_NOFILTERING = 0,
@@ -38,4 +38,4 @@ typedef struct
int display_mv_flag;
} vp8_ppflags_t;
#endif
#endif // VP8_COMMON_PPFLAGS_H_

View File

@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef VP8_COMMON_PRAGMAS_H_
#define VP8_COMMON_PRAGMAS_H_
#ifdef __INTEL_COMPILER
#pragma warning(disable:997 1011 170)
@@ -17,3 +17,5 @@
#ifdef _MSC_VER
#pragma warning(disable:4799)
#endif
#endif // VP8_COMMON_PRAGMAS_H_

View File

@@ -8,6 +8,9 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef VP8_COMMON_QUANT_COMMON_H_
#define VP8_COMMON_QUANT_COMMON_H_
#include "string.h"
#include "blockd.h"
@@ -19,3 +22,5 @@ extern int vp8_dc2quant(int QIndex, int Delta);
extern int vp8_ac2quant(int QIndex, int Delta);
extern int vp8_dc_uv_quant(int QIndex, int Delta);
extern int vp8_ac_uv_quant(int QIndex, int Delta);
#endif // VP8_COMMON_QUANT_COMMON_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef __INC_RECONINTER_H
#define __INC_RECONINTER_H
#ifndef VP8_COMMON_RECONINTER_H_
#define VP8_COMMON_RECONINTER_H_
extern void vp8_build_inter_predictors_mb(MACROBLOCKD *x);
extern void vp8_build_inter16x16_predictors_mb(MACROBLOCKD *x,
@@ -32,4 +32,4 @@ extern void vp8_build_inter_predictors_b(BLOCKD *d, int pitch,
extern void vp8_build_inter16x16_predictors_mbuv(MACROBLOCKD *x);
extern void vp8_build_inter4x4_predictors_mbuv(MACROBLOCKD *x);
#endif
#endif // VP8_COMMON_RECONINTER_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef __INC_RECONINTRA4x4_H
#define __INC_RECONINTRA4x4_H
#ifndef VP8_COMMON_RECONINTRA4X4_H_
#define VP8_COMMON_RECONINTRA4X4_H_
#include "vp8/common/blockd.h"
static void intra_prediction_down_copy(MACROBLOCKD *xd,
@@ -29,4 +29,4 @@ static void intra_prediction_down_copy(MACROBLOCKD *xd,
*dst_ptr2 = *src_ptr;
}
#endif
#endif // VP8_COMMON_RECONINTRA4X4_H_

View File

@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef VP8_COMMON_SETUPINTRARECON_H_
#define VP8_COMMON_SETUPINTRARECON_H_
#include "vpx_scale/yv12config.h"
extern void vp8_setup_intra_recon(YV12_BUFFER_CONFIG *ybf);
@@ -31,3 +33,5 @@ void setup_intra_recon_left(unsigned char *y_buffer,
for (i = 0; i < 8; i++)
v_buffer[uv_stride *i] = (unsigned char) 129;
}
#endif // VP8_COMMON_SETUPINTRARECON_H_

View File

@@ -9,11 +9,11 @@
*/
#ifndef SWAPYV12_BUFFER_H
#define SWAPYV12_BUFFER_H
#ifndef VP8_COMMON_SWAPYV12BUFFER_H_
#define VP8_COMMON_SWAPYV12BUFFER_H_
#include "vpx_scale/yv12config.h"
void vp8_swap_yv12_buffer(YV12_BUFFER_CONFIG *new_frame, YV12_BUFFER_CONFIG *last_frame);
#endif
#endif // VP8_COMMON_SWAPYV12BUFFER_H_

View File

@@ -8,8 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef VP8_COMMON_SYSTEMDEPENDENT_H_
#define VP8_COMMON_SYSTEMDEPENDENT_H_
#include "vpx_config.h"
struct VP8Common;
void vp8_machine_specific_config(struct VP8Common *);
#endif // VP8_COMMON_SYSTEMDEPENDENT_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef _PTHREAD_EMULATION
#define _PTHREAD_EMULATION
#ifndef VP8_COMMON_THREADING_H_
#define VP8_COMMON_THREADING_H_
#if CONFIG_OS_SUPPORT && CONFIG_MULTITHREAD
@@ -183,4 +183,4 @@ static inline int sem_destroy(sem_t * sem)
#endif /* CONFIG_OS_SUPPORT && CONFIG_MULTITHREAD */
#endif
#endif // VP8_COMMON_THREADING_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef __INC_TREECODER_H
#define __INC_TREECODER_H
#ifndef VP8_COMMON_TREECODER_H_
#define VP8_COMMON_TREECODER_H_
typedef unsigned char vp8bc_index_t; /* probability index */
@@ -87,4 +87,4 @@ void vp8bc_tree_probs_from_distribution(
);
#endif
#endif // VP8_COMMON_TREECODER_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef VARIANCE_H
#define VARIANCE_H
#ifndef VP8_COMMON_VARIANCE_H_
#define VP8_COMMON_VARIANCE_H_
#include "vpx_config.h"
@@ -112,4 +112,4 @@ typedef struct variance_vtable
#endif
} vp8_variance_fn_ptr_t;
#endif
#endif // VP8_COMMON_VARIANCE_H_

View File

@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef VP8_COMMON_VP8_ENTROPYMODEDATA_H_
#define VP8_COMMON_VP8_ENTROPYMODEDATA_H_
/*Generated file, included by entropymode.c*/
@@ -240,3 +242,5 @@ const vp8_prob vp8_kf_bmode_prob
{ 112, 19, 12, 61, 195, 128, 48, 4, 24 }
}
};
#endif // VP8_COMMON_VP8_ENTROPYMODEDATA_H_

View File

@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef FILTER_X86_H
#define FILTER_X86_H
#ifndef VP8_COMMON_X86_FILTER_X86_H_
#define VP8_COMMON_X86_FILTER_X86_H_
#include "vpx_ports/mem.h"
@@ -22,4 +22,4 @@ extern DECLARE_ALIGNED(16, const short, vp8_bilinear_filters_x86_4[8][8]);
/* duplicated 8x */
extern DECLARE_ALIGNED(16, const short, vp8_bilinear_filters_x86_8[8][16]);
#endif /* FILTER_X86_H */
#endif // VP8_COMMON_X86_FILTER_X86_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef DBOOLHUFF_H_
#define DBOOLHUFF_H_
#ifndef VP8_DECODER_DBOOLHUFF_H_
#define VP8_DECODER_DBOOLHUFF_H_
#include <stddef.h>
#include <limits.h>
@@ -135,4 +135,4 @@ static int vp8dx_bool_error(BOOL_DECODER *br)
return 0;
}
#endif // DBOOLHUFF_H_
#endif // VP8_DECODER_DBOOLHUFF_H_

View File

@@ -680,7 +680,6 @@ static void decode_mb_rows(VP8D_COMP *pbi)
vp8_loop_filter_row_simple(pc, lf_mic, mb_row-1,
recon_y_stride, recon_uv_stride,
lf_dst[0], lf_dst[1], lf_dst[2]);
if(mb_row > 1)
{
yv12_extend_frame_left_right_c(yv12_fb_new,
@@ -691,10 +690,6 @@ static void decode_mb_rows(VP8D_COMP *pbi)
eb_dst[0] += recon_y_stride * 16;
eb_dst[1] += recon_uv_stride * 8;
eb_dst[2] += recon_uv_stride * 8;
if(mb_row == 2)
yv12_extend_frame_top_c(yv12_fb_new);
}
lf_dst[0] += recon_y_stride * 16;
@@ -713,13 +708,9 @@ static void decode_mb_rows(VP8D_COMP *pbi)
eb_dst[0],
eb_dst[1],
eb_dst[2]);
eb_dst[0] += recon_y_stride * 16;
eb_dst[1] += recon_uv_stride * 8;
eb_dst[2] += recon_uv_stride * 8;
if(mb_row == 1)
yv12_extend_frame_top_c(yv12_fb_new);
}
}
}
@@ -747,7 +738,7 @@ static void decode_mb_rows(VP8D_COMP *pbi)
eb_dst[0],
eb_dst[1],
eb_dst[2]);
yv12_extend_frame_top_c(yv12_fb_new);
yv12_extend_frame_bottom_c(yv12_fb_new);
}

View File

@@ -8,11 +8,11 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef DECODEMV_H_
#define DECODEMV_H_
#ifndef VP8_DECODER_DECODEMV_H_
#define VP8_DECODER_DECODEMV_H_
#include "onyxd_int.h"
void vp8_decode_mode_mvs(VP8D_COMP *);
#endif // DECODEMV_H_
#endif // VP8_DECODER_DECODEMV_H_

View File

@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef DECODERTHREADING_H_
#define DECODERTHREADING_H_
#ifndef VP8_DECODER_DECODERTHREADING_H_
#define VP8_DECODER_DECODERTHREADING_H_
#if CONFIG_MULTITHREAD
void vp8mt_decode_mb_rows(VP8D_COMP *pbi, MACROBLOCKD *xd);
@@ -19,4 +19,4 @@ void vp8mt_alloc_temp_buffers(VP8D_COMP *pbi, int width, int prev_mb_rows);
void vp8mt_de_alloc_temp_buffers(VP8D_COMP *pbi, int mb_rows);
#endif
#endif // DECODERTHREADING_H_
#endif // VP8_DECODER_DECODERTHREADING_H_

View File

@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef DETOKENIZE_H_
#define DETOKENIZE_H_
#ifndef VP8_DECODER_DETOKENIZE_H_
#define VP8_DECODER_DETOKENIZE_H_
#include "onyxd_int.h"
void vp8_reset_mb_tokens_context(MACROBLOCKD *x);
int vp8_decode_mb_tokens(VP8D_COMP *, MACROBLOCKD *);
#endif // DETOKENIZE_H
#endif // VP8_DECODER_DETOKENIZE_H_

View File

@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef VP8_DEC_EC_TYPES_H
#define VP8_DEC_EC_TYPES_H
#ifndef VP8_DECODER_EC_TYPES_H_
#define VP8_DECODER_EC_TYPES_H_
#define MAX_OVERLAPS 16
@@ -47,4 +47,4 @@ typedef struct
MV_REFERENCE_FRAME ref_frame;
} EC_BLOCK;
#endif // VP8_DEC_EC_TYPES_H
#endif // VP8_DECODER_EC_TYPES_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef ERROR_CONCEALMENT_H_
#define ERROR_CONCEALMENT_H_
#ifndef VP8_DECODER_ERROR_CONCEALMENT_H_
#define VP8_DECODER_ERROR_CONCEALMENT_H_
#include "onyxd_int.h"
#include "ec_types.h"
@@ -38,4 +38,4 @@ void vp8_interpolate_motion(MACROBLOCKD *mb,
*/
void vp8_conceal_corrupt_mb(MACROBLOCKD *xd);
#endif // ERROR_CONCEALMENT_H_
#endif // VP8_DECODER_ERROR_CONCEALMENT_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef ONYXD_INT_H_
#define ONYXD_INT_H_
#ifndef VP8_DECODER_ONYXD_INT_H_
#define VP8_DECODER_ONYXD_INT_H_
#include "vpx_config.h"
#include "vp8/common/onyxd.h"
@@ -148,4 +148,4 @@ int vp8_remove_decoder_instances(struct frame_buffers *fb);
} while(0)
#endif
#endif // ONYXD_INT_H_
#endif // VP8_DECODER_ONYXD_INT_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef TREEREADER_H_
#define TREEREADER_H_
#ifndef VP8_DECODER_TREEREADER_H_
#define VP8_DECODER_TREEREADER_H_
#include "vp8/common/treecoder.h"
#include "dboolhuff.h"
@@ -37,4 +37,4 @@ static int vp8_treed_read(
return -i;
}
#endif // TREEREADER_H_
#endif // VP8_DECODER_TREEREADER_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef __INC_BITSTREAM_H
#define __INC_BITSTREAM_H
#ifndef VP8_ENCODER_BITSTREAM_H_
#define VP8_ENCODER_BITSTREAM_H_
#if HAVE_EDSP
void vp8cx_pack_tokens_armv5(vp8_writer *w, const TOKENEXTRA *p, int xcount,
@@ -43,4 +43,4 @@ void vp8_pack_tokens_c(vp8_writer *w, const TOKENEXTRA *p, int xcount);
# define pack_mb_row_tokens(a,b) pack_mb_row_tokens_c(a,b)
#endif
#endif
#endif // VP8_ENCODER_BITSTREAM_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef __INC_BLOCK_H
#define __INC_BLOCK_H
#ifndef VP8_ENCODER_BLOCK_H_
#define VP8_ENCODER_BLOCK_H_
#include "vp8/common/onyx.h"
#include "vp8/common/blockd.h"
@@ -160,4 +160,4 @@ typedef struct macroblock
} MACROBLOCK;
#endif
#endif // VP8_ENCODER_BLOCK_H_

View File

@@ -16,8 +16,8 @@
* Description : Bool Coder header file.
*
****************************************************************************/
#ifndef __INC_BOOLHUFF_H
#define __INC_BOOLHUFF_H
#ifndef VP8_ENCODER_BOOLHUFF_H_
#define VP8_ENCODER_BOOLHUFF_H_
#include "vpx_ports/mem.h"
#include "vpx/internal/vpx_codec_internal.h"
@@ -125,4 +125,4 @@ static void vp8_encode_bool(BOOL_CODER *br, int bit, int probability)
br->range = range;
}
#endif
#endif // VP8_ENCODER_BOOLHUFF_H_

View File

@@ -8,6 +8,9 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef VP8_ENCODER_DCT_VALUE_COST_H_
#define VP8_ENCODER_DCT_VALUE_COST_H_
/* Generated file, included by tokenize.c */
/* Values generated by fill_value_tokens() */
@@ -356,3 +359,5 @@ static const short dct_value_cost[2048*2] =
8134, 8140, 8148, 8170, 8178, 8184, 8192, 8202, 8210, 8216, 8224, 8243,
8251, 8257, 8265, 8275
};
#endif // VP8_ENCODER_DCT_VALUE_COST_H_

View File

@@ -8,6 +8,9 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef VP8_ENCODER_DCT_VALUE_TOKENS_H_
#define VP8_ENCODER_DCT_VALUE_TOKENS_H_
/* Generated file, included by tokenize.c */
/* Values generated by fill_value_tokens() */
@@ -697,3 +700,5 @@ static const TOKENVALUE dct_value_tokens[2048*2] =
{10, 3942}, {10, 3944}, {10, 3946}, {10, 3948}, {10, 3950}, {10, 3952},
{10, 3954}, {10, 3956}, {10, 3958}, {10, 3960}
};
#endif // VP8_ENCODER_DCT_VALUE_TOKENS_H_

View File

@@ -8,6 +8,9 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef VP8_ENCODER_DEFAULTCOEFCOUNTS_H_
#define VP8_ENCODER_DEFAULTCOEFCOUNTS_H_
/* Generated file, included by entropy.c */
static const unsigned int default_coef_counts[BLOCK_TYPES]
@@ -221,3 +224,5 @@ static const unsigned int default_coef_counts[BLOCK_TYPES]
},
},
};
#endif // VP8_ENCODER_DEFAULTCOEFCOUNTS_H_

View File

@@ -39,4 +39,4 @@ void vp8_denoiser_denoise_mb(VP8_DENOISER *denoiser,
int recon_yoffset,
int recon_uvoffset);
#endif /* VP8_ENCODER_DENOISING_H_ */
#endif // VP8_ENCODER_DENOISING_H_

View File

@@ -7,8 +7,8 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef ENCODEFRAME_H
#define ENCODEFRAME_H
#ifndef VP8_ENCODER_ENCODEFRAME_H_
#define VP8_ENCODER_ENCODEFRAME_H_
extern void vp8_activity_masking(VP8_COMP *cpi, MACROBLOCK *x);
extern void vp8_build_block_offsets(MACROBLOCK *x);
@@ -24,4 +24,4 @@ extern int vp8cx_encode_inter_macroblock(VP8_COMP *cpi, MACROBLOCK *x,
extern int vp8cx_encode_intra_macroblock(VP8_COMP *cpi, MACROBLOCK *x,
TOKENEXTRA **t);
#endif
#endif // VP8_ENCODER_ENCODEFRAME_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef _ENCODEINTRA_H_
#define _ENCODEINTRA_H_
#ifndef VP8_ENCODER_ENCODEINTRA_H_
#define VP8_ENCODER_ENCODEINTRA_H_
#include "onyx_int.h"
int vp8_encode_intra(VP8_COMP *cpi, MACROBLOCK *x, int use_dc_pred);
@@ -18,4 +18,4 @@ void vp8_encode_intra16x16mby(MACROBLOCK *x);
void vp8_encode_intra16x16mbuv(MACROBLOCK *x);
void vp8_encode_intra4x4mby(MACROBLOCK *mb);
void vp8_encode_intra4x4block(MACROBLOCK *x, int ib);
#endif
#endif // VP8_ENCODER_ENCODEINTRA_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef __INC_ENCODEMB_H
#define __INC_ENCODEMB_H
#ifndef VP8_ENCODER_ENCODEMB_H_
#define VP8_ENCODER_ENCODEMB_H_
#include "onyx_int.h"
void vp8_encode_inter16x16(MACROBLOCK *x);
@@ -23,4 +23,4 @@ void vp8_transform_intra_mby(MACROBLOCK *x);
void vp8_optimize_mby(MACROBLOCK *x);
void vp8_optimize_mbuv(MACROBLOCK *x);
void vp8_encode_inter16x16y(MACROBLOCK *x);
#endif
#endif // VP8_ENCODER_ENCODEMB_H_

View File

@@ -9,8 +9,8 @@
*/
#ifndef __INC_ENCODEMV_H
#define __INC_ENCODEMV_H
#ifndef VP8_ENCODER_ENCODEMV_H_
#define VP8_ENCODER_ENCODEMV_H_
#include "onyx_int.h"
@@ -18,4 +18,4 @@ void vp8_write_mvprobs(VP8_COMP *);
void vp8_encode_motion_vector(vp8_writer *, const MV *, const MV_CONTEXT *);
void vp8_build_component_cost_table(int *mvcost[2], const MV_CONTEXT *mvc, int mvc_flag[2]);
#endif
#endif // VP8_ENCODER_ENCODEMV_H_

View File

@@ -9,8 +9,8 @@
*/
#if !defined __INC_FIRSTPASS_H
#define __INC_FIRSTPASS_H
#ifndef VP8_ENCODER_FIRSTPASS_H_
#define VP8_ENCODER_FIRSTPASS_H_
extern void vp8_init_first_pass(VP8_COMP *cpi);
extern void vp8_first_pass(VP8_COMP *cpi);
@@ -21,4 +21,4 @@ extern void vp8_second_pass(VP8_COMP *cpi);
extern void vp8_end_second_pass(VP8_COMP *cpi);
extern size_t vp8_firstpass_stats_sz(unsigned int mb_count);
#endif
#endif // VP8_ENCODER_FIRSTPASS_H_

Some files were not shown because too many files have changed in this diff Show More