Commit graph

41 commits

Author SHA1 Message Date
Android Build Merger (Role)
1f7f247c05 [automerger] Encoder: Return error for odd resolution am: 9fa58d4db3 am: f56e0c0ed3 am: db53adff11 am: 538e4ed787 am: c8fc4c0206 am: 2e1c177836 am: 353851c307 am: 207d68137f am: 0bc2eef47a
Change-Id: I297abfd8a036563e093bdb3100ff7cee48f228c2
2018-04-14 18:39:01 +00:00
Android Build Merger (Role)
2e1c177836 [automerger] Encoder: Return error for odd resolution am: 9fa58d4db3 am: f56e0c0ed3 am: db53adff11 am: 538e4ed787 am: c8fc4c0206
Change-Id: Iafdb9ee561ac366c63959b5b392e37fe81771a9f
2018-04-14 18:38:56 +00:00
Android Build Merger (Role)
c8fc4c0206 [automerger] Encoder: Return error for odd resolution am: 9fa58d4db3 am: f56e0c0ed3 am: db53adff11 am: 538e4ed787
Change-Id: I58ab8312cb0a5a4bd85eedb2ff55f2c82fa5e79d
2018-04-14 18:38:55 +00:00
Android Build Merger (Role)
f56e0c0ed3 [automerger] Encoder: Return error for odd resolution am: 9fa58d4db3
Change-Id: I4b71af182f1d2be051bc831dfe134b4c012048af
2018-04-14 18:38:50 +00:00
Akshata Jadhav
9fa58d4db3 Encoder: Return error for odd resolution
Bug: 73625898
Test: ran POC before/after under ASAN
Change-Id: I9765b57f4afc6a2b6ad9cd19c8c7c5000beb9de9
2018-02-28 15:36:46 -08:00
Ray Essick
fef5e9e203 Merge "Encoder: Defined structures for accessing MB header data"
am: 8aa140b8a5

Change-Id: Ib3e9cad8eb8ddbd5c941ff4d4c96a12e0f309831
2016-11-29 14:33:27 +00:00
Harish Mahendrakar
c7d9c91417 Encoder: Defined structures for accessing MB header data
Instead of using hard coded address offsets,
defined structures to access MB Header for each MB type
This improves readability of the code

Also helps in maintaining required alignment for MV
MV elements need to be aligned to 2 byte boundary
Unaligned accesses result in undefined behavior

Bug: 33073518
Test: Tested with -fsanitize=alignment enabled on avcenc
Change-Id: I51c009b7deded76315a4bf2880444d21ae7d517f
2016-11-24 12:25:49 +05:30
Doney Alex
983e1aecd4 Encoder: Added support for configuring VUI parameters.
Bug: 27442922

Change-Id: I781195e78c480e7449f49467abb1df71902e568d
2016-07-12 14:41:59 -07:00
Doney Alex
dfe686ad4a DO NOT MERGE Encoder: Added support for Constrained intra prediction.
Change-Id: I674746047b2b007ca4bc52fad1a2cd9b177cd7bb
2016-03-11 22:10:12 +00:00
Doney Alex
62ce412f74 Encoder: Added support for Constrained intra prediction. am: 8668fbcc97
am: e0f8b95f0c

* commit 'e0f8b95f0c':
  Encoder: Added support for Constrained intra prediction.
2016-02-26 15:30:14 +00:00
Doney Alex
8668fbcc97 Encoder: Added support for Constrained intra prediction.
Change-Id: I674746047b2b007ca4bc52fad1a2cd9b177cd7bb
2016-02-24 16:12:19 +05:30
Harish Mahendrakar
089f41d1f5 Encoder: Fixed an out of bound write in AIR map
pu2_intr_rfrsh_map was initialized with a wrong pointer which was
resulting in an out of bound write.
This was resulting in inconsistent output between runs when AIR was
enabled

Bug: 27076302

Change-Id: I1f36936837e3cb221ff218c3c6e7b8b20a0e26a7
2016-02-10 10:23:36 -08:00
Hamsalekha S
126d84e0d3 Encoder added support for VUI params
SPS will now include vui params
Removed a trailing space in ih264e_api.c

Change-Id: I67a57741689206e571e9a83f7e3360149f87e06a
2015-10-09 11:35:29 -07:00
Hamsalekha S
4202606c70 Encoder added support for VUI params
SPS will now include vui params
Removed a trailing space in ih264e_api.c

Change-Id: I67a57741689206e571e9a83f7e3360149f87e06a
2015-08-04 11:27:29 +05:30
Martin Storsjo
33134b2617 Validate the u4_entropy_coding_mode field
Previously, if this field wasn't set, the invalid coding mode
could lead to crashes later.

Bug: 22860270

Change-Id: If8dd2f8d5f2fbdd6bb76772344f959df23159167
2015-07-31 18:51:00 +00:00
Martin Storsjo
b0aadd0c45 Remove the now unused stride field from the set dimensions struct
Since 90a3904fd3 and d020be5ac7, this field doesn't have any actual
effect - the strides are taken from the input pictures.

Bug: 22860270

Change-Id: I9b08cbf8ee558e038d0017a6176d7b3bd3c428bd
2015-07-31 18:48:14 +00:00
Martin Storsjo
5696adb5ec Validate the u4_entropy_coding_mode field
Previously, if this field wasn't set, the invalid coding mode
could lead to crashes later.

Change-Id: If8dd2f8d5f2fbdd6bb76772344f959df23159167
2015-07-28 18:52:05 +00:00
Martin Storsjo
18e256879b Remove the now unused stride field from the set dimensions struct
Since 90a3904fd3 and d020be5ac7, this field doesn't have any actual
effect - the strides are taken from the input pictures.

Change-Id: I9b08cbf8ee558e038d0017a6176d7b3bd3c428bd
2015-06-27 09:28:24 +03:00
Martin Storsjo
086dd8ea90 Don't declare variables after statements
This fixes building with compilers that are strict about the pre-C99
rule about having all variable declarations before statements.

Change-Id: I06dd0cc42a6dbe90025c3c913a0c8d9ffb0acbcb
2015-06-25 08:25:58 -07:00
Martin Storsjo
5ae9fc7e9d 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-25 08:25:57 -07:00
Martin Storsjo
b5a707eee3 Allow setting profile IV_PROFILE_MAIN
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.
2015-06-25 08:25:55 -07:00
Harinarayanan K K
205e6fe110 Added check for minimum output buffer size.
Changed macro specifying the minimum size required for output buffer.

Added an error check on the size allocated for output buffer.

Change-Id: I98e4f46e62ffc974df760f2633689de079ca3e5e
2015-06-25 08:25:55 -07:00
Harinarayanan K K
7dbacdf765 Added code to handle cases with qp less than 10
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
2015-06-25 08:25:54 -07:00
Harinarayanan K K
d3e18f0c88 Reduced memory requirements.
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
2015-06-25 08:25:54 -07:00
Martin Storsjo
ce7f41973c Remove the codec level stride field
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
2015-06-25 08:25:50 -07:00
Harinarayanan K K
3749f6f435 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-25 08:25:43 -07:00
Martin Storsjo
cc87241e79 Don't declare variables after statements
This fixes building with compilers that are strict about the pre-C99
rule about having all variable declarations before statements.

Change-Id: I06dd0cc42a6dbe90025c3c913a0c8d9ffb0acbcb
2015-06-25 13:29:52 +03:00
Martin Storsjo
517e0627ef Allow setting profile IV_PROFILE_MAIN
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.
2015-06-24 21:06:22 +00:00
Harinarayanan K K
d2d469e520 Added check for minimum output buffer size.
Changed macro specifying the minimum size required for output buffer.

Added an error check on the size allocated for output buffer.

Change-Id: I98e4f46e62ffc974df760f2633689de079ca3e5e
2015-06-24 21:05:34 +00:00
Harinarayanan K K
8588303afa Added code to handle cases with qp less than 10
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
2015-06-24 21:04:58 +00:00
Harinarayanan K K
6cb6772805 Reduced memory requirements.
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
2015-06-24 21:04:04 +00:00
Martin Storsjo
d020be5ac7 Remove the codec level stride field
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
2015-06-24 20:54:45 +00:00
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
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
Harish Mahendrakar
cf91c87b25 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

Bug: 21586373
Change-Id: I83ff8165364a863d577fcac81e711b07eec9c004
2015-06-12 18:34:16 -07: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
ac97f28bb6 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-06-03 08:37:00 -07: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
Lajos Molnar
a2b49e5f05 fix file permissions
Change-Id: Ia4f99d5b963acd8d8a1afc2fbdf06b122d898f63
2015-05-05 17:51:34 +00:00
Lajos Molnar
cd9e51fc2b fix file permissions
Change-Id: Ia4f99d5b963acd8d8a1afc2fbdf06b122d898f63
2015-05-05 17:34:51 +00:00
Hamsalekha S
8d3d303c79 Initial version
Change-Id: I7efe9a589cd24edf86e8d086b40c27cbbf8b4017
2015-04-02 15:59:02 +05:30