summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* merge in mnc-dr-release history after reset to mnc-dr-devThe Android Automerger2015-07-060-0/+0
|\
| * merge in mnc-release history after reset to mnc-devThe Android Automerger2015-06-170-0/+0
| |\
| | * merge in mnc-release history after reset to mnc-devThe Android Automerger2015-06-040-0/+0
| | |\
| | | * merge in mnc-release history after reset to mnc-devThe Android Automerger2015-05-060-0/+0
| | | |\
| | | | * Fixed few issues seen in CTS testsHarish Mahendrakar2015-05-0510-98/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added support for encoding non-multiple of 16 dimensions Added support for encoding dimensions smaller than 64x64 Aligned coeff data to 4 byte boundary Bug: 20554276 Change-Id: I111093950f94698296d8499a2845cfe2db6c557b
* | | | | Fix MIPS buildMarco Nelissen2015-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I8190ce01d313f987f142a0c7ef5ae31f01562510
* | | | | Remove all other thread implementations than pthreadMartin Storsjo2015-06-251-368/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: Id30fc1a9c007f2f32ed3375bbf02085f0edad5a0
* | | | | Don't declare variables after statementsMartin Storsjo2015-06-2510-39/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes building with compilers that are strict about the pre-C99 rule about having all variable declarations before statements. Change-Id: I06dd0cc42a6dbe90025c3c913a0c8d9ffb0acbcb
* | | | | Reorder code to avoid reading uninitialized dataMartin Storsjo2015-06-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the current slice isn't BSLICE, u1_weighted_bipred_idc is uninitialized, which valgrind can complain about (mostly in uninitialized builds). By reordering the conditions, we avoid doing conditional jumps based on uninitialized data. Change-Id: I4d601fd1a4e34d85fe5992ecb934ac3747953960
* | | | | Force regenerating the header via i4_gen_header instead of i4_header_modeMartin Storsjo2015-06-252-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Don't use static structs for rc initMartin Storsjo2015-06-2512-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Initialize i4_non_ref_frames_in_stream before encoding SPS/PPSMartin Storsjo2015-06-252-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When header mode is enabled, the SPS is populated before this field was initialized in ih264e_pic_init. Change-Id: I7e38828e12bee15bd3a53562b4e4d0d65354326a
* | | | | avcenc: Make sure that "avcenc --help" works as intendedMartin Storsjo2015-06-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The --help option is handled by the normal argument parsing loop below, but that is only invoked if argc > 2. Change-Id: Icff3625412c340565c062628f2657c41db73068e
* | | | | avcenc: Check that enough arguments exist before parsingMartin Storsjo2015-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each round in the loop uses both argv[i] and argv[i + 1]. This fixes crashes if given an odd number of parameters, 3 or more. Change-Id: I9b8be99042eb7d0f69ebd87166d9cc920d15a950
* | | | | Allow setting profile IV_PROFILE_MAINMartin Storsjo2015-06-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now once that the encoder supports the main profile, allow it to be set in the IVE_CMD_CTL_SET_PROFILE_PARAMS request. The actual profile value set here is ignored in practice, but at least allow setting it to main.
* | | | | Added check for minimum output buffer size.Harinarayanan K K2015-06-255-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed macro specifying the minimum size required for output buffer. Added an error check on the size allocated for output buffer. Change-Id: I98e4f46e62ffc974df760f2633689de079ca3e5e
* | | | | Added code to handle cases with qp less than 10Harinarayanan K K2015-06-253-11/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When qp goes less than 10, all I16x16 mode evaluations are disabled and I4x4 evaluations are enabled irrespective of preset. This will ensure that the residual will not exceed the supported range of entropy Minimum Qp cannot be set less than 4 now. When QP goes lesser, the residual may exceed the supported range even with I4x4 enabled. Change-Id: I25b404fcd9c9e9dbdd77679280968635ee047eb3
* | | | | Reduced memory requirements.Harinarayanan K K2015-06-258-65/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Buffer allocation is based on minimum level required for the input resolution rather than the input max level. Number of maximum context sets can be set to 1 to reduce memory usage. Added a macro ENC_MIN_PU_SIZE for minimum size of inter prediction unit supported by encoder. Changed the maximum constraint on number of MBs for NMB processing to width in Mbs. Change-Id: I5a9255e93935d90c13262681aafc772aedf8ae81
* | | | | Fixed QP lockupsHarinarayanan K K2015-06-252-99/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed QP getting locked up at particluar values even when it is supposed to be changing by ensuring that Qp will have a swing of atleast +-2 from previous value and correcting the Qp translation tables Change-Id: Id6f0fa4f282c288b81cfe278f34957a0fa68ff8c
* | | | | Fixed issues with forcing I and IDR frames.Harinarayanan K K2015-06-253-25/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting I frame interval to 1 caused encoder to go into infinite loop. Fixed that by stopping RC update. Forcing of I and IDR frame did not cause the frames at expected time due to delayed encoding. This is fixed now. Change-Id: Ibf549fb335c053ee33de768455b20e46be3e7c1c
* | | | | Fix string handling for generating version stringsMartin Storsjo2015-06-252-27/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Remove some unused source files and headersMartin Storsjo2015-06-252-287/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They seem to have been included by accident. Nothing includes them or refer to the symbols declared in them. (The other functions declared by the header don't have any matching implementation either.) Change-Id: I1c77a21226613bda0b029dd4ea5da207aa7cae09
* | | | | Remove a duplicate headerMartin Storsjo2015-06-251-101/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ithread.h is already in the common directory. Change-Id: I300fd9c07075e16793e7b645e483663d081ca0cc
* | | | | Don't add -m32/-m64 to the cflagsMartin Storsjo2015-06-254-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the environment already indicates that the compiler targets either x86 or x86_64, we don't need to enforce this by trying to force the compiler to output a specific bitness. Change-Id: Ife6e717e90b4da4edd852dcd66ad92dba70939a2
* | | | | Remove an unused and unnecessary function prototype and associated defineMartin Storsjo2015-06-255-8/+4
| | | | | | | | | | | | | | | | | | | | Change-Id: I61b30d0934715cddd54b66ea3b023b2316a0106f
* | | | | Remove the codec level stride fieldMartin Storsjo2015-06-253-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This field isn't used at the moment at all. The public field ive_ctl_set_dimensions_ip_t.u4_strd is kept to avoid breaking other calling code, although it doesn't have any actual function any longer. Change-Id: Icfc88846fa63f209c67b8e1f8e0cc21bc4ddb73a
* | | | | Always copy data to a local buffer if padding is neededMartin Storsjo2015-06-251-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If horizontal padding is needed, copy the data to avoid having to try to write into the input buffer. If vertical padding is needed, we could get away with only copying the last MB row (as previously was done), but then one extra row of pixels are needed for intra pred. Thus always copy all of the picture, for simplicity, if padding is needed. Change-Id: I6b456a12956120d64e7c6b86d7b571e159f4566b
* | | | | Set the luma/chroma strides depending on source bufferMartin Storsjo2015-06-252-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the data is read directly from the input buffer, set the stride values to those of the input buffer. If the data is copied, set the stride to the value of the local buffer instead. This fixes handling of cases where the input buffer stride is (significantly) larger than the maxwidth of the video. This also effectively makes the parameter ive_ctl_set_dimensions_ip_t.u4_strd useless - nothing needs to know the stride until you actually encode a frame, and at that point, we can either use the stride of the input buffer, or of the local pu1_y_csc_buf_base where the copied content is stored. Change-Id: Icde400b4a0867d25855e621e143454e608748aa3
* | | | | Use a separate field for the chroma strideMartin Storsjo2015-06-255-13/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When both luma and chroma are copied to the local buffer (either due to yuv format conversion, or due to padding), they have got the same stride, but if chroma is copied while luma is used directly from the input buffer, they might have different strides. Therefore add a separate field for chroma stride. This commit only adds the field, while it still has got the same value as before. Change-Id: I0dce97ad4d91cd1d9aba4b4472c6a0de45a314bc
* | | | | armv8: Don't touch the x18 registerMartin Storsjo2015-06-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The x18 register is platform specific, and using it in portable assembler code should be avoided. In this particular case, using it is not actually needed at all. Change-Id: I07016fdd3a264ed77eba37abcd1748b51cf7a49e
* | | | | arm: Properly match /* */ comments in the arm assemblyMartin Storsjo2015-06-258-14/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some versions of the clang built-in assembler interprets /* as a start of a multi-line comment, even within lines starting with a @. Therefore, make sure to terminate these properly. This fixes warnings about /* within a block comment when building using the clang built-in assembler (in some versions of clang), and fixes issues where part of the assembly source was effectively commented out, when building with this assembler. Change-Id: I4b520334d92740f8c60def94ee990561b2cb8b7c
* | | | | Allow using the clang built-in arm assemblerMartin Storsjo2015-06-254-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The arm and armv8 assembly source should now build just fine with clang's built-in assembler. Change-Id: I26d2a74d05e56e6e93457299d4d8ab082368701f
* | | | | armv8: Don't accidentally write 8 bytes instead of 4Martin Storsjo2015-06-252-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes running when built with clang - by pure luck the out of bounds writes didn't cause any harm when the calling C code was built with gcc. Change-Id: I4e33dd403b785cbcd24fb80f4db7a86310a32225
* | | | | arm: Use vqmovun instead of vqshrun #0Martin Storsjo2015-06-251-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | binutils gas automatically produces vqmovun when vqshrun is used with a zero shift. This is required for building the armv8 assembly with the clang built-in assembler. Change-Id: Ie986978e4508a085e4e4c76f8db9a8a8394c4fec
* | | | | arm: Use unified syntax, ldrsheq instead of ldreqshMartin Storsjo2015-06-252-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang only supports the new, unified arm syntax (UAL), while binutils gas supports both (and defaults to the old syntax). Explicitly declare that the unified syntax is used, and use the right form of these instructions that is supported by both. Change-Id: I9a3940e060c129861c7a542ccf09035dbd1766ae
* | | | | armv8: Use the cmn instruction instead of doing cmp with negative valuesMartin Storsjo2015-06-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | binutils gas automatically converts cmp with negative values to use the cmn instruction instead. This is required for building the armv8 assembly with the clang built-in assembler. Change-Id: If6465ea1bec252446c49cf497153e3ef3dad905a
* | | | | armv8: Remove redundant NEON element size declarationsMartin Storsjo2015-06-2512-215/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When specifying one specific lane of the vector, the number of lanes don't need to be specified. The clang built-in assembler doesn't allow the redundant declarations, while binutils gas work fine with both forms. Change-Id: I86077ce0774d4594a1295b6860e4944df87dde2f
* | | | | Handle non-mod-16 widths in the NEON version of 422i->420sp conversionMartin Storsjo2015-06-251-6/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses the same mechanism as in ih264e_fmt_conv_420p_to_420sp_a9q to do an overlapping copy of the last few pixels. Change-Id: Ic93a00d0683337fd0f6f540119000466685f64bd
* | | | | Don't include <sys/time.h> if WINDOWS_TIMER is setMartin Storsjo2015-06-256-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If WINDOWS_TIMER is set, windows.h is supposed to be used instead, and sys/time.h isn't available. This reduces the amount of duplicated include directives in the test apps. Change-Id: I223d80c4ccaed2aab55e3aae66dab903ecacef7a
* | | | | Remove the ithread_exit functionMartin Storsjo2015-06-252-33/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function is dangerous since it behaved differently on different platform implementations. It is not used for any actual purpose, and not currently necessary. Change-Id: I9702e9943065235c7a7b29dc6c6eeb36212e7ce1
* | | | | Remove unnecessary calls to ithread_exitMartin Storsjo2015-06-252-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ithread_exit wrapper function behaves inconsistently across platforms; on windows, the argument is a thread handle, denoting the thread that will be exited. On pthreads, ithread_exit only terminates the current thread, not any other thread. These both calls are at the end of each thread function (and the one with a non-null parameter refers to the handle of the thread itself), so the thread will exit immediately anyway. Change-Id: I21e43c56874729452bd80b28ff351e3c5d3f087e
* | | | | Improved error resilience in decoderHamsalekha S2015-06-258-184/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed buffer management for error cases Fixed end of picture detection logic for multiple slice error cases Fixed handling of incomplete frame, missing slices. Change-Id: Iae447667e4d88869a8bf992180cacd77870b9877
* | | | | Remove unnecessary defines/undefines in the makefilesMartin Storsjo2015-06-259-16/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following defines aren't referenced anywhere in the code base: _LIB MULTICORE APPLY_CONCEALMENT THREAD_QUAD_CORE DISABLE_NEONINTR ARMGCC The DEFAULT_ARCH define isn't used within the encoder at all. The ANDROID define isn't referenced anywhere either, and if necessary, the automatically enabled define __ANDROID__ can be used instead. The defines INSERT_LOGO and LOGO_EN were undefined in the makefiles, but that is unnecessary since nothing actually defines them. The decoder x86_64 makefile also undefined LOGO_EN; an architecture specific makefile shouldn't touch such feature settings, otherwise there's a risk that different builds for different architectures behave significantly differently. Change-Id: I13b86c8bf2feb3a381d904a13f18c3b35f40a575
* | | | | Added support for Main Profile toolsets in encoder.Harinarayanan K K2015-06-2562-2143/+8627
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added support for CABAC entropy coding. Added support for B slices. Fixed an issue in rate control constant QP mode. Change-Id: Ib759d35e8e943f941aa9b8bbff0362d92c619994
* | | | | Moved check for level after check for resolution change.Hamsalekha S2015-06-251-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is required for DRC tests in CTS . Change-Id: Icd0fe10d97c6ee55f8358682a578bddb58590de4
* | | | | Added support for level 52Hamsalekha S2015-06-251-2/+8
| | | | | | | | | | | | | | | | | | | | Change-Id: Ib2fa0b02b408a7bb21b3115e5b1c1317706a7354
* | | | | SSSE3/SSE4 Intrinsics OptimizationsNaveen Kumar Ponnusamy2015-06-258-425/+223
|/ / / / | | | | | | | | | | | | Change-Id: I55c74d9b2a0b323886d8a80eaad899b187c22cd7
* / / / Fixed an overread in YUV420 Semi-planar input usecaseHarish Mahendrakar2015-06-124-3/+58
|/ / / | | | | | | | | | | | | | | | | | | | | | Handled non-multiple of 16 dimensions for 420 semiplanar input Modified test code to remove alignment of width and height Bug: 21586373 Change-Id: I83ff8165364a863d577fcac81e711b07eec9c004
* | | Support levels 5.0 and 5.1 in the encoder properlyMartin Storsjo2015-06-031-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Fix a typo in gas_ih264_lvl_tbl, set proper sizes for level 1.1Martin Storsjo2015-06-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The table values themselves were correct, but the level values were swapped for 1.1 and 1B. This fixes encoding using level 1.1, which previously got the wrong (too small) sizes (corresponding to level 1B). Change-Id: Ic0acc58eb5841710ffd8be54bf97800fdbb40855