Ari Lemmetti
581ff95412
Write flags and SEI messages for interlacing.
2015-08-21 14:46:05 +03:00
Arttu Ylä-Outinen
dd874a0a4a
Move writing of reconstructed picture to encmain.
...
- Removes parameter recout of function encoder_compute_stats.
- Now only encmain uses the yuv_io module.
2015-08-20 16:42:28 +03:00
Arttu Ylä-Outinen
907451590e
Fix encoding when both GOP and OWF are enabled.
...
Changes kvazaar_encode to not increase cur_state_num unless a frame is
started.
2015-07-07 10:05:42 +03:00
Arttu Ylä-Outinen
cc580ac861
Only print PSNR if some frames were encoded.
2015-07-06 13:39:47 +03:00
Arttu Ylä-Outinen
66656fdebc
Move handling of command line args to cli module.
...
- Adds struct cmdline_opts_t.
- Adds functions cmdline_opts_parse and cmdline_opts_free to cli module.
- Removes fields input, output, debug, frames and seek from struct
kvz_config.
- Removes function config_read from config module.
2015-07-06 08:25:54 +03:00
Arttu Ylä-Outinen
af2b417809
Set up Makefile for building libkvazaar.so.
...
Adds targets "libkvazaar.so.0.0.0", "install", "install-prog" and
"install-lib" to the Makefile.
2015-07-02 16:58:30 +03:00
Arttu Ylä-Outinen
4ab9aa3e2f
Move kvz_encoder definition to kvazaar_internal.h.
2015-07-02 16:58:30 +03:00
Arttu Ylä-Outinen
b715ae9767
Return length of the data from encoder_encode.
...
Adds parameter len_out returning the length of the encoded data in bytes
to function encoder_encode.
2015-07-02 16:58:29 +03:00
Arttu Ylä-Outinen
538deaa9d6
Add functions picture_{alloc,free} to kvazaar API.
2015-07-02 16:58:29 +03:00
Arttu Ylä-Outinen
6451df9a4f
Move bitstream chunk definition to kvazaar.h.
...
- Renames struct bitstream_chunk_t to kvz_data_chunk.
- Renames macro BITSTREAM_MEMORY_CHUNK_SIZE to KVZ_DATA_CHUNK_SIZE.
- Removes kvz_payload typedef.
- Adds function chunk_free(kvz_data_chunk *chunk) to kvazaar API.
2015-07-02 16:58:28 +03:00
Arttu Ylä-Outinen
cecea44d37
Rename config_t to kvz_config.
2015-07-02 16:58:28 +03:00
Arttu Ylä-Outinen
17d720363a
Rename struct image_t to kvz_picture.
2015-07-02 16:55:48 +03:00
Arttu Ylä-Outinen
398f0c823b
Replace memory bitstreams with linked lists.
...
- Removes all bitstream types.
- Changes encoder_encode to return the encoded data as list of chunks.
- Moves writing of the encoded data to the main function.
2015-07-02 16:35:46 +03:00
Arttu Ylä-Outinen
7e20e62cc7
Make kvazaar_encode consume one frame on each call.
...
- Replaces read_one_frame by encoder_feed_frame.
- Adds field "prepared" to encoderstate_t to indicate that
encoder_next_frame has been called.
- Input frames are read in the main function and passed to
encoder_encode.
2015-07-02 16:28:40 +03:00
Arttu Ylä-Outinen
7bd23f5dbb
Rename yuv_input module to yuv_io.
2015-07-02 16:28:39 +03:00
Arttu Ylä-Outinen
1f41717351
Rename stats_done to frame_done in encoderstate.
...
The new field frame_done is set to zero when starting to encode a new
frame and reset to one when the encoded data has been written.
2015-07-02 16:24:26 +03:00
Arttu Ylä-Outinen
fe3b629905
Move poc from image_t to image_list_t.
2015-07-02 16:24:25 +03:00
Arttu Ylä-Outinen
5d524c0290
Move seeking to yuv_input module.
2015-07-02 16:24:24 +03:00
Arttu Ylä-Outinen
f41ce04488
Refactor main function.
...
- Make sure that everything which is allocated gets deallocated.
- Move finalization of encoder states to kvazaar.c.
- Remove empty strategyselector_free function.
- Remove unused variable curpos.
- Fix includes.
2015-07-02 16:24:24 +03:00
Arttu Ylä-Outinen
9c20f96397
Move opening files in main to separate functions.
2015-07-02 16:24:24 +03:00
Arttu Ylä-Outinen
40b136cf48
Fix seeking when reading from stdin.
...
Seeking used read_one_frame to skip frames. Changed to simply use fread
instead.
2015-07-02 16:24:24 +03:00
Arttu Ylä-Outinen
4a7b86a43b
Make g_exp_table statically allocated.
...
Removes the need to free the table.
2015-07-02 16:14:52 +03:00
Arttu Ylä-Outinen
b130ecc9bb
Fix "reference not found" when GOP is enabled.
...
The encoder state must be cleared by calling encoder_next_frame before
calling read_one_frame.
2015-07-02 16:14:51 +03:00
Ari Koivula
7e98a483d7
Use the API for checking whether the encoding is finished.
2015-07-02 16:14:51 +03:00
Ari Koivula
fc58748ae8
Output bitstream through API.
...
- Use the existing bitstream_t type to give access to the bitstream.
We can extend it later to make it a linked list like I was planning
to do with the payload type.
- The main encoder now also stores the bitstream in memory.
2015-07-02 16:10:51 +03:00
Ari Koivula
4e5326d3d5
Move encoding to API.
...
- Api->encoder_encode can now be called repeatedly to start encoder
jobs and to retrieve the results.
Conflicts:
src/encmain.c
2015-07-02 15:52:23 +03:00
Ari Koivula
9a3edce3fc
Separate input and output from encoding.
...
- Move image_t and pixel_t to the kvazaar.h API.
- Try and arrange things such that image_t can be used as input and
output for encoding.
Conflicts:
src/encmain.c
2015-07-02 15:52:23 +03:00
Ari Koivula
f87cea78da
Wait for bitstream immediately after encoding the frame.
...
- This should reduce the encoding delay by one frame when encoding in
real time.
2015-07-02 15:52:23 +03:00
Ari Koivula
ad11d1bca5
Add kvazaar.h to hold high-level encoder API.
...
- Move encoder initialization from main to kvazaar.c.
- Have main use the API for initialization.
Conflicts:
src/encmain.c
2015-07-02 15:52:23 +03:00
Ari Koivula
0170e9280f
Move some initialization to encoder_control_init.
...
- Removed some members from encoder_control_t that weren't really used
very much anymore.
2015-07-02 15:45:35 +03:00
Ari Koivula
504f3d9c9b
Move some config initialization to config_read.
2015-07-02 15:45:34 +03:00
Ari Koivula
c99fe63860
Move seek functionality outside the main input loop.
2015-07-02 15:45:34 +03:00
Ari Koivula
4f4b62b13c
Fix owf.
2015-07-02 15:45:34 +03:00
Ari Koivula
5c28745457
Move OWF logic and CLI stuff out of encoder_compute_stats.
...
- CLI stuff is moved to either cli-module or to main function.
- OWF stuff is made more explicit by counting the frames instead of
communicating through encoder_state_t.stats_done.
2015-07-02 15:45:33 +03:00
Ari Koivula
ea50d03e52
Add cli module and move interface stuff to there.
2015-07-02 15:45:33 +03:00
Arttu Ylä-Outinen
d27cde55a4
Add --input-fps and --bitrate parameters.
2015-05-15 13:57:51 +03:00
Marko Viitanen
fd060cf2c6
Merge branch 'bipred'
...
Conflicts:
README.md
src/config.c
src/config.h
src/encmain.c
2015-04-23 14:45:44 +03:00
Marko Viitanen
7f504b7808
Added a commandline parameter --bipred to enable bi-pred search
2015-04-21 14:35:16 +03:00
Ari Koivula
13924a2057
Add --no-info parameter.
...
- Stops encoder information from being added to bitstream.
- The version information overhead is too big when doing comparisons with
very short sequences.
2015-04-16 17:30:36 +03:00
Marko Viitanen
f28ebbcd41
Moved GOP defining to config.c and added parameter --gop
...
* Checking that intra period and gop_len match
2015-03-30 10:09:54 +03:00
Marko Viitanen
7952f892fc
Fixed GOP reference usage
2015-03-23 14:17:44 +02:00
Marko Viitanen
164b7a7743
Merge remote-tracking branch 'remotes/origin/master' into GOP
2015-03-20 11:40:15 +02:00
Marko Viitanen
f166d25dd0
Added positive and negative reference frames to the gop config
2015-03-20 10:22:53 +02:00
Arttu Ylä-Outinen
176dbb6a5b
Add --me parameter.
...
Selects the integer motion estimation algorithm (hexbs or tz).
2015-03-19 18:48:10 +02:00
Marko Viitanen
66660516b7
Merge remote-tracking branch 'remotes/github/master' into GOP
...
Conflicts:
src/cabac.h
src/config.h
src/cu.h
src/encoder_state-bitstream.c
src/encoderstate.c
2015-03-10 10:32:00 +02:00
Ari Koivula
5b12830756
Rename struct config to config_t.
2015-03-04 14:01:16 +02:00
Ari Koivula
f6147b410a
Rename struct encoder_control to encoder_control_t.
...
Conflicts:
src/encoder_state-geometry.h
src/encoderstate.h
2015-03-04 14:01:14 +02:00
Ari Koivula
b14f89c88f
Rename struct encoder_state to encoder_state_t.
2015-03-04 14:00:46 +02:00
Marko Viitanen
c3d9e0b707
Added testset of data for GOP
2015-03-03 12:22:09 +02:00
Ari Koivula
d7383ccb25
Change license to LGPL.
...
- Everyone who has contributed code to the project has been asked to license
their contributions under LPGL and they have agreed.
- COPYING file changed to say LGPLv2.1 instead of GPLv2.
- GPL changed to LGPL in the header of every single file that a header and
header added to the few that were missing one.
- Also.. Happy new year!
2015-02-25 15:19:05 +02:00
Arttu Ylä-Outinen
b6776a8cee
Add --vps-period parameter.
2015-02-18 13:55:27 +02:00
Ari Koivula
f01cbbb5ca
Add --no-signhide parameter.
2015-01-24 21:29:37 +02:00
Ari Koivula
1ccb3bd324
Move sign hiding stuff in rdoq to its own function.
...
- There is some stuff from sign hiding left intermingled with rdoq code,
but I don't want to change the code too before testing that I didn't
break anything.
2015-01-24 21:27:20 +02:00
Ari Koivula
c940ccb549
Fix gcc error.
...
encmain.c:433:13: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’
2015-01-23 15:50:14 +02:00
Ari Koivula
5d16fa6c4f
Add VPS every intra frame.
...
- Just rdo=0 for now. Later this can be extended to be configured separately.
2015-01-22 13:13:23 +02:00
Ari Koivula
d685ee86d6
Record total bitstream length correctly when using stdout.
...
- If the output is not a file, we can't check the size of the file.
2015-01-22 12:29:06 +02:00
Ari Koivula
bbae2e8a27
Update usage and readme.
2015-01-12 10:59:28 +02:00
Ari Koivula
51b5692121
Rewrite owf=auto code to be more general.
...
- Change the definition to be a bit more general. The mapping from resolution
to owf frames stays mostly the same however, but should handle weird
resolutions better.
- Move everything to config module.
- Fix handling of tiles. It had a bug where owf for tiles was always
threads * 4/3 - 1. Works as intended now.
2014-12-09 19:00:11 +02:00
Ari Lemmetti
24492adb02
Merge branch 'fme_merge'
2014-11-21 15:08:45 +02:00
Ari Lemmetti
4874f2662f
Added --subme commandline parameter for fractional pixel motion estimation: 1 == enable (default), 0 == disable.
2014-11-20 14:59:04 +02:00
Ari Koivula
3ef88dfda5
Add --owf=auto option.
...
- The optimal value for Overlapping Wave Front (OWF) depends on a bunch of
variables. Attempt to set the optimal owf value, at least for all intra.
2014-11-18 02:19:40 +02:00
Ari Lemmetti
5a946f24ea
Fixed time output formatting.
2014-11-14 16:46:41 +02:00
Daniel Eneyev
992a98c5c4
If output name is dash - write to stdout
2014-11-13 12:45:53 +03:00
Ari Koivula
75a137c1e9
Add --cpuid parameter to disable runtime optimizations.
2014-10-16 12:01:36 +03:00
Ari Koivula
8b8b53fba5
Merge branch 'sao_cabac'
2014-09-22 10:28:30 +03:00
darealshinji
61a414bced
reposition colons in usage message to match with the rest
2014-09-15 03:40:18 +02:00
Ari Koivula
79b86ce6e1
Add --tr-depth-intra command line option.
...
Conflicts:
src/encoder.c
2014-09-04 13:42:24 +03:00
Laurent Fasnacht
45faadb2c9
Fix bug where the wrong number of frames could be encoded (if one frame takes longer than the others)
2014-06-19 10:24:02 +02:00
Ari Koivula
94bc457b6c
Add option to disable fast intra search.
2014-06-17 15:32:05 +03:00
Laurent Fasnacht
ef9c2258e9
Fix frame counter and stats
2014-06-16 13:21:52 +02:00
Laurent Fasnacht
4b4702819b
Also print encoding FPS
2014-06-16 11:10:11 +02:00
Laurent Fasnacht
f99e41d41f
Improved CPU time statistics
2014-06-16 11:03:46 +02:00
Laurent Fasnacht
bf6024734a
Fix statistics with OWF
2014-06-16 10:55:00 +02:00
Laurent Fasnacht
0522a3d8e5
--owf option
2014-06-16 10:55:00 +02:00
Laurent Fasnacht
c32943f78b
OWF
2014-06-16 10:54:56 +02:00
Ari Koivula
443f2f00aa
Fix compilation for VS.
...
- VS2013 does not support variable length arrays.
2014-06-11 17:51:55 +03:00
Laurent Fasnacht
e1d9cb015a
Basic checkpointing system
2014-06-11 10:29:03 +02:00
Laurent Fasnacht
27a49d287d
Big refactor to use videoframe, image_list, and image instead of picture*
2014-06-10 09:19:06 +02:00
Laurent Fasnacht
7372f9244d
Basic infrastructure for OWF
2014-06-05 09:09:25 +02:00
Ari Lemmetti
9e649a8f38
Updated usage message
2014-06-04 15:23:27 +03:00
Laurent Fasnacht
63adb54a3d
Add --threads <int> command line parameter
2014-05-14 13:27:09 +02:00
Laurent Fasnacht
0e6f1c99fc
Refactor picture to remove hidden dependency between slice and tiles
...
picture.type -> encoder_state->global->pictype
picture.slicetype -> encoder_state->global->slicetype
picture.slice_sao_luma_flag -> 1 (was constant)
picture.slice_sao_chroma_flag -> 1 (was constant)
This may be changed later. For now it's better to avoid having slice related stuff in picture.
2014-05-07 11:55:48 +02:00
Laurent Fasnacht
6c6adf18c7
Refactor encoder_state
2014-05-07 11:47:31 +02:00
Laurent Fasnacht
c2872bd6b0
Slices and WPP in command line and encoder
2014-05-07 11:42:04 +02:00
Laurent Fasnacht
161fe38f5e
Remove USE_TILES define
2014-05-01 13:58:13 +02:00
Laurent Fasnacht
bf7e755cf7
Strategies and runtime detection/choice of best algorithm
2014-04-29 11:51:41 +02:00
Ari Koivula
cecf4b0b4e
Move __USE_MINGW_ANSI_STDIO to Makefile.
...
- I'm not too clear on how this should be used, but having it in the source
file after mingw stuff was included caused a warning about redefinition of
__USE_MINGW_ANSI_STDIO.
2014-04-28 19:37:37 +03:00
Yusuke Nakamura
c5a4e7b52c
encmain: Remove a warning on MinGW.
2014-04-26 23:56:50 +09:00
Ari Koivula
145816cfb5
Move printing of CLI stuff to stderr.
...
- Printing to stdout corrupts the stream when used with "-o -".
2014-04-26 12:56:39 +03:00
Laurent Fasnacht
73c574fb45
P-frame: first try...
2014-04-24 08:38:22 +02:00
Laurent Fasnacht
7bd6aa2e9c
encoder_control_input_init call moved to encoder_control_init
2014-04-24 08:38:13 +02:00
Laurent Fasnacht
9353f14792
Parameters for using tiles in command line arguments.
...
--tiles-width-split
--tiles-height-split
2014-04-24 08:38:11 +02:00
Laurent Fasnacht
5fea5875a5
Huge refactoring
...
Split some parts of encoder_control into encoder_state
(idea: encoder_control is immutable)
Goal is to allow multiple substreams in the future.
2014-04-22 10:39:12 +02:00
Laurent Fasnacht
83360918ba
Removed table generation from main code, moved it to tools.
2014-04-17 11:13:15 +02:00
Laurent Fasnacht
7a2b883059
Remove encoder_input width, height, height_in_lcu, and width_in_lcu
2014-04-17 11:13:12 +02:00
Laurent Fasnacht
d01e3ae67f
bitstream is a union, and is statically in encoder_control structure
2014-04-17 11:13:12 +02:00
Ari Koivula
51ba80513b
Centralize resource deallocation for encmain.
...
- CppCheck was complaining about unreleased resources for FILE*. They weren't
really because they get flushed and closed when program exits normally, but
let's close them anyway.
2014-04-17 11:58:03 +03:00
Laurent Fasnacht
9901c38dd5
scalinglist in independent file
2014-04-16 10:25:16 +02:00
Laurent Fasnacht
e135a88fb5
Remove encoder_control.cqmfile
2014-04-15 14:21:25 +02:00
Laurent Fasnacht
486768fc79
scalinglist privatization
2014-04-14 13:39:28 +02:00