Commit graph

22 commits

Author SHA1 Message Date
Harinarayanan K K
134291ea0b Added support for Main Profile toolsets in encoder.
Added support for CABAC entropy coding.
Added support for B slices.
Fixed an issue in rate control constant QP mode.

Change-Id: Ib759d35e8e943f941aa9b8bbff0362d92c619994
2015-06-24 20:36:11 +00:00
Marco Nelissen
3764559f3f Merge "Remove a duplicate header" 2015-06-24 20:33:45 +00:00
Marco Nelissen
91a4aa1393 Merge "Fix string handling for generating version strings" 2015-06-24 20:33:32 +00:00
Marco Nelissen
2b0f8b134f Merge "Force regenerating the header via i4_gen_header instead of i4_header_mode" 2015-06-24 20:32:12 +00:00
Martin Storsjo
7313602dec Don't use static structs for rc init
Most of them was benign and didn't risk any data race; they
were used for write-only memory during init.

The array as_itt_memtab in ih264e_get_rate_control_mem_tab
could however cause a real data race, if multiple threads
try to initialize an encoder at the same time, since it
used as temporary storage when mapping between different
structs.

Change-Id: I3ca29f0e3be2fad154becc3ee29867e591975a74
2015-06-23 15:00:45 +03:00
Martin Storsjo
afe8d03624 Force regenerating the header via i4_gen_header instead of i4_header_mode
If i4_header_mode is set (without the caller explicitly requesting it),
the next frame to be encoded will be missed altogether (when only
a header is output).

Instead force a header to be generated prepended to the next frame.
If the caller explicitly requests header mode, it will be output
in a separate call.

Change-Id: If475717edf980bccb2076f880c60c9dd7dede904
2015-06-23 12:34:46 +03:00
Martin Storsjo
c496bf45e0 Fix string handling for generating version strings
Don't do concatenation with strncat; the length parameter in strncat
is only for how many chars to append at most, not for the full output
buffer size. To safely use strncat, one would have to do
strncat(buf, str, sizeof(buf) - strlen(buf)).

By using snprintf, we guarantee that the buffer is null terminated, and
we don't need to use strnlen at all.

(If compatibility with older MSVC versions that lack snprintf, one
can use _snprintf instead and manually add the null termination.)

Change-Id: I1c2322c7a406ddd5e6551a96c460da60deeffda1
2015-06-18 12:12:47 +03:00
Martin Storsjo
b9404f3d29 Remove a duplicate header
ithread.h is already in the common directory.

Change-Id: I300fd9c07075e16793e7b645e483663d081ca0cc
2015-06-18 11:29:24 +03:00
Harish Mahendrakar
5cdb888fea Fixed an overread in YUV420 Semi-planar input usecase
Handled non-multiple of 16 dimensions for 420 semiplanar input
Modified test code to remove alignment of width and height

Change-Id: I83ff8165364a863d577fcac81e711b07eec9c004
2015-06-11 10:52:36 +05:30
Martin Storsjo
bf9cd17d31 Support levels 5.0 and 5.1 in the encoder properly
The function ih264e_get_lvl_idx lacked handling of them
before, which meant that it returned index 0 (corresponding
to level 1.0) if level 5.0 or 5.1 were selected.

Change-Id: I482213e68e11fd091c72ec57a593392aa1a0a4ae
2015-06-03 15:47:18 +00:00
Lajos Molnar
87f8a24c63 Merge "Remove leftover printfs in x86 encoder initialization" 2015-06-03 15:42:27 +00:00
Lajos Molnar
5f3e2bc35b Merge "Only initialize u4_deblk_prev_row if it will be used" 2015-06-03 15:39:12 +00:00
Lajos Molnar
3c2ac2246c Merge "Fix an overread in the slice map" 2015-06-03 15:36:44 +00:00
Martin Storsjo
fc508f2e87 Fix an overread in the slice map
After incrementing the macroblock position in ih264e_update_proc_ctxt,
the slice index of the next macroblock is read. The value that is read
isn't actually used, but make sure that the array is large enough to
avoid overreads.

Change-Id: I44ddb49773244c7d1e404199fc57a9e30a8959e0
2015-05-26 08:59:50 +03:00
Martin Storsjo
bc7164d2f1 Include space for chroma in the padding allocated in ih264e_get_total_pic_buf_size
Chroma is already accounted for in e.g. num_samples by multiplying
the number of luma samples by 3/2, so include it in the padding
calculation as well.

This fixes encoding 176x144 at level 1.0 - normally this isn't an issue
since the padding is a bit overestimated, but for this particular
resolution/level combination, it fails unless this is calculated properly.

Change-Id: Id5df6e5aee4d3d78f4c28a3b7d5fed6fe42a1f2c
2015-05-25 20:41:37 +03:00
Martin Storsjo
1bc6742182 Only initialize u4_deblk_prev_row if it will be used
This avoids reads out of bounds when encoding videos with a height
of one single macroblock.

Change-Id: Iec982cebb0995c8ecf160751eaa72df38604e8b0
2015-05-25 20:31:02 +03:00
Martin Storsjo
7a85475106 Remove leftover printfs in x86 encoder initialization
A library shouldn't printf things to the common stdout, at least
not in normal builds.

Change-Id: Ifd875369c2347549f141fe0f9754e51814c0de96
2015-05-19 10:39:25 +03:00
Harish Mahendrakar
25e8adb631 Resolved warnings and fixed alignment of few assemblies
Resolved warnings seen in x86 modules
Fixed alignment of few modules
Updated comments in few arm modules for consistency
Fixed warnings seen in clang build

Change-Id: I0623169b5e84a6a6f09c3d2212e754101272f5e9
2015-05-05 17:35:10 +00:00
Lajos Molnar
cd9e51fc2b fix file permissions
Change-Id: Ia4f99d5b963acd8d8a1afc2fbdf06b122d898f63
2015-05-05 17:34:51 +00:00
Harish Mahendrakar
c72323e723 Fixed few issues seen in CTS tests
Added support for encoding non-multiple of 16 dimensions
Added support for encoding dimensions smaller than 64x64
Aligned coeff data to 4 byte boundary

Change-Id: I111093950f94698296d8499a2845cfe2db6c557b
2015-04-28 19:17:04 +05:30
Lajos Molnar
7023f4d0e9 fix build for generic builds
Change-Id: I7654a801a2b168b7e0bcbebf680efbf2343b1ece
2015-04-16 11:54:42 -07:00
Hamsalekha S
8d3d303c79 Initial version
Change-Id: I7efe9a589cd24edf86e8d086b40c27cbbf8b4017
2015-04-02 15:59:02 +05:30