Ari Koivula
c889e20e4c
Fix debug to work for intra and show CU part_mode.
2014-01-15 18:15:42 +02:00
Ari Koivula
7a7110ff7a
Move chroma transformation and reconstruction to it's own functions.
...
Just a simple copy and paste with minimal changes.
2014-01-15 16:55:05 +02:00
Ari Koivula
35ba873abc
Move transform unit coding to its own function.
2014-01-14 18:47:02 +02:00
Ari Koivula
a38a5fd647
Improve transform tree coding.
...
- Clean up code and comment.
- Change terminology to match H.265 specification where possible.
- Move transform splitting for depth==0 out of the coding part. It's not
possible to do it here anyway because intra reconstruction is different
if the transform is split.
- Add checking for transform hierarchy depth when coding split flag.
- Fixes bug with cu_data.tr_depth being set. The CU struct was being reused
for inter coded CUs, which did not initialize the tr_depth.
2014-01-14 18:39:24 +02:00
Ari Koivula
d5745aa31a
Fix encode_transform_tree to handle 4x4 luma.
...
- Add room to cu_data.coeff_top_yuv arrays for the 4x4 PUs data. Will probably have to do the same to other coeff flags. The flags could also probably be combined as they are a bit redundant.
2014-01-13 18:37:47 +02:00
Ari Koivula
73fdc35c4f
Try to implement 4x4 luma transform coding.
...
- Doesn't work yet so it's disabled.
- Change encode_transform_coeff to accept PU (Prediction Unit) coordinates
instead of CU coordinates because CUs are 8x8.
2014-01-09 19:30:54 +02:00
Ari Koivula
c3f4a628af
Try to fix stuff related to NxN intra transform splitting.
2014-01-03 16:47:27 +02:00
Ari Koivula
b897562ef8
Enable NxN.
2014-01-03 16:46:02 +02:00
Ari Koivula
00ece94613
Change the default encoder reconstruction file name.
...
YUV Toolkit parses the file name for frame size.
2014-01-03 13:03:46 +02:00
Ari Koivula
1b7e44c4d4
Add NxN to intra reconstruction.
2014-01-03 13:01:54 +02:00
Ari Koivula
4c84a35391
Add part size to intra_set_block_mode.
2014-01-03 13:01:13 +02:00
Ari Koivula
d9cdab052b
Add NxN mode selection to search_intra.
2014-01-03 10:21:59 +02:00
Ari Koivula
5083e6db10
Change cu_info.intra into an array to support NxN split.
2014-01-02 15:13:20 +02:00
Ari Koivula
80cd172f75
Clean up SAO encoding.
...
- Fixes a bug when pic->slice_sao_chroma == false.
2014-01-02 15:10:07 +02:00
Ari Koivula
8e2a7ef6ed
Start implementing NxN prediction coding.
2013-12-18 14:55:05 +02:00
Ari Koivula
553bcdc324
Rewrite intra prediction mode coding to be simpler.
...
Should work exactly the same, but with the prediction mode selection done
separately from the binarization it's easier to see that the implementation
is correct.
2013-12-18 14:16:04 +02:00
Ari Koivula
cf0d314d03
Clean up prediction mode coding.
...
This was done as preparation for adding NxN intra.
- Monochrome coding was removed as it's not part of the standard.
- No other functional changes.
2013-12-18 11:25:44 +02:00
Ari Koivula
8f610176d8
Add NxN part_mode coding.
2013-12-18 10:50:24 +02:00
Ari Koivula
ee92fc341c
Move intra and inter search into their own functions.
2013-12-17 11:32:28 +02:00
Ari Koivula
80064d3834
Streamline SAO to have less duplicated code.
2013-11-14 15:38:19 +02:00
Ari Koivula
21678930b1
Add an alternate way of accessing pixel buffers.
2013-11-14 15:38:10 +02:00
Marko Viitanen
06ab158c55
Enable using intra blocks in inter frame by default
2013-11-13 08:46:32 +02:00
Marko Viitanen
60cb42735e
Fixed issues on compiling the encoder on linux
2013-11-13 08:46:31 +02:00
Marko Viitanen
661ed343e6
Fixed deblocking filter when using intra blocks in inter slice
2013-11-13 08:46:31 +02:00
Ari Koivula
61232b466c
Move types to more appropriate places.
2013-11-12 12:44:58 +02:00
Ari Koivula
181a044b86
Merge branch 'sao'
2013-11-12 11:59:04 +02:00
Ari Koivula
3af65b8477
Add SAO searching and reconstruction for chroma.
...
One I frame and 99 P frames encoded with SAO off and on.
Processed 100 frames, 6693224 bits AVG PSNR: 30.7248 37.8978 37.8287
Processed 100 frames, 6295072 bits AVG PSNR: 32.2511 38.9373 38.9818
2013-11-12 11:55:39 +02:00
Ari Koivula
84cd618daf
Add calculation of SAO-offsets for non-LCU sized CUs. Luma SAO works now.
2013-11-11 09:49:49 +02:00
Ari Koivula
692ef3e9d9
Add guard against illegal SAO edge offsets.
2013-11-08 16:13:48 +02:00
Ari Koivula
22d21ffac2
Enable SAO search.
...
-Add guard to reconstruction to avoid reconstructing LCUs with no sao type.
-Add temporary guard to SAO search to skip LCUs can't be handled yet.
2013-11-08 15:39:01 +02:00
Ari Koivula
8b0eb66555
Fix bug in SAO reconstruction.
2013-11-08 15:04:53 +02:00
Ari Koivula
43ae719ddb
Tweak implementation of SAO reconstruction to be a bit more clear.
2013-11-08 15:04:06 +02:00
Ari Koivula
ef8a984d4f
Fix incorrect blitting of top row during SAO reconstruction.
2013-11-08 11:02:18 +02:00
Ari Koivula
f9061d322a
Fix handling of incomplete LCU's in SAO reconstruction.
2013-11-06 23:09:56 +02:00
Ari Koivula
7a20e797be
Fix incorrect SAO encoding.
2013-11-06 22:50:26 +02:00
Ari Koivula
3eccdc0d7b
Move deblocking filtering to happen before SAO reconstruction.
...
-Re-enable deblocking.
2013-11-06 22:50:14 +02:00
Ari Koivula
1c03471d57
Fix for leftmost LCUs being offset by one pixel during SAO reconstruction.
2013-11-06 22:26:00 +02:00
Ari Koivula
98f2a1aedc
Fix LCU borders in sao reconstruction.
2013-11-06 11:23:01 +02:00
Marko Viitanen
2c61286326
Added missing (0,0) merge/skip candidate to search
2013-11-05 12:49:39 +02:00
Marko Viitanen
93f2b75df7
Fixed a bug in flat scaling list and disabled scaling list by default
2013-11-05 09:41:14 +02:00
Ari Koivula
5791301c2b
Fix moving of rightmost LCUs during sao reconstruction.
...
Now the leftmost LCUs move though.
2013-11-04 21:37:04 +02:00
Ari Koivula
91024a2095
Disable deblocking because it breaks sao.
2013-11-04 20:51:51 +02:00
Ari Koivula
5f3ee9e096
Sao vcxproj files.
2013-11-04 20:35:48 +02:00
Ari Koivula
f21df00386
Save a copy of luma for sao.
2013-11-04 20:33:29 +02:00
Ari Koivula
a57b938270
Add new module sao.
...
- Move sao-stuff not directly related to encoding to sao-module.
- Calculate sao for all LCUs before encoding any of them. This is in
preparation to doing the reconstruction line at a time instead of
LCU at a time.
2013-11-04 19:41:01 +02:00
Ari Koivula
03f2967899
Block based sao dead end.
...
This will never work because the adjacent blocks require the original values
of the boundary pixels to make category decisions.
2013-11-04 17:55:29 +02:00
Ari Koivula
31af7e3929
Fix sao offsets. Reconstruction kind of works.
2013-11-04 13:05:05 +02:00
Ari Koivula
66fe302520
Fix cabac context for sao. HM accepts encoded sao.
2013-11-04 13:03:51 +02:00
Ari Koivula
b6c5c87fb7
Merge branch 'master' into sao
...
SAO needs to be coded before LCU data has been searched. Searching
has already been moved to happen before encoding in the master branch.
Conflicts:
src/encoder.c
src/picture.c
src/picture.h
2013-11-04 12:44:01 +02:00
Ari Koivula
7bd0902727
Implement fast distortion estimation for sao.
...
Add function for blitting pixels from one buffer to another.
Several commits have been squashed to this one.
2013-11-04 12:37:37 +02:00