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
581f740c59
Fix compilation when checkpoints are enabled.
...
- Include string.h in checkpoint.h
- Check return values of fgets calls in checkpoint.h.
- Replace variable length array in image.c by a dynamically allocated
array.
- Add -DCHECKPOINTS to CFLAGS in Makefile when CHECKPOINTS is defined.
2015-07-03 13:54:44 +03:00
Arttu Ylä-Outinen
6eb89a2813
Adjust Makefile for building kvazaar.dll.
...
Adds targets "kvazaar.dll" and "install-dll" to the Makefile.
2015-07-02 16:58:30 +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
f7f17a060c
Rename pixel_t to kvz_pixel.
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
fab07d80da
Rename macro BIT_DEPTH to KVZ_BIT_DEPTH.
2015-07-02 16:55:47 +03:00
Arttu Ylä-Outinen
7b6178f6e0
Rename macro MAX_GOP to KVZ_MAX_GOP_LENGTH.
2015-07-02 16:55:47 +03:00
Arttu Ylä-Outinen
3f32d500e2
Move config_t structure to kvazaar.h.
2015-07-02 16:55:46 +03:00
Arttu Ylä-Outinen
cecdf4f34e
Move config validation to encoder_control_init.
...
Ensures that config is valid even when not initialized by config_read.
2015-07-02 16:47:28 +03:00
Arttu Ylä-Outinen
04a1fc07cf
Move all config validation to config_validate.
2015-07-02 16:43:19 +03:00
Arttu Ylä-Outinen
25706af770
Add a function for moving bitstream data.
...
Replaces calls to bitstream_append with bitstream_move where possible.
2015-07-02 16:35:47 +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
012c0580df
Move writing reconstructed image to yuv_io module.
...
Adds function yuv_io_write.
2015-07-02 16:28:39 +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
50a5d5faa5
Let subimages have multiple references.
...
Adds function image_copy_ref to image module for getting a new reference
to an image. It can be used instead of image_make_subimage when the
sizes of the original and the subimage are same.
2015-07-02 16:24:26 +03:00
Arttu Ylä-Outinen
cec9b937dc
Make image list resize use realloc.
...
Much simpler than allocating, copying and freeing the arrays manually.
2015-07-02 16:24:25 +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
970d0ec182
Move input reading functions to yuv_input module.
...
Adds function read_yuv_frame and moves functions fill_after_frame and
read_and_fill_frame_data from encoderstate to yuv_input.
2015-07-02 16:24:23 +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
df50a0dae6
Move config_parse into api.
2015-07-02 15:52:24 +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
Marko Viitanen
ff4fb64169
Fixed a precedence bug in bipred search
2015-06-12 09:49:56 +03:00
Marko Viitanen
44ba9d9f7c
Bump version number to 0.5.0
2015-06-11 10:33:27 +03:00
Ari Koivula
30f8640380
Disable trskip SAD calcultation when trskip is not enabled.
2015-06-08 13:16:12 +03:00
Marko Viitanen
3253ba4812
Fixed non-deterministic behavior when using bipred and owf
2015-06-08 13:14:53 +03:00
Ari Koivula
cdb66baf16
Fix mutex being unlocked twice.
2015-06-01 16:28:50 +03:00
Ari Koivula
80ec1fda3a
Remove unnecessary dependency between I-frames.
...
- Inter OWF dependency was being added to non-IDR I-frames.
2015-06-01 16:26:30 +03:00
Arttu Ylä-Outinen
984e7cb4e0
Fix setting QP when rate control is disabled.
...
When rate control is disabled, QP and lambda are now selected like they
were before rate control was implemented.
2015-06-01 13:57:11 +03:00
Arttu Ylä-Outinen
b0435d37a9
Update rate control parameters.
...
On each frame, adjust the parameters alpha and beta in the equation
lambda = alpha * pow(R, beta)
2015-05-29 11:50:08 +03:00
Arttu Ylä-Outinen
b24d92bd6e
Move initialization of constants to encoder.c.
...
Some constants used in rate control are now initialized only once instead
of being computed on every frame. Adds pixels_per_pic, target_avg_bppic,
target_avg_bpp and gop_layer_weights to encoder_control_t.
2015-05-29 11:45:36 +03:00
Arttu Ylä-Outinen
b54d5aa91f
Select GOP picture weights according to bitrate.
...
Pictures in same layer have equal weights. At low bitrates, the difference
between low and high layers is greater than at high bitrates.
2015-05-29 11:43:42 +03:00
Arttu Ylä-Outinen
93d2a95ddc
Implement rate control in lambda domain.
...
- Rate control adjusts the lambda value.
- QP is selected according to lambda.
- Bits are allocated for GOPs and individual pictures.
2015-05-19 11:40:51 +03:00
Arttu Ylä-Outinen
664de9ade0
Keep track of bits written in current gop.
...
Adds cur_gop_bits_coded into encoder_state_config_global_t. The count is
updated whenever a frame is written.
2015-05-19 10:42:23 +03:00
Arttu Ylä-Outinen
4a5698a6ba
Implement basic rate control.
2015-05-19 10:42:17 +03:00
Arttu Ylä-Outinen
d27cde55a4
Add --input-fps and --bitrate parameters.
2015-05-15 13:57:51 +03:00
Arttu Ylä-Outinen
5b8cd76f01
Keep track of total number of bits coded.
...
Adds total_bits_coded into encoder_state_config_global_t. The count is
updated whenever a frame is written.
2015-05-15 13:57:50 +03:00
Arttu Ylä-Outinen
815a2bea55
Use bitstream_tell to get stream position.
2015-05-15 13:57:50 +03:00
Ari Koivula
56bb8e75ba
Fix non-deterministic behavior with tiles.
...
- Depend on the whole previous frame.
- We should really go through all these FIXME's sometime.
2015-05-12 12:00:32 +03:00
Ari Koivula
a48d91dacd
Fix WPP not working when SAO is off and OWF is on.
...
- Every wavefront row was being set to done when the first wavefront
row got done.
- Looks like I didn't understand how the data structure worked when I
"cleaned this up", and it didn't get caught in tests because it
needs OWF to be on to affect anything.
2015-05-11 12:01:17 +03:00
Ari Koivula
87936eb99f
Revert "Fix keeping of reference frames over IDR boundary."
...
This reverts commit b43f1cb9eb
.
- This change resulted in use of uninitialized memory with owf != 0.
Conflicts:
src/encoderstate.c
2015-05-05 17:07:49 +03:00
Ari Koivula
c3b42291e1
Merge branches 'coverity-fix-5', 'coverity-fix-6', 'coverity-fix-7', 'coverity-fix-8', 'coverity-fix-9', 'coverity-fix-10', 'coverity-fix-11', 'coverity-fix-12', 'coverity-fix-13' and 'coverity-fix-14' into coverity-fixes2
2015-05-05 12:27:02 +03:00
Ari Koivula
62285c405c
Fix coverity warning.
...
- False positive about a shift with -1 when code_num overflows.
2015-05-05 12:20:07 +03:00
Ari Koivula
ed670f4185
Fix coverity warning.
...
- False positive about buffer overrun due to thinking work_tree_copy_up
could be called with depth == 4.
2015-05-05 11:54:09 +03:00
Ari Koivula
2276e0028f
Fix coverity warning.
...
- False positive about use of an uninitialized value. Actually just
copying uninitialized data from one struct to another.
2015-05-05 10:39:29 +03:00
Ari Koivula
41d9889e28
Fix coverity warning.
...
- False positive about coeff_y being uninitialized when width == 0.
2015-05-05 10:23:52 +03:00
Ari Koivula
80cbda364b
Fix coverity warning.
...
- Variable guards dead code. Although, maybe it will complain about the
dead code now instead.
2015-05-05 10:17:06 +03:00
Ari Koivula
08d079773f
Fix coverity warning.
...
- Dead code.
2015-05-05 10:12:01 +03:00
Ari Koivula
e225c5b302
Fix coverity warning.
...
- Dead code due to current value of MRG_MAX_NUM_CANDS. Not sure if this
fix will work but I think it looks better.
2015-05-05 10:06:18 +03:00
Ari Koivula
17bdc82b5e
Fix coverity warning.
...
- Dereferencing a pointer from realloc before checking if it's null.
2015-05-05 09:40:24 +03:00
Ari Koivula
cc980fb815
Fix coverity warning.
...
- False positive for use of uninitialized variable.
2015-05-05 09:37:34 +03:00
Ari Koivula
7a551bece5
Fix coverity warning.
...
- Remove dead code.
2015-05-05 09:29:40 +03:00
Ari Koivula
cf2a406aba
Fix coverity warning.
...
- False positive for overflow. Fixed the parameter declaration.
2015-05-04 17:38:16 +03:00
Ari Koivula
1c6c4963e7
Fix coverity warning.
...
- Mutex was left locked when malloc failed. Fixed.
2015-05-04 17:38:16 +03:00
Ari Koivula
1c3873f5b2
Fix coverity warning.
...
- Overflow from buggy implementation of modulo behavior for
pattern_type. As there is no need for such behavior I removed it.
2015-05-04 17:38:16 +03:00
Ari Koivula
6234b09461
Fix coverity warning.
...
- A false alarm about buffer overflow. No new modes are added if all modes
are already in the list.
- Skip checking predicted modes if all modes are in the list.
2015-05-04 17:38:16 +03:00
Ari Koivula
9015aab996
Clean up IDR handling code.
...
- IDR was called RADL, probably because the NAL type is IDR_W_RADL.
- Move things around to make it clearer what is happening.
2015-04-30 20:46:07 +03:00
Ari Koivula
b43f1cb9eb
Fix keeping of reference frames over IDR boundary.
...
-
2015-04-30 15:42:16 +03:00
Ari Koivula
c0c9bc619a
Fix valgrind warning.
...
- Attribute state->global->slicetype was used before being initialized.
- The reference frame lists should be updated based on current frame,
not on previous frame (or uninitialized data).
2015-04-30 13:18:28 +03:00
Ari Lemmetti
afcccb5c81
Merge branch 'memory_leak_test'
2015-04-29 16:26:59 +03:00
Ari Lemmetti
0081384727
Clean Makefile a bit. Add debug build option.
2015-04-24 20:45:19 +03:00
Marko Viitanen
8ed5d06ebe
Fixed compiler warnings caused by the bipred branch merge
2015-04-23 15:12:48 +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
79dc7e7270
Bi-pred search cleanup
2015-04-23 14:39:41 +03:00
Marko Viitanen
0e958ebe84
Fixed merge candidate selection
2015-04-23 12:18:33 +03:00
Marko Viitanen
3c694a8f6e
Fixed bipred mv candidate selection
2015-04-23 12:18:05 +03:00
Marko Viitanen
9951810910
Fixed deblocking with bi-dir blocks
2015-04-23 09:43:39 +03:00
Marko Viitanen
7f504b7808
Added a commandline parameter --bipred to enable bi-pred search
2015-04-21 14:35:16 +03:00
Marko Viitanen
fb74f86a5b
Bi-pred search now actually does cost calculations
2015-04-21 14:16:06 +03:00
Marko Viitanen
e12ba7c80f
Created function inter_recon_lcu_bipred() and moved bipred recon there
2015-04-21 12:05:21 +03:00
Marko Viitanen
50fce975d9
Clamp bi-pred motion vectors because ipol filtering requires modifications
2015-04-21 11:24:07 +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
Ari Koivula
7028846423
Fix bug in intra mode search.
...
- The cost of the first mode in the mode list was returned instead of cost of
the selected mode, as this used to be the best mode when the list was
sorted. Should only matter when doing inter coding.
- This pretty much affects only --rd=1 in inter frames.
2015-04-09 16:05:53 +03:00
Marko Viitanen
da3fe9f199
Fixed rounding in bi-pred reconstruction
2015-04-02 15:55:13 +03:00
Marko Viitanen
c7a17cf1c4
Changed motion vector candidate derivation to work with bi-pred case
2015-04-02 14:05:24 +03:00
Marko Viitanen
73db9fec83
Fixed asserts for intra PU-depth configurations
2015-04-02 10:31:56 +03:00
Marko Viitanen
5d71fb3136
Fixed leaf aligning
2015-04-01 08:49:22 +03:00
Marko Viitanen
d26b89174b
Fixed intra chroma search ref_v pointer
2015-03-31 15:43:22 +03:00
Marko Viitanen
4b7db2e014
Added a dummy bi-pred search, always selects bi-pred block when possible
2015-03-31 15:02:43 +03:00
Marko Viitanen
2c676927f0
Fixed a bug in bipred reconstruction causing an overflow
2015-03-31 15:02:10 +03:00
Marko Viitanen
06bc4f3d5e
Fixed duplicate checking for merge cand and some cleanup
2015-03-31 12:23:46 +03:00
Marko Viitanen
004e8082ab
Fixed deblocking after L0/L1 mv changes
2015-03-31 12:22:48 +03:00
Marko Viitanen
c02e3b8e26
Fixed inter_get_mv_cand() reference picture checking
2015-03-30 15:22:56 +03:00
Marko Viitanen
f881d6bf8a
Modified structures and mv handling to use L0/L1 vectors
2015-03-30 14:40:29 +03:00
Marko Viitanen
d6f68d0950
Force clearing of references when GOP not used and I-slice
2015-03-30 10:21:41 +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
c82915761f
Enabled insertion of I-slices when GOP is used
2015-03-30 10:09:49 +03:00
Marko Viitanen
815e0b8897
Moved reference list printing to encoder_compute_stats()
2015-03-30 10:09:32 +03:00
Marko Viitanen
2243d139bf
Fixed GOP reference usage when using owf
2015-03-26 14:11:13 +02:00
Marko Viitanen
1dc53be8fc
Fixed leaf aligning
2015-03-26 13:54:17 +02:00
Marko Viitanen
bbeb85f9ee
Fixed case when cfg->frames is zero
2015-03-26 11:24:41 +02:00
Marko Viitanen
5c04603421
Remove unused ref frames on GOP case even when number of ref frames is within limits
2015-03-26 11:14:13 +02:00
Marko Viitanen
5071b5c990
Moved reference list sorting and parsing to encoder_state_new_frame()
...
* fixed a bug in reference verification and added an error state
2015-03-26 10:58:56 +02:00
Marko Viitanen
c40ca49b6c
When GOP is used, verify the references are available
2015-03-26 10:38:21 +02:00
Marko Viitanen
fe581b881e
Changed GOP structure to enable coding sequences not divisible by gop_len
2015-03-25 16:00:20 +02:00
Marko Viitanen
42e02dbfd9
Fixed tr-skip cost calculation
2015-03-24 13:35:28 +02:00
Marko Viitanen
a7328ab008
Fixed tr-skip cost calculation
2015-03-24 12:40:01 +02:00
Marko Viitanen
c649c90f3a
Changes to enable adaptation to any GOP len
2015-03-24 12:01:57 +02:00
Marko Viitanen
9a828ae5da
Fixed merge candidate scaling in hexbs and excluded weighted pred candidates in cost calc
2015-03-24 09:38:24 +02:00
Marko Viitanen
2d8552d0d6
Fixed merge candidate usage by skipping weighted prediction candidate
2015-03-23 15:17:41 +02:00
Marko Viitanen
7952f892fc
Fixed GOP reference usage
2015-03-23 14:17:44 +02:00
Marko Viitanen
34e8f70c8c
Fixed temporal MV predictor offset
2015-03-23 09:22:47 +02:00
Marko Viitanen
eccf1c1a16
Fixed temporal MV predictor offset
2015-03-23 09:21:52 +02:00
Marko Viitanen
164b7a7743
Merge remote-tracking branch 'remotes/origin/master' into GOP
2015-03-20 11:40:15 +02:00
Marko Viitanen
5ae9a70e38
Disable usage of P-slices when GOP
2015-03-20 10:43:59 +02:00
Marko Viitanen
26082d5328
Zero merge candidate fix for B-frames
2015-03-20 10:33:05 +02:00
Marko Viitanen
0c1aa6f73c
Better reference picture removal function encoder_state_remove_refs()
2015-03-20 10:28:17 +02:00
Marko Viitanen
7dab3ea0f6
Replaced temporary reference lists with the ones in gop configurations
2015-03-20 10:25:40 +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
3f31e7bf47
Merge branch 'tz-search'
2015-03-19 19:04:44 +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
d72c560880
Generate sorted reference list for L0 and L1
2015-03-19 12:26:59 +02:00
Marko Viitanen
c761a6beb3
Added encoder state as an input parameter to inter_get_merge_cand()
2015-03-18 12:35:47 +02:00
Marko Viitanen
c56b4d5747
Added combined merge candidates on B-slices and struct inter_merge_cand_t
2015-03-18 10:03:06 +02:00
Ari Koivula
6ec177f75c
Improve handling of input vector to inter search.
2015-03-17 17:16:15 +02:00
Ari Koivula
55ae02f367
Copy cu_info from tiles to main state.
...
- Main states cu_array can be accessed through state->global->ref, which
allows the use of cu_info data from reference frames.
- This was already used by giving previous frames movement vector to next
frame as a starting point candidate, but that functionality was broken at
some point because the data wasn't being moved from child tiles cu_array
to the main cu_array.
- Alternative would be to access the child tiles array directly, but
currently there isn't a mechanism to preserve those arrays for reference
frames.
2015-03-17 13:24:20 +02:00
Ari Koivula
4bec6cec93
Simplify wavefront handling.
...
- Move the reconstruction status assignment out of the main for job loop.
2015-03-17 13:23:27 +02:00
Ari Koivula
4a27f79f20
Update comments.
2015-03-17 13:23:16 +02:00
Marko Viitanen
1da1dc9578
Clean up reference index and mvd writing
2015-03-16 09:41:02 +02:00
Ari Koivula
ca09e8bfe3
Fix WPP not working with threads=0.
...
- Apparently threadqueue_submit runs the job if there are no threads.
2015-03-13 17:15:05 +02:00
SanteriS
913ade461b
tz_search step 1, first if: && -> ||
2015-03-12 17:57:17 +02:00
SanteriS
949ec57849
Merge branch 'master' of https://github.com/ultravideo/kvazaar
2015-03-12 17:55:03 +02:00
SanteriS
bdb0639ac9
fixed function interfaces for tz_search and its subfunctions.
2015-03-12 17:54:21 +02:00
Ari Koivula
d2bb71739f
Clean up and comment WPP threading code.
...
- Remove WPP row reconstruction dependency to the row above current one in
the previous frame. It's obviously unnecessary.
- Remove WPP row reconstruction dependency to the current row in the
previous frame, unless the current row is the last row.
2015-03-11 18:30:37 +02:00
Ari Lemmetti
b9ec4b0a54
AVX2 acceleration for new luma filtering.
2015-03-11 15:33:38 +02:00
Marko Viitanen
bc8ea9547e
Use P-frames when last GOP picture
2015-03-11 15:23:16 +02:00
Marko Viitanen
a4b5f46b46
Fixed reference list delta and num_ref_idx_lX_active values
2015-03-11 15:19:32 +02:00
Marko Viitanen
ac4973c544
Fixed deblocking strength in this configuration when B-slice
2015-03-10 15:20:02 +02:00
Marko Viitanen
1527822753
Fixed GOP POC order when not using threads
2015-03-10 14:12:51 +02:00
Marko Viitanen
866c3bfdf1
Setting gop_len to 0 now works
2015-03-10 12:16:57 +02:00
Marko Viitanen
1c38fbbd3b
Fixed GOP when no threads are used
2015-03-10 10:45:05 +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
Marko Viitanen
ff41ef557d
Fixed reference usage of top GOP layer pictures
2015-03-10 09:18:19 +02:00
Marko Viitanen
eba298e635
Added cu->inter.mv_ref_coded variable
2015-03-10 09:17:25 +02:00
Marko Viitanen
ec02642cc8
Added more bits to POC counter and fixed num_reorder_pic and max_dec_pic_buffering values
2015-03-10 09:06:32 +02:00
SanteriS
9e9f5e3150
Merge branch 'master' of https://github.com/ultravideo/kvazaar
2015-03-08 19:20:08 +02:00
SanteriS
e2f9fe130a
changed step 1 for tz_search
2015-03-08 19:19:23 +02:00
Ari Lemmetti
39eceec38d
Rewrite of luma fractional pixel filtering. Utilizes intermediate values instead of calculating everything again.
2015-03-06 17:58:22 +02:00
Marko Viitanen
42d3f2a8b0
Added B-frame encoding and reference list exceptions for top-layer GOP pictures
2015-03-06 16:32:50 +02:00
Marko Viitanen
1afba671e2
Added missing cabac bits to mv coding
2015-03-06 16:31:27 +02:00
Marko Viitanen
6095503918
Modified search to use correct reference id and mv directions
2015-03-06 16:29:24 +02:00
Marko Viitanen
13c925b701
Testset of data for reference picture lists
2015-03-06 16:28:23 +02:00
Marko Viitanen
43b086caed
Added missing slice header flag "mvd_l1_zero_flag"
2015-03-06 16:27:42 +02:00
Marko Viitanen
18d9789fab
Cabac context array for inter direction
2015-03-06 16:26:16 +02:00
Ari Koivula
2f79bfebf7
Rename parameter encoder_state to state in all functions.
...
- It's so widely used that there isn't really need to emphasize that
it's the encoders state. Also, it isn't really the encoders state,
but encoding jobs state.
2015-03-04 17:31:07 +02:00
Ari Koivula
14fe1b6648
Rename enum color_index to color_t.
2015-03-04 16:37:35 +02:00
Ari Koivula
ded6fd9ee8
Renamed typedef pixel to pixel_t.
2015-03-04 16:35:53 +02:00
Ari Koivula
1f42adb1ea
Renamed typedef coefficient to coeff_t.
2015-03-04 16:33:47 +02:00
Ari Koivula
fedd05465d
Rename struct sao_info to sao_info_t.
2015-03-04 16:32:38 +02:00
Ari Koivula
3d135324da
Rename struct threadqueue_queue to threadqueue_queue_t.
2015-03-04 16:30:20 +02:00
Ari Koivula
b7fcb800b2
Rename struct threadqueue_job to threadqueue_job_t.
2015-03-04 16:28:56 +02:00
Ari Koivula
cf5f240604
Rename struct hardware_flags to hardware_flags_t.
2015-03-04 16:24:59 +02:00
Ari Koivula
e7754bb518
Rename struct strategy_to_select to strategy_to_select_t.
2015-03-04 16:24:06 +02:00
Ari Koivula
e95b138e62
Rename struct strategy_list to strategy_list_t.
2015-03-04 16:23:04 +02:00
Ari Koivula
95afc5af51
Rename struct strategy to strategy_t.
2015-03-04 16:17:45 +02:00
Ari Koivula
db42176a64
Rename struct image_list to image_list_t.
2015-03-04 16:13:57 +02:00
Ari Koivula
7bafd34cfa
Remove struct rd_stats.
2015-03-04 14:01:17 +02:00
Ari Koivula
fe55961f84
Rename struct image to image_t.
2015-03-04 14:01:17 +02:00
Ari Koivula
5431d0ce19
Rename struct lcu_order_element to lcu_order_element_t.
2015-03-04 14:01:17 +02:00
Ari Koivula
9e64ee3cee
Suffix encoder_state_config structs with _t.
2015-03-04 14:01:17 +02:00
Ari Koivula
cdb1a25f05
Inline struct me into encoder_control_t.
2015-03-04 14:01:16 +02:00
Ari Koivula
e5b18cd536
Inline cu_info_intra and cu_info_inter into cu_info_t.
2015-03-04 14:01:16 +02:00
Ari Koivula
a0767a76d2
Rename struct vector2d to vector2d_t.
2015-03-04 14:01:16 +02:00
Ari Koivula
5b12830756
Rename struct config to config_t.
2015-03-04 14:01:16 +02:00
Ari Koivula
1a62fee300
Rename struct cabac_data to cabac_data_t.
2015-03-04 14:01:16 +02:00
Ari Koivula
727fefacc4
Rename struct cabac_ctx to cabac_ctx_t.
2015-03-04 14:01:16 +02:00
Ari Koivula
4bc0308b7e
Rename struct bitstream_file to bitstream_file_t.
2015-03-04 14:01:15 +02:00
Ari Koivula
d6ec6a618d
Rename struct bitstream_mem to bitstream_mem_t.
2015-03-04 14:01:15 +02:00
Ari Koivula
106c9128ad
Rename struct bitstream_base to bitstream_base_t.
2015-03-04 14:01:15 +02:00
Ari Koivula
5d8498dc88
Rename struct bit_table to bit_table_t.
2015-03-04 14:01:15 +02:00
Ari Koivula
8cd8240f7a
Rename struct bitstream to bitstream_t.
2015-03-04 14:01:15 +02:00
Ari Koivula
7ca688b376
Rename struct videoframe to videoframe_t.
2015-03-04 14:01:15 +02:00
Ari Koivula
63e224574e
Rename struct cu_info to cu_info_t.
2015-03-04 14:01:15 +02:00
Ari Koivula
f3fab62d33
Rename struct cu_array to cu_array_t.
2015-03-04 14:01:15 +02:00
Ari Koivula
78f0c3a83b
Rename struct scaling_list to scaling_list_t.
2015-03-04 14:01:14 +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
890b4c1e20
Modified image handling and QP calculations to support GOP
2015-03-03 12:22:50 +02:00
Marko Viitanen
c3d9e0b707
Added testset of data for GOP
2015-03-03 12:22:09 +02:00
Marko Viitanen
34b231378b
Modified config and encoder_state structs for GOP
2015-03-03 12:21:45 +02:00
SanteriS
b55bfe1729
Merge branch 'master' of https://github.com/ultravideo/kvazaar
2015-02-25 18:15:35 +02:00
SanteriS
bef7cae4f8
Merge branch 'master' of https://github.com/ultravideo/kvazaar
2015-02-25 15:29:11 +02:00
SanteriS
f478732b4c
tz search bugfix
2015-02-25 15:28:45 +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
Ari Koivula
3e58e03b56
Select motion compensation search starting point from among merge candidates.
...
- Greatly reduces bdrate for most sequences.
2015-02-25 12:58:15 +02:00
SanteriS
2f68cf3847
(TZ search) Fixed missing check for owf mode. Added 6 point hexagon search pattern.
2015-02-23 16:59:48 +02:00
Ari Koivula
9865e73b90
Remove NetBSD getopt dependency to unistd.h.
...
- Remove the $NetBSD header as it wouldn't get updated and is wrong.
2015-02-19 16:26:14 +02:00
Ari Koivula
dd54b5ae10
Replace GNU getopt with NetBSD getopt.
...
- This doesn't compile, but I'm including it to have a version history for
changes required to make it work.
- We need this for to have a getopt implementation on Windows.
- It's necessary to change the implementation to switch from GPL to LGPL.
2015-02-19 16:26:14 +02:00
Ari Koivula
c979db7e95
Avoid sorting intra modes unnecessarily.
2015-02-19 16:25:45 +02:00
Ari Koivula
1c2129fdcb
Improve sort_modes.
...
- When encoding with fast enough settings this function can use up to 5%
of the cpu time, so I tried to optimize it a little bit.
2015-02-19 16:25:38 +02:00
Ari Koivula
5fa6438b25
Clean up calls to memset.
...
- Replaces all calls to memset with new FILL and FILL_ARRAY macros. The use
of memset was inconsistent and we never use it for anything complicated.
2015-02-19 16:25:28 +02:00
Arttu Ylä-Outinen
b6776a8cee
Add --vps-period parameter.
2015-02-18 13:55:27 +02:00
SanteriS
1a4d30d15a
fixed step 1 of TZ algorithm
2015-02-11 18:51:21 +02:00
SanteriS
ce4c251cd1
Merge branch 'master' of https://github.com/ultravideo/kvazaar
2015-02-09 17:29:49 +02:00
Ari Lemmetti
8aea1a0fa9
Updated version string. Fixed dct strategy registration error message.
2015-02-05 14:07:26 +02:00
Ari Lemmetti
7846cf3093
Merge branch 'faster_interpolation'
2015-02-05 13:29:43 +02:00
Ari Lemmetti
7430622038
Copy ipol-generic strategy as a base for avx2 strategy
2015-02-05 13:28:07 +02:00
Ari Lemmetti
8495870df8
Using BIT_DEPTH macro because it is constant
2015-02-05 13:19:54 +02:00
Ari Lemmetti
c82adae0c4
Use four tap functions in octpel chroma interpolation
2015-02-04 18:23:57 +02:00
Ari Lemmetti
2f11caeb73
Added generic four tap functions. Use them in halfpel chroma interpolation.
2015-02-04 17:50:12 +02:00
Ari Lemmetti
ff456c120a
Enabled link time optimizations. Disabled default rules.
2015-02-04 15:19:47 +02:00
SanteriS
50dd59eb21
Added different search patterns for TZ search.
2015-02-02 19:14:45 +02:00
Ari Lemmetti
041d970ece
Apply fast clipping also to chroma filtering.
2015-01-29 16:19:04 +02:00
Ari Koivula
ff721bab81
Fix possible non-determinism with owf.
...
- Triggers when owf is on, sao is off and deblocking is on.
2015-01-26 16:02:31 +02:00
Ari Koivula
f01cbbb5ca
Add --no-signhide parameter.
2015-01-24 21:29:37 +02:00
Ari Koivula
5f24c6b73d
Make normal dequant use runtime sign-hiding configuration.
2015-01-24 21:29:25 +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
804a3b648b
Clean up quantization sign hiding.
...
- To allow for later configuration at runtime.
2015-01-23 16:03:59 +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
1b19afc706
Flush output buffer after every frame.
2015-01-22 12:29:06 +02:00
Ari Lemmetti
b4aab06073
Added new files in Makefile.
2015-01-21 18:38:09 +02:00
Ari Lemmetti
c21351cc12
Added fast clipping function for clamping values to bit depth.
2015-01-21 17:53:06 +02:00
SanteriS
4b3d77aaf2
Enable tz search.
2015-01-21 12:55:00 +02:00
Ari Koivula
f86def8ed8
Remove unused variables.
2015-01-20 17:50:19 +02:00
Ari Koivula
8ac66934c0
Clean up NAL header code.
...
- Use long start code for RADL NAL units if they are the first NAL in the
access unit.
- Ffmpeg mpegts was complaining about start codes not being present.
There wasn't anything wrong that I could find though, besides the
missing intra long start code.
2015-01-20 17:34:59 +02:00
Ari Koivula
81ad583e08
Use the same coeff cost calculation for all rd modes.
...
- It's not worth it to have these faster approximations for coefficient cost.
2015-01-20 17:34:59 +02:00
Ari Koivula
870171e6ad
Fix --rd=0 actually work.
2015-01-20 17:34:59 +02:00
Ari Lemmetti
f037ed580c
Improved data layout
2015-01-15 16:31:18 +02:00
Ari Lemmetti
4382c2f088
Added missing -1 to PIXEL_MAX macro
2015-01-15 16:14:07 +02:00
Ari Lemmetti
465f718eeb
Move value clipping away from separate loop
2015-01-15 16:14:00 +02:00
Ari Lemmetti
9d12ce21d5
Cleaned luma interpolation, added functions for 8-tap filtering.
2015-01-15 16:13:12 +02:00
Ari Lemmetti
0e56d13b5d
Use smaller bit depth for fractional pixel interpolation
2015-01-15 15:00:09 +02:00
Ari Lemmetti
cc061b4c3d
Added ipol strategy for interpolation filters.
...
Added initial files for AVX2 and generic strategies.
2015-01-15 14:59:37 +02:00
Ari Lemmetti
73762062b6
Clarified comments a bit
2015-01-15 11:57:19 +02:00
Ari Koivula
ab3364afb4
Add skipping of intra search in inter frames for rd=0.
2015-01-15 11:54:35 +02:00