Commit graph

2031 commits

Author SHA1 Message Date
Ari Koivula ad1c42905d Update documentation 2016-03-01 15:34:43 +02:00
Ari Koivula 197d66fc10 Add docs target to Makefile 2016-03-01 15:34:43 +02:00
Ari Koivula c3f663ec0c Move genmanpage.sh to tools 2016-03-01 15:34:43 +02:00
Ari Koivula b268381a48 Make update_readme.sh and genmanpage.sh use local build
It's easier to use these to keep the documentation updated, if
one doesn't have to make install before running them.
2016-03-01 15:34:43 +02:00
Arttu Ylä-Outinen 626b53ce85 Move sao search from encoderstate to sao.
Moves sao search from function encoder_state_worker_encode_lcu in
encoderstate.c to function kvz_sao_search_lcu in sao.c. Makes functions
kvz_init_sao_info, kvz_sao_search_chroma and kvz_sao_search_luma static
since they are no longer used outside sao.c.
2016-03-01 14:56:16 +02:00
Ari Koivula c02b0f4186 Merge branch 'mv-constraint' 2016-02-29 23:33:15 +02:00
Ari Koivula cfa722e448 Reduce parallelism for tiles
There is still some race-condition with encoding tiles from multiple
frames, so disable this to keep the bitstream deterministic.
2016-02-29 20:20:21 +02:00
Ari Koivula 3dcc0957f8 Deal with impossible mv constraints
If 0,0 vector is illegal, it's possible that no legal movement vector,
is found, in which case a large cost is returned instead. The cost
overflowed and there is all sorts of silliness with converting from
double to int, but I'm not going to fix all of it because when we
remove the doubles it will all get fixed.
2016-02-29 19:18:14 +02:00
Ari Koivula b1adf1576a Add --mv-constraint=frametilemargin
Add an even stricter motion vector constraint to prevent motion vectors
to fractional pixel positions that would need pixels outside the tile.
2016-02-29 19:18:14 +02:00
Ari Koivula f808cbf608 Allow increased parallelism for tiles
When movement vectors are constrained to tiles, only the same tile in
previous frame needs to be depended upon.
2016-02-29 14:33:06 +02:00
Ari Koivula f4ebff12b0 Combine tile mv constraint with OWF mv constraint
This also fixes movement vectors in tiles when OWF is on. The OWF mv
constraint assumed WPP, so it didn't work with tiles.
2016-02-29 14:33:06 +02:00
Ari Koivula 7981609cd0 Add --mv-constraint=frametile 2016-02-29 14:33:06 +02:00
Ari Koivula 9dbbb7fdbc Add --mv-constraint argument 2016-02-29 14:33:06 +02:00
Ari Koivula 1be877faf9 Fix chroma reconstruction with tiles
An incorrect frame boundary check caused a checksum error, because the
chroma reconstruction of the encoder was wrong. The encoder treated
horizontal tile boundaries as frame boundaries when the vertical
component of the movement vector was a multiple of 8.
2016-02-29 14:32:51 +02:00
Ari Koivula c0dc490dd1 Fix inter non-determinism with tiles
CU data was being copied to the wrong place in the reference frames
cu_array, which led to uninitialized data being used as a starting
point for motion vector search.

Fixes #99.
2016-02-26 17:05:04 +02:00
Ari Koivula 719d72925b Add loop-input option
This option is useful for testing long encodes, as you don't have to
find an actual infinite input.
2016-02-18 20:00:55 +02:00
Ari Koivula d23a5a15f1 Fix overflow in rate control
A 32 bit int overflowed after 2^31 bits (2Gb). It will still overflow
eventually, after 500 years of outputting 1Gb/s, but by that time,
I recon we will have fixed this properly and it's time to upgrade.
2016-02-18 16:48:21 +02:00
Ari Koivula 5bcdd22fef Add osx build test to Travis 2016-02-17 17:47:36 +02:00
Ari Koivula 985c47fe20 Only install required packages for Travis tests
Shortens test times slightly and makes it easier to add more compilers
to test with.
2016-02-17 17:44:23 +02:00
Ari Koivula eeafe14946 Clean up search initialization
Copy lcu explicitly instead of initializing with the same parameters.
2016-02-17 14:57:31 +02:00
Arttu Ylä-Outinen e5c84c361c Eliminate a race condition with input thread.
Changes communication between the input thread and main thread in
encmain.c so that only one of them uses img_in and retval at a time.
Fixes a race condition which would sometimes result in a deadlock.
2016-02-17 12:09:19 +02:00
Ari Koivula dac57fa154 Fix syntax error in configure
Might help with #125.
2016-02-16 11:09:47 +02:00
Ari Koivula c40ede56ad Allow more frame parallelism in LP-gop
Add dependency to the reference frame instead of the previous frame,
in order to allow more frames to be encoded in parallel when temporal
stepping >1 in LP-gop (such as --gop=lp-g8d4r1t2).
2016-02-05 17:08:24 +02:00
Arttu Ylä-Outinen 40c7198f7d Add a script for updating README
Adds script tools/update_readme.sh for regenerating the "Using Kvazaar"
section of README.md from the output of "kvazaar --help".
2016-02-05 16:21:39 +02:00
Arttu Ylä-Outinen aac5373095 Fix typos in documentation
Fixes a few typos in README and command line help.
2016-02-05 16:21:27 +02:00
Ari Koivula a4915dc547 Update man and README 2016-02-04 14:16:58 +02:00
Ari Koivula e941e21cd6 Enable errors about non-existing CLI options
Set opterr and optind to their normal default values.
2016-02-04 13:48:58 +02:00
Ari Koivula 7a4bf94a52 Add --version and --help
Also don't print help by default, because it's too long. Print a
shorter usage message instead.
2016-02-04 13:48:48 +02:00
Ari Koivula 091bcada53 Merge pull request #124 from darealshinji/manpage
Add manpage
2016-02-04 11:10:08 +02:00
darealshinji aebaf961d3 Add manpage 2016-02-04 06:41:18 +01:00
Ari Lemmetti 99e37ec235 Update old pixel type to the current one 2016-01-30 19:33:09 +02:00
Ari Koivula c76a0951cf Change version to 0.8.3 2016-01-28 21:21:02 +02:00
Ari Koivula d6c1d0e0ae Merge branch 'interlace' 2016-01-28 21:19:02 +02:00
Ari Koivula cb2121b1aa Double time scale when field coding is used 2016-01-28 21:04:52 +02:00
Ari Koivula 8ad7d2a714 Move interlacing stuff to libkvazaaar API
This moves the interlacing from CLI code to api->encoder_encode, in
order to make it possible to use field coding through the lib API.

The field order is now determined per frame, as FFmpeg gives it per
frame and it's signaled per frame.

As a side effect, the CLI also now prints info from frames instead of
fields. While we might want to extend the API in the future to allow
printing of more detailed information about fields, for now it's
more important that the CLI uses the real lib API.

PSNR calculation for interlaced frames disabled until we have a way to
avoid deinterlacing the frame when it's not necessary.
2016-01-27 15:29:45 +02:00
Ari Koivula 6952f0fcc6 Refactor interlaced reading
Doesn't change the way it works. Just rearranges things so it's easier
to see what is going on.
2016-01-26 13:42:41 +02:00
Ari Koivula a46351efe1 Fix out of bounds error in interlacing
When field height was padded to a multiple of 8, yuv_io_extract_field
would read outside the buffer.
2016-01-26 13:41:52 +02:00
Ari Koivula 887b1906d8 Add a test for interlaced coding 2016-01-26 13:41:44 +02:00
Arttu Ylä-Outinen 49677810b5 Rename config module to cfg.
Prevents a conflict with config.h and src/config.h so that the config.h
generated by configure is included in global.h. Fixes problems with
large input files on 32-bit systems.
2016-01-25 12:26:46 +02:00
Arttu Ylä-Outinen 9feb2f6dbd Add missing file to Visual Studio tests project.
Adds file tests/mv_cand_tests.c to kvazaar_tests VS project files.
2016-01-25 12:16:34 +02:00
Marko Viitanen 8e6c12b859 Merge branch 'input_reading_thread' 2016-01-25 12:00:03 +02:00
Marko Viitanen b4a4ce848c Use field parity for extracting correct fields from the interlaced picture 2016-01-25 10:58:12 +02:00
Marko Viitanen 441ce7728f Fix for input_read_thread() in the case when interlaced source-scan-type is used 2016-01-25 10:57:51 +02:00
Marko Viitanen 198204a20a Fix when using --source-scan-type=bff, offset was used for output lines 2016-01-25 10:13:51 +02:00
Ari Koivula 22b8ed43dc Remove global.h include from kvazaar.h
It shouldn't have been put there as it's the lib interface.
2016-01-22 15:23:34 +02:00
Ari Koivula 249c88011e Fix problem with >2GB input files on 32bit 2016-01-22 15:15:02 +02:00
Ari Koivula fa1af14637 Fix includes to include global.h first everywhere 2016-01-22 15:07:49 +02:00
Ari Koivula 3bf278529c Fix interlacing when using lib interface
Some flags used for interlacing were set in CLI interface, which
meant that interlacing didn't work correctly when used through
libkvazaar.
2016-01-22 14:35:20 +02:00
Marko Viitanen 0128ee26e7 Clear img_in pointer after reading it 2016-01-22 14:29:35 +02:00
Marko Viitanen b5459c1f23 Fixed performance monitoring by adding KVZ_ prefix to GET_TIME 2016-01-22 11:27:25 +02:00