Arttu Ylä-Outinen
04ba5dca41
Make config_destroy accept a NULL pointer.
2015-08-26 12:10:26 +03:00
darealshinji
87a4e53c35
Makefile: add $(CPPFLAGS), use -Wl,-z,noexecstack and install development files on Linux
2015-08-22 16:00:26 +02:00
Ari Lemmetti
3661f3f3f5
Fix incorrect free on error
2015-08-21 18:26:12 +03:00
Ari Lemmetti
4103bd2786
Add missing padding for frame allocation
2015-08-21 17:25:54 +03:00
Ari Lemmetti
d6c3363dc8
Merge branch 'interlacing_experimental'
2015-08-21 15:50:24 +03:00
Ari Lemmetti
ed7948810e
Fix help message and update README.md
2015-08-21 15:29:48 +03:00
Ari Lemmetti
68fcc67a16
Add extraction of fields according to source scan type
2015-08-21 15:15:20 +03:00
Ari Lemmetti
581ff95412
Write flags and SEI messages for interlacing.
2015-08-21 14:46:05 +03:00
Arttu Ylä-Outinen
38893d2da1
Use the static lib to link the program.
...
Changes the Makefile to use the static library and additional object
files as linker input instead of all the object files when linking the
command line program.
2015-08-20 16:42:29 +03:00
Arttu Ylä-Outinen
cb49586d36
Add static library target to Makefile.
...
Adds targets libkvazaar.a and install-static to the Makefile.
2015-08-20 16:42:29 +03:00
Arttu Ylä-Outinen
23159e45b7
Rename LIB_OBJS to SHARED_OBJS in Makefile.
...
SHARED_OBJS is a more appropriate name since the objects are only used
for building shared libraries, not static ones.
2015-08-20 16:42:28 +03:00
Arttu Ylä-Outinen
8488ba1bb7
Remove unnecessary objects from libraries.
...
Removes the cli and yuv_io modules from libraries.
2015-08-20 16:42:28 +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
Ari Lemmetti
923f4a74d5
Fix filtering over limits
2015-08-17 17:39:56 +03:00
Ari Lemmetti
febe66f148
Fix typo
2015-08-17 16:16:11 +03:00
Ari Lemmetti
82cf4e8ff4
Output error messages to stderr
2015-08-17 15:01:46 +03:00
Ari Lemmetti
3da71b62bf
Add checks if malloc fails
2015-08-17 15:01:46 +03:00
Ari Lemmetti
4718fe7fda
Change variable names to match used convention
2015-08-17 15:01:46 +03:00
Ari Lemmetti
6a5eaf08de
Rename extend_borders to get_extended_block. Add kvz_ prefix to type definition.
2015-08-17 15:01:46 +03:00
Ari Lemmetti
d82582c37c
Changes to extend border function.
...
Now outputs a pointer to a block with guaranteed padding for filtering.
Only generate extra pixels if samples are needed out of bounds.
Use memcpy otherwise.
2015-08-17 15:01:46 +03:00
Ari Lemmetti
fc038cb8bf
Add --source-scan-type parameter
...
Options progressive (default)
tff for top field first
bff for bottom field first
2015-08-13 12:53:14 +03:00
Ari Lemmetti
4dcc0d876d
Fix rate control when --owf=auto (default)
...
Value in cfg stays -1 if auto selection is used.
Use value in encoder instead.
2015-08-12 18:20:57 +03:00
Ari Lemmetti
5d96dbc6c0
Make strategy selection use bit depth given via parameter instead of excluding registration with defines
2015-08-12 13:33:38 +03:00
Ari Lemmetti
4122f36089
Prevent the registration of strategies that are incompatible when KVZ_BIT_DEPTH != 8
...
Remove unnecessary or misleading mentions of "8bit"
2015-08-12 11:29:53 +03:00
Ari Lemmetti
33b6481660
Remove unused variables.
2015-08-11 15:53:40 +03:00
Ari Lemmetti
348d7780fc
Remove third shift and offset from 14-bit sampling functions (change missing from rebase)
2015-08-11 15:06:16 +03:00
Marko Viitanen
8409317bd9
Fixed rebasing errors for 10bit branch
2015-08-11 14:56:45 +03:00
Marko Viitanen
58f12bd530
Changed frame 8bit to 10bit conversion to be done without memory allocation
2015-08-11 08:18:14 +03:00
Marko Viitanen
6453a511d7
Scale SAD/SATD costs to match bit depth
...
Conflicts:
src/image.c
2015-08-11 08:18:14 +03:00
Marko Viitanen
0304b6c412
Fixed luma interpolation filter when 10bit coding and some other minor fixes
2015-08-11 08:17:48 +03:00
Marko Viitanen
450b5e64ca
Fixed overflow on generic ipol filters when 10bit encoding
...
Conflicts:
src/strategies/generic/ipol-generic.c
2015-08-11 08:17:48 +03:00
Marko Viitanen
191d3e4d87
Fixed RDOQ on 10bit encoding
2015-08-11 08:14:35 +03:00
Marko Viitanen
414ebe6101
Fixed checksum on bitdepth > 8 cases
...
Conflicts:
src/nal.c
src/nal.h
src/strategies/generic/nal-generic.c
src/strategies/strategies-nal.c
src/strategies/strategies-nal.h
2015-08-11 08:14:35 +03:00
Marko Viitanen
57ab46f110
Small fixes all around to enable 10bit encoding
...
Conflicts:
src/encmain.c
src/encoder.c
src/encoderstate.c
src/global.h
2015-08-11 07:59:20 +03:00
Ari Lemmetti
7cd4f7a5c9
Enable fractional motion vectors with bipred
2015-08-10 18:49:12 +03:00
Ari Lemmetti
5887c96991
Add and use 14bit reconstruction for fractional motion vectors with bipred
2015-08-10 18:45:29 +03:00
Ari Lemmetti
a87dafb27a
Add hi_prec_buf_t for higher precision intermediate values for interpolation filter.
2015-08-10 18:35:06 +03:00
Ari Lemmetti
3e31ff2476
Use the function to sample half-pixels.
2015-08-10 18:30:41 +03:00
Ari Lemmetti
0a096c7040
Move qpel and octpel reconstruction in separate functions.
2015-08-10 18:25:52 +03:00
Ari Lemmetti
fc00b4795c
Preparations for more accurate reconstruction with bipred
2015-08-10 18:08:13 +03:00
Ari Lemmetti
8b4a6c92da
Add 14bit precision sample functions.
2015-08-10 18:02:06 +03:00
Ari Lemmetti
b30f17d4b8
Add fractional pixel sampling for chroma
2015-08-10 17:55:37 +03:00
Ari Lemmetti
650dd7d840
Use pixels_blit to copy neccessary pixels.
2015-08-10 17:52:00 +03:00
Ari Lemmetti
01f40ec104
Add fractional pixel sampling for luma
2015-08-10 17:51:48 +03:00
Ari Koivula
0c3c93d456
Optimize intra SAD intrinsics.
...
- Added 64x64 version for completeness.
- With the exception of 16x16, these were all slightly slower than the ASM
versions, as measured by "kvazaar_test -s speed -t intra_sad", but now they
are on par or slightly faster.
- None of these actually use any AVX2 intrinsics, and probably never will,
unless someone adds an interface for doing more than one block at a time,
in which case the non-destructive versions might come in handy.
2015-08-06 19:35:00 +03:00
Ari Lemmetti
20b833bc8e
Fix mingw errors
2015-07-31 18:44:36 +03:00
Ari Lemmetti
12c391eb08
Add auto-detection for input resolution.
...
Use --input-res=auto as default.
2015-07-31 17:35:16 +03:00
Ari Koivula
0740a73fbb
Clean up Makefile.
...
- Move stuff around.
- LDFLAGS -shared and -dynamiclib imply -fpic.
2015-07-31 15:57:05 +03:00
Ari Koivula
beec2705b1
Add cli, lib-shared and lib-static to Makefile.
2015-07-31 15:57:05 +03:00
Ari Koivula
24b3306325
Fix incorrect pattern rules in Makefile.
...
- Having more than one rule in a pattern rule means that both of those files
are created at the same time with the rule. This only worked for debug,
because debug build was never done in the same invocation as release build.
2015-07-31 14:36:45 +03:00
Ari Koivula
1c27f67963
Remove -flto.
...
- Always use the compiler to invoke the linker. Clang will give additional
parameters to the linker when compiled with -flto.
- Giving a different optimization level to linker did not make any difference
in gcc-5.1.1.
2015-07-31 14:36:26 +03:00
Ari Koivula
54b1be341e
Don't compile executable with PIC.
...
- It's required for .so and .dylib, but not for .dll or the executable.
- It might be better to use libtool for this, but I'm not ready to go that
far yet.
2015-07-29 17:12:09 +03:00
Ari Koivula
f8154f8382
Merge branch 'make-dylib'
2015-07-29 11:28:43 +03:00
Ari Koivula
60437fd0c3
Add -lrt back the exe link command.
2015-07-29 11:28:11 +03:00
Luca Barbato
5c7a808bbd
build: Generate a pkg-conf file
2015-07-29 02:27:12 +02:00
Ari Koivula
04e1a21ded
Merge branch 'make-dylib'
...
Closes #94 .
2015-07-28 11:42:46 +03:00
Ari Koivula
2211b90a24
Move comments for defines to a different line.
...
- Having comment as part of the define confuses doxygen. They get added
to every function that uses the macro.
2015-07-21 17:10:08 +03:00
Ari Koivula
022d28ab11
Fix small hexbs pattern.
...
- Who could mess this up? Oh.. right.
2015-07-21 16:12:44 +03:00
Ari Koivula
22e56f86c7
Move inter search patterns inside the search functions.
2015-07-21 16:06:31 +03:00
Ari Koivula
b73b275e08
Remove unused includes from search.
2015-07-21 15:06:06 +03:00
Ari Koivula
ae56118010
Move functions from search to search_intra.
2015-07-21 14:59:19 +03:00
Ari Koivula
bf7542c35d
Move functions from search to search_inter.
2015-07-21 12:16:05 +03:00
Ari Koivula
3c9b830d8f
Add modules search_intra and search_inter.
...
- For breaking up search module.
2015-07-21 12:04:16 +03:00
Arttu Ylä-Outinen
06ea593477
Change dylib file name to libkvazaar.X.dylib.
...
Changes the version number in the dylib filename from a three-digit
version (libkvazaar.X.Y.Z.dylib) to a single-digit one
(libkvazaar.X.dylib).
2015-07-20 15:09:46 +03:00
Arttu Ylä-Outinen
df749e032e
Add necessary linker options when building dylib.
...
Sets linker options -compatibility_version and -install_name when making
dylib.
2015-07-20 15:09:09 +03:00
Luca Barbato
9c414995c5
build: Add a MacOSX install target for the library
2015-07-17 19:44:20 +02:00
Arttu Ylä-Outinen
59f95b8e73
Add nasm support.
...
Makes is possible to build kvazaar using nasm instead of yasm.
- Adds trailing slashes to -I params in ASFLAGS.
- Disables CPU NOP directives when assembler is not yasm.
2015-07-17 13:59:25 +03:00
Arttu Ylä-Outinen
e307b7cec4
Check that input dimensions are multiples of two.
...
Fixes wrongly accepting non-multiple of two resolutions and a segfault
when one of the input dimensions is one.
2015-07-17 10:07:24 +03:00
Arttu Ylä-Outinen
d2c42cb303
Fix making tests.
...
Commit 9cfbd55e
removed "./" prefix of the TESTS variable in the
Makefile but the recipe of target tests was expecting it. Fixed by
prepending "./" to the tests recipe.
2015-07-17 10:07:24 +03:00
Luca Barbato
56ff1c7805
build: Drop the non-standard -t
...
Should unbreak freebsd.
2015-07-16 16:50:09 +02:00
Arttu Ylä-Outinen
94e8fc1536
Build dylib on Darwin.
...
Adds target libkvazaar.dylib to Makefile. On Darwin, libkvazaar.dylib is
set as a prerequisite of the all target.
2015-07-16 14:15:09 +03:00
Arttu Ylä-Outinen
a4ec92081a
Make symbols hidden by default.
...
Adds "-fvisibility=hidden" to CFLAGS and LDFLAGS. Defines macro
KVZ_PUBLIC for marking symbols that should be visible.
2015-07-13 14:20:21 +03:00
Arttu Ylä-Outinen
9cfbd55ea8
Add making symlinks to make install.
...
Running "make install" now creates symlinks libkvazaar.so and
libkvazaar.so.X pointing to libkvazaar.so.X.Y.Z.
2015-07-13 11:45:42 +03:00
Ari Koivula
c94d91061c
Merge branch 'cpuid-fix'
2015-07-09 11:40:46 +03:00
Arttu Ylä-Outinen
8550c6ccd8
Fix AVX2 detection.
...
Replaces calls to __get_cpuid by __cpuid_count on gcc and clang and
calls to __cpuid by __cpuidex on MSVC. Unlike __get_cpuid and __cpuid,
__cpuid_count and __cpuidex set the ecx register which is required for
AVX2 detection.
2015-07-09 11:20:37 +03:00
Ari Koivula
9acf7795a2
Refactor cpuid capability detection.
...
- Moved cpuid data to a struct to make it easier to group data from one
cpuid call together.
- Renamed the bit masks to make it harder to mask the wrong register or
cpuid.
- Remove the .byte trick. We don't really need to support such ancient
compilers?
2015-07-09 11:20:37 +03:00
Arttu Ylä-Outinen
e69088026e
Write slice header before joining child streams.
...
The lengths of the leaf streams must be available when the slice header
is written. Writing the header before joining child streams removes the
need to copy leaf bitstreams instead of moving them.
2015-07-08 13:14:17 +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
3efdee2c13
Fix compilation warnings when using clang.
...
Removes typedef redefinitions in kvazaar_internal.h.
2015-07-06 13:46:56 +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
089ff895ad
Fix seeking when input stream is not seekable.
2015-07-06 12:07:05 +03:00
Arttu Ylä-Outinen
aca5d7514f
Fix pocs reallocation in imagelist.
...
Replaced sizeof(int32_t*) by sizeof(int32_t).
2015-07-06 11:58:05 +03:00
Arttu Ylä-Outinen
ca8435f581
Remove setting CC in Makefile.
2015-07-06 11:27:28 +03:00
Arttu Ylä-Outinen
3a47aab696
Fix allocating tile boundary arrays.
...
Column and row numbers had been mixed up.
2015-07-06 10:48:19 +03:00
Arttu Ylä-Outinen
a0865ff351
Change ime_algorithm in kvz_config to an enum.
...
Adds enum kvz_ime_algorithm to kvzaar.h.
2015-07-06 09:47:18 +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
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