Commit graph

531 commits

Author SHA1 Message Date
Marko Viitanen c202c8caac Fixed motion vector cost calculation a bit
Cost was calculated a bit wrong causing non-zero motion vectors on totally black video.
2014-02-10 20:30:55 +02:00
Marko Viitanen 0ac12e72f6 Added init value for encoder->ref_list to fix valgrind warnings
This might help with issue #16
Thanks again to ps-auxw for pointing this out ;)
2014-02-10 20:06:54 +02:00
Marko Viitanen 4bd6131499 Fixed array overflow causing segfault, fixes #17
Should also solve issue #16
Thanks to ps-auxw @ IRC for finding this stupid bug!
2014-02-10 19:40:43 +02:00
Ari Koivula 75f3ba5b2f Fix compiler warnings for VS2010 /W4 in nal.c.
- Working towards issue #11.
- Leaving this as a separate commit in case there is a regression.
2014-02-10 17:46:38 +02:00
Ari Koivula ea600ec980 Fix some compiler warnings for VS2010 /W4 in encoder.c.
- Working towards issue #11.
- There is a lot in this module so I'm fixing only ~half in this commit.
2014-02-10 17:31:52 +02:00
Ari Koivula e0cf09bc6b Fix compiler warnings for VS2010 /W4 in nal.c.
- Working towards issue #11.
- Removed todo about luma margin. The code should work even with margin.
2014-02-10 17:07:22 +02:00
Ari Koivula e66fe65f8b Fix compiler warnings for VS2010 /W4 in picture.c.
- Working towards issue #11.
2014-02-10 16:50:53 +02:00
Ari Koivula 6dbae48268 Remove debug module.
- It hasn't been very useful lately and I don't want to maintain it.
2014-02-10 16:50:53 +02:00
Ari Koivula bc3b80b9e4 Fix compiler warnings for VS2010 /W4 in intra.c.
- Working towards issue #11.
2014-02-10 16:50:10 +02:00
Ari Koivula 09b742796f Simplify intra reference border construction.
Doesn't change anything but makes the control flow more clear.
2014-02-10 16:19:17 +02:00
Ari Koivula b440c48d07 Fix intra reconstruction on the bottom of the frame.
When the CU was both at the bottom of frame and at the bottom of LCU,
uninitialized pixels were being used as reference.
2014-02-10 14:31:47 +02:00
Marko Viitanen 5f79f30b8c Added preliminary support for multiple reference frames
L0 reference list is being updated and sent to bitstream but actual usage of other than default reference might break something.
2014-02-10 11:32:48 +02:00
Marko Viitanen 241aa9155c Fixed crash-bug when using NxN Intra mode (array index overflow)
In NxN mode, chroma predictions were pushed to buffer when chroma should not have been used at all. (Because it is processed only on first of the four NxN luma blocks)
2014-02-07 17:24:58 +02:00
Marko Viitanen d106b21954 Removed redundant function call from encode_block_residual()
intra_set_block_mode() was called twice with the same parameters.
2014-02-07 15:33:58 +02:00
Marko Viitanen 27ffb98d08 Fixed an issue with NxN using uninitialized y_recdata
NxN is still disabled by default as it's being fixed.
2014-02-07 15:33:58 +02:00
Ari Koivula 526e3f9790 Fix interpolated_sad not working with vectors pointing far outside the frame. 2014-02-07 14:24:18 +02:00
Ari Koivula b48d1c9ca2 Fixes to version sei message.
- Fixed the last 16 characters of the url string being cut of.
- Added some guards against the message overwriting the stack.
2014-02-07 11:43:38 +02:00
Yusuke Nakamura 3e96df2a81 Write Kvazaar's version and encoding options in an user data unregistered SEI. 2014-02-07 10:53:18 +09:00
Yusuke Nakamura 430e475954 config: Add --aud to use access unit delimiters. 2014-02-07 07:35:15 +09:00
Yusuke Nakamura a29b6f7c92 Add some options to specify VUI parameters. 2014-02-07 06:50:43 +09:00
Ari Koivula f4d5370e8b Fix compiler warnings for VS2010 /W4 in context.c and rdo.c.
- Working towards issue #11.
- Moved all const arrays from .h to the .c. These are not used anywhere else.
- Moved entropy_bits array and its helper macro to rdo.c. They are not used
  anywhere else.
- Implicit conversions to explicit ones.
2014-02-06 17:57:41 +02:00
Ari Koivula 40ed25de7e Fix compiler warnings for VS2010 /W4 in sao.c.
- Working towards issue #11.
2014-02-06 16:06:24 +02:00
Ari Koivula 0188aa8631 Fix compiler warnings for VS2010 /W4 in search.c.
- Working towards issue #11.
- Implicit conversions to explicit ones.
2014-02-06 14:40:18 +02:00
Marko Viitanen 4704a6adf4 Added deblock beta/tc checking and allowed range to usage, closes issue #13 2014-02-06 14:33:13 +02:00
Ari Koivula 4184818322 Fix compiler warnings for VS2010 /W4 in tranform.c.
- Working towards issue #11.
- Lots of implicit conversions to explicit ones.
2014-02-06 14:02:56 +02:00
Ari Koivula 2614aa0fe4 Fix compiler warnings for VS2010 /W3.
- Working towards issue #11.
- Change lambda cost multiplier for intra NxN to from 256 to 4.
- Add 0.5 to the lambda multipliers so it's rounded instead of truncated.
2014-02-06 11:04:23 +02:00
Ari Koivula 1d730bd248 Update usage information and version string.
- Change stderr back to text mode. Can't see what harm it should allow us to print
  correct newlines for different platforms.
- Remove copy-pasted function calls from usage printing.
2014-02-05 19:16:44 +02:00
Ari Koivula 355340067f Modify search_tree to take a pixel coordinate instead of CU coordinate.
I need at least 4x4 resolution for NxN. It's simpler to just use pixel
coordinates.
2014-02-05 18:43:34 +02:00
Ari Koivula ea312082a4 Simplify the prediction mode search recursion.
No need to be so clever for something this simple.

I moved the cost initialization outside the recursing function because it
relied on the clever recursion to work. It should eventually be moved to its
own function that also initializes all the other fields just to be safe. I
didn't do that yet because I want to do it per-LCU and these functions are
still working on per-frame basis.
2014-02-05 18:43:34 +02:00
Marko Viitanen 337a565232 Better lambda cost implementation (from HM12)
- Lambda array changed to double as in HM
 - Needs updating when GOP / B-pictures are used
2014-02-05 15:57:16 +02:00
Marko Viitanen 2438386f4b Merge pull request #10 from VFR-maniac/fix
Avoid reading one extra frame at the end of the input file.
2014-02-04 07:35:47 -08:00
Marko Viitanen a4cd709fc7 Fixed missing includes in MSVC caused by the deletion of stdint.h 2014-02-04 17:23:50 +02:00
Yusuke Nakamura 42908076c2 config: Add --no-sao to disable sample adaptive offset filter. 2014-02-04 23:19:17 +09:00
Yusuke Nakamura f40d9a3e2f config: Add --deblock to specify deblocking parameter offsets divided by
2.
2014-02-04 23:19:17 +09:00
Yusuke Nakamura 89800d3690 config: Add --no-deblock to disable deblocking filter. 2014-02-04 23:19:16 +09:00
Yusuke Nakamura 4286c0f988 Support long option names by getopt_long(). 2014-02-04 23:19:16 +09:00
Yusuke Nakamura de2c4ab78e Avoid reading one extra frame at the end of the input file. 2014-02-04 21:55:08 +09:00
Marko Viitanen 39a45936a6 Fixed crash bug on QP < 15 caused by division with zero lambda cost 2014-02-04 09:39:27 +02:00
Ari Koivula 7bb9c25447 Remove duplicate implementation of intra_build_reference_border.
The search_buildReferenceBorder was an ugly hack and a place for bugs to hide
that should never have existed. Now it doesn't.

The change reduces PSNR a little, but also reduces the bitrate, when the
expected result was to have no change in either. I'm guessing there was still
some bug in the search_buildReferenceBorder, but the bug could also be in
intra_build_reference_border. Will have to do more testing to be sure, but
having one place to look at will be better than having two.
2014-02-03 18:35:11 +02:00
Marko Viitanen d1b093c2ee Merge branch 'master' of https://github.com/ultravideo/kvazaar 2014-02-03 17:20:36 +02:00
Ari Koivula 91ff5ff086 Merge branch 'jeeb-cleanup'
Conflicts:
	src/encoder.c
	src/encoder.h
2014-02-03 17:13:13 +02:00
Yusuke Nakamura 4ffdb358ed nal: Add the writing of an additional zero_byte before the start code.
Enables the output of spec-compliant byte streams, as the specification
notes that an additional zero_byte has to be added under certain
circuimstances.
2014-02-03 17:00:55 +02:00
Ari Koivula 478740cf21 Add missing new lines to ends of files. 2014-02-03 16:54:03 +02:00
Jan Ekström ac8fbc0519 Move initialization away from main() 2014-02-03 16:53:51 +02:00
Marko Viitanen d69f97cb90 Fixed level and profile sent to bitstream, for issue #5 b 2014-02-03 16:08:25 +02:00
Marko Viitanen 57d5f2fb93 Changes in Makefile for better 32/64bit detection
- Addresses issue #6
- Added -m64/-m32 flags for linker to allow 32bit compiling on 64bit platform
2014-02-03 15:53:21 +02:00
Marko Viitanen 47d85f8cd5 Modified Makefile to allow building on windows and defaulting to elf-binary
- Addresses issues #3 and #6
- Included make clean option
2014-02-03 14:27:19 +02:00
Marko Viitanen ffd00695c7 Better cleanup of allocated memory at exit
Using valgrind all the leaks were tracked and fixed.
2014-02-03 11:52:43 +02:00
Jan Ekström 007986974a config: Make config_alloc() no longer crash if allocation fails 2014-01-31 17:30:27 +02:00
Jan Ekström 7db28fad84 encmain: Make the main function more resilient to allocation failures
Application will no longer crash if config or encoder_control
allocation fails.
2014-01-31 17:26:09 +02:00
Jan Ekström 271c08f963 config: Add a string copying helper function
Removes the need to add the same code into multiple places
2014-01-31 17:24:04 +02:00
Jan Ekström d8d44e5bcd encoder: Remove a non-UTF-8 symbol from the code
Silences a Visual Studio warning on systems where the symbol is not
in the local code page
2014-01-31 17:17:44 +02:00
Marko Viitanen ac8141b328 Fixed a bug in intra search and some memory leaks, changed version to 0.2.1
Intra search was using faulty border data and selected modes were a bit random. Around -0.5% (LP) and -2% (AI) change in BD-rate was seen in limited testing conditions.
2014-01-31 16:54:43 +02:00
Jan Ekström f1ff6a8274 encmain: Add rudimentary support for input via stdin 2014-01-31 14:32:41 +02:00
Marko Viitanen 80da15df4d Adjusted cost calculation of CU split
Quick testing shows BD-rate change of -14% (LP) and -4% (AI) with 600 frames of BQMall using QP 22,27,32,37.
2014-01-31 12:31:51 +02:00
Marko Viitanen 5d5fbb8704 Added commandline configuration of intra period (-p <intra_period>) 2014-01-31 10:23:56 +02:00
Marko Viitanen 76f24408b6 Included x264asm abstraction layer -library and fixed Makefile
Name mangling is causing problems on different platforms (issues #2 and #3) and some of it was solved modifying the Makefile. Separate 32bit and 64bit assembly functions were also causing problems and since we were going to move to x264asm abstraction layer anyway, we decided to do it now before spending time on the old implementation.
2014-01-30 17:59:50 +02:00
Ari Koivula b93629f26e Re-enable P frames.
It was inadvertently disabled due to an aborted merge.
2014-01-29 17:56:38 +02:00
Gareth Andrew Lloyd 3805483595 Linker's objects/libraries order changed
gcc linker needs to parse objects before linking the necessary libraries
2014-01-29 15:34:31 +00:00
Ari Koivula 5d12706510 Merge branch 'intra_NxN'
Conflicts:
	src/encoder.c

- Chroma RDOQ changes conflicted because I had moved the chroma
  quantization/dequantization to it's own function.
- Merged to master because I want my code to show up in github. =)
  All the old stuff still works, even though NxN doesn't work, so there
  is no reason not to merge anyway.
2014-01-29 17:04:41 +02:00
Ari Koivula e33655fde5 Remove debug stuff and disable intra NxN in preparation for a merge.
- Re-enable intra search based on reconstructed image.
  - This didn't have as much of an effect as I thought it would.
- Re-enable SAO and deblocking.
- Disable NxN searching. (4x4 luma coding is still broken)
2014-01-29 16:45:37 +02:00
Ari Koivula bf80007270 Try to fix 4x4 luma coding.
Still doesn't work. I have no idea what the problem is. Probably somehow related to the coefficient coding, since the bitstream seems to work, the prediction is correct and the error is not very severe.

- Change scan order selection to be more verbose and based on the correct mode for 4x4. Didn't affect the problem with 4x4 luma in any way although it should have.
- Re-enable residual coding as everything seems to work now besides 4x4 luma.
2014-01-29 15:09:41 +02:00
Ari Koivula de3c58862a Fix intra NxN chroma coefficients.
- The NxN coefficients were being saved to the bottom right PU offset instead of
  the parent CU offset.
- Re-enable coefficient coding for chroma NxN.
2014-01-29 14:22:31 +02:00
Ari Koivula f1b2e9f603 Fix buggy chroma when NxN is present.
- NxN intra prediction seems to work fully now.
- Coefficients still don't work for NxN.
2014-01-29 14:22:31 +02:00
Ari Koivula 9f855c16db Fix building of reference border in the bottom of the frame.
- Don't write to the top-left corner during construction of left border,
  because that is handled later that is handled later.
2014-01-29 14:22:31 +02:00
Ari Koivula ca454b67df Fix intra filtering for 4x4 luma blocks. 2014-01-29 14:22:31 +02:00
Ari Koivula acbe656c6d Fix intra prediction mode list generation. 2014-01-29 14:22:30 +02:00
Ari Koivula 81b51f17d8 Reimplement intra_build_reference_border to support NxN.
New implementation uses precalculated tables to look up number of reference
pixels available in coded CUs. Otherwise it works just like the previous
version.

- NxN mostly works. Prediction appears to be almost correct but there is a
  slight error in the exact values, probably related to filtering.
2014-01-29 14:22:30 +02:00
Ari Koivula 71a996f50f Work on reconstruction and searching.
- Set part-size for Inter.
- Change to Intra Only mode for testing.
- Many small changes here and there. Should have been separate commits probably, but too late.
- Disable SAO and deblocking to be able to see problems with reconstruction better.
2014-01-29 14:18:01 +02:00
Ari Koivula 5e2f22f447 Try to fix intra prediction mode coding for NxN.
- Adjust predictor list to take modes from PUs in addition to 2Nx2N CUs.
- Change intra_get_dir_luma_predictor to take PU index instead of CU index.
- Comment prediction encoding now that I've had to look it up.
2014-01-29 13:52:17 +02:00
Marko Viitanen 3a95d49484 Removed __cdecl from asm header files and corrected parameters printed by the program 2014-01-28 16:40:38 +02:00
Marko Viitanen 23427a72cf Merge branch 'rdoq' 2014-01-28 12:29:21 +02:00
Marko Viitanen 7a21b9b769 Changed lambda calculation to fix RDOQ issues, RDOQ is now in use by default. 2014-01-28 12:14:43 +02:00
Marko Viitanen 5e759b8e1d Fix for RDOQ, added missing cost function 2014-01-28 11:01:46 +02:00
Marko Viitanen 13927f777f Fix for Makefile to allow 32bit compiling of assembly test 2014-01-27 15:34:02 +02:00
Marko Viitanen cbd4d16f25 Added commandline configuration of QP 2014-01-27 15:02:07 +02:00
Marko Viitanen 0cdd9d032f Added GPLv2 headers to rdo.c/.h 2014-01-27 14:39:56 +02:00
Marko Viitanen 83a1e9a555 Added rdo to Makefile 2014-01-27 14:36:10 +02:00
Marko Viitanen 80b3b4a6e0 Added missing lambda parameter to some RDOQ costs and moved go_rice arrays from header file 2014-01-27 14:34:58 +02:00
Marko Viitanen 144d5293b1 Implemented RDOQ function get_rate_last() 2014-01-27 14:34:58 +02:00
Marko Viitanen f447b92755 Added error scaling list calculation from HM 12.0 2014-01-27 14:34:58 +02:00
Marko Viitanen 9f70bf74f0 Imported and converted RDOQ from HM 12.0, NOT WORKING YET 2014-01-27 14:34:58 +02:00
Marko Viitanen de6faf623d Imported entropy bits array from HM and added macro to access it 2014-01-27 14:34:57 +02:00
Marko Viitanen f5c2292e06 Added simple Makefile and header files needed to compile on linux 2014-01-27 14:34:09 +02:00
Ari Koivula 77339efa57 Add COPYING file and add boilerplate for copyright and GPLv2 to every file. 2014-01-24 12:48:48 +02:00
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 f1d8aae5b4 Clean up SAO encoding.
- Fixes a bug when pic->slice_sao_chroma == false.
2013-12-19 13:54:32 +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 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
Marko Viitanen 2f53b0aa3a Enabled sign-bit-hiding by default 2013-10-29 13:14:43 +02:00
Marko Viitanen caa010a972 Changed scalinglist_process() to be done on frame level 2013-10-28 11:47:54 +02:00
Marko Viitanen 601d64f04f Merge branch 'merge-mode' 2013-10-25 15:40:58 +03:00
Marko Viitanen ded4c18bf6 Fixed merge candidate duplicate removal and implemented skip mode selection 2013-10-25 15:39:19 +03:00
Ari Koivula e9819cbb5e Fix coding of sao chroma type idx. 2013-10-25 10:51:11 +03:00
Ari Koivula 0fd9105f0a Fix sao type context init values.
The initialization slice types are in reverse order compared to the codes used
for slice types. They are BPI instead of IPB.
2013-10-25 10:51:11 +03:00
Ari Koivula 3244c98b29 Fix sao cabac contexts.
According to HM implementation, sao luma and chroma use the same contexts.
2013-10-25 10:51:10 +03:00
Ari Koivula 291be9507b Start adding Sample Adaptive Offset capability. 2013-10-25 10:39:42 +03:00
Marko Viitanen e1f0274b51 Merge mode working on blocks > 8x8 2013-10-23 15:14:26 +03:00
Ari Koivula 2d26175293 Fix bug that causes lambda_cost to be ignored in search_best_mode. 2013-10-22 19:02:00 +03:00
Ari Koivula 8f5567ba6f Add full motion vector search back. 2013-10-22 19:00:36 +03:00
Marko Viitanen 8883fb27aa Implemented skip/merge mode checking, disabled for now because it's not working 2013-10-22 17:40:55 +03:00
Marko Viitanen bb9d8ee9dd Fixed motion vector difference calculation 2013-10-22 16:53:18 +03:00
Marko Viitanen b20b583d9b Moved all residual/coeff functionality to encode_block_residual() 2013-10-22 16:27:50 +03:00
Ari Koivula ecf10a9717 Add an estimate of the cost of the motion vector to motion search. 2013-10-22 14:09:20 +03:00