Ari Koivula
202aec69f2
Change more 8-bit pixels to pixel typedef.
2013-10-15 16:02:06 +03:00
Ari Koivula
b8dd664026
Move all 8-bit pixels into new pixel typedef.
2013-10-15 14:36:30 +03:00
Ari Koivula
0c3bd7e223
Move SAD calculations to picture module.
2013-10-11 15:37:58 +03:00
Ari Koivula
69d1f6d1e2
Clean up the code.
...
- Rename get_block_sad to calc_sad and handle special cases in general_sad.
- Remove old search functions because I don't want to update or test them.
2013-10-11 15:19:21 +03:00
Ari Koivula
be501f720c
Reorder conditions.
2013-10-11 14:11:49 +03:00
Ari Koivula
235b1ec0bc
Add rest of the quadrants for sad calculation.
...
- All tests pass.
- Movement vectors that don't overlap with the frame aren't handled yet.
2013-10-11 12:41:07 +03:00
Ari Koivula
b58a6387ee
Clean up the code a bit.
2013-10-11 11:04:49 +03:00
Ari Koivula
7e6c9aefe8
Add handling of more cases to sad calculation.
2013-10-10 21:51:27 +03:00
Ari Koivula
4e36992752
Move basic SAD functions to picture-module.
2013-10-10 21:49:41 +03:00
Ari Koivula
0e078b2d18
Rethink SAD-calculation.
2013-10-10 21:49:20 +03:00
Ari Koivula
1fcb452479
Simplify reference buffer calculation.
2013-10-10 21:48:55 +03:00
Ari Koivula
684f6d548c
Start adding sad calculation outside frame.
...
Works for top-left corner. 2/9 tests pass.
2013-10-10 16:11:07 +03:00
Ari Koivula
ea30bf0126
Fix SAD calculation to return correct value in non-overlapping case.
2013-10-09 16:08:56 +03:00
Ari Koivula
cdcb56dd4a
Add special case for the 0,0 vector to hexagon search.
2013-10-08 16:11:00 +03:00
Ari Koivula
8910037936
Add hexagon-based motion vector search.
2013-10-08 13:38:03 +03:00
Marko Viitanen
351817d008
Fixed intra block selection (always selected 64x64 which was not in search)
2013-10-08 12:13:52 +03:00
Ari Koivula
61eb3b3b71
Improve cu-visualization by arranging them to picture dimensions and colors.
2013-10-01 20:46:10 +03:00
Ari Koivula
9bd35fcdb1
Remove split attribute from cu_info.
...
It is no longer used.
2013-09-30 16:42:23 +03:00
Ari Koivula
f58e418a1a
Fix out-of-bounds detection in mv-search.
...
All blocks were intra because no movement vectors could be found.
2013-09-30 10:47:05 +03:00
Ari Koivula
571fec7c39
Add a more general cost function to motion search.
2013-09-28 16:41:57 +03:00
Ari Koivula
562a43d541
Fix bug with initial prediction of motion vector.
2013-09-28 16:34:23 +03:00
Ari Koivula
8bce7c84a0
Disable early cutoff optimization for motion vector search.c
...
It probably doesn't work right and might cause issues.
2013-09-28 16:04:11 +03:00
Ari Koivula
7979a59168
Fix check for (0, 0) vector when searching for best movement vector.
2013-09-28 16:02:30 +03:00
Ari Koivula
9bad984f14
Add special case for the (0, 0) vector to the fast search.
2013-09-25 19:31:49 +03:00
Ari Koivula
224bda37e7
Make a define switch for full search vs fast search.
2013-09-25 19:20:31 +03:00
Ari Koivula
b1ada6bcd4
Take initial motion vector from last frame.
2013-09-25 19:09:08 +03:00
Ari Koivula
1d1bfd2a6f
Remove unused stuff from motion search.
...
- inter_set_block is no longer needed.
2013-09-25 18:43:16 +03:00
Ari Koivula
4cda086035
Add an early stop condition to motion estimation.
2013-09-25 18:37:37 +03:00
Ari Koivula
2c894b49bf
Disable cu-structure debug rendering.
...
- This can be enabled when needed. It doesn't have to be enabled in git.
2013-09-25 18:18:10 +03:00
Ari Koivula
6f13168285
Add faster motion estimation algorithm.
...
- New motion estimation does the same pattern as the old one, but centers the
search on the best candidate at each step.
2013-09-25 18:16:31 +03:00
Ari Koivula
04f1dde8a1
Fix overwriting of motion vectors during search.
...
- Makes everything besides search to only use the bottom most layer of the
picture.cu_array structure.
2013-09-25 16:21:51 +03:00
Ari Koivula
cda681294c
Fix unsigned/signed mismatch warning.
2013-09-24 21:32:11 +03:00
Ari Koivula
6dd049a238
Refactor: picture.h remaining renames.
2013-09-20 12:49:44 +03:00
Ari Koivula
8d5dd67f76
Refactor: Change name of CU_info.CU to cu_array.
2013-09-20 12:47:53 +03:00
Ari Koivula
5233c417df
Refactor: search.c/.h full cleanup.
2013-09-20 12:18:23 +03:00
Ari Koivula
d09e2bd214
Refactor: picture.c/.h full cleanup.
2013-09-20 11:15:18 +03:00
Marko Viitanen
5264569f43
Refactor: inter.c/.h full cleanup
2013-09-19 15:08:30 +03:00
Ari Koivula
adf619f9dd
Refactor: Update file comments.
2013-09-18 18:01:20 +03:00
Ari Koivula
de447ee18b
Refactoring: intra.h renaming.
2013-09-18 15:13:45 +03:00
Marko Viitanen
a018567854
Refactor: picture.h renaming.
2013-09-18 14:58:46 +03:00
Marko Viitanen
0bf4f65a55
Refactor: encoder.h renaming
2013-09-18 14:49:01 +03:00
Ari Koivula
4f360fcb80
Split MAX_SEARCH_DEPTH to inter and intra versions.
2013-09-18 12:29:23 +03:00
Ari Koivula
44a5498e30
Reorder includes to avoid hidden dependencies.
...
- Includes of global.h have been moved to headers because most headers
require stdint.h.
- Includes required by the header have been moved from the .c to the header.
- Spaces have been added between includes to distinguish classes of includes.
2013-09-18 12:29:23 +03:00
Ari Koivula
03f6bddfb0
Add visualization of CU blocks for mode searching.
...
This is for debugging the inter movement vector search.
2013-09-18 12:29:23 +03:00
Ari Koivula
48581bdad8
Add temporary mechanism to force use of prediction units.
2013-09-16 23:00:38 +03:00
Ari Koivula
fa0bab47f9
Fix MV search bugs.
...
- Calculate motion vector from the source instead of origo.
- Don't return without searching deeper.
2013-09-16 22:44:44 +03:00
Ari Koivula
48c2dc4cd9
Merge remote-tracking branch 'remotes/origin/fador'
2013-09-16 17:49:00 +03:00
Ari Koivula
82e2299b38
Add motion vector search.
...
- Add SAD calculation for arbitrary shape and size blocks.
2013-09-16 17:39:12 +03:00
Marko Viitanen
8e776366dc
Added (basic) motion vector prediction
2013-09-16 16:37:24 +03:00
Marko Viitanen
beef362624
Implemented inter reconstruction inter_recon()
2013-09-12 18:50:11 +03:00