diff options
author | Harinarayanan K K <harinarayanan.kk@ittiam.com> | 2015-06-19 11:39:42 +0530 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2015-06-25 08:25:54 -0700 |
commit | 7dbacdf7651457dfc6244ed96b797e93a6944680 (patch) | |
tree | ae3c6f5666eabf4b98f88bd15a5c680d0ff38117 /encoder/ih264e_api.c | |
parent | d3e18f0c8854c258021be1e603d8f50a241698a7 (diff) | |
download | android_external_libavc-7dbacdf7651457dfc6244ed96b797e93a6944680.tar.gz android_external_libavc-7dbacdf7651457dfc6244ed96b797e93a6944680.tar.bz2 android_external_libavc-7dbacdf7651457dfc6244ed96b797e93a6944680.zip |
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
Diffstat (limited to 'encoder/ih264e_api.c')
-rw-r--r-- | encoder/ih264e_api.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/encoder/ih264e_api.c b/encoder/ih264e_api.c index a8de1ec..1cb2ff6 100644 --- a/encoder/ih264e_api.c +++ b/encoder/ih264e_api.c @@ -1561,7 +1561,11 @@ static IV_STATUS_T api_check_struct_sanity(iv_obj_t *ps_handle, return IV_FAIL; } - if ((ps_ip->s_ive_ip.u4_i_qp_min > ps_ip->s_ive_ip.u4_i_qp_max) + /* We donot support QP < 4 */ + if ((ps_ip->s_ive_ip.u4_i_qp_min < 4) + || (ps_ip->s_ive_ip.u4_p_qp_min < 4) + || (ps_ip->s_ive_ip.u4_b_qp_min < 4) + || (ps_ip->s_ive_ip.u4_i_qp_min > ps_ip->s_ive_ip.u4_i_qp_max) || (ps_ip->s_ive_ip.u4_p_qp_min > ps_ip->s_ive_ip.u4_p_qp_max) || (ps_ip->s_ive_ip.u4_b_qp_min > ps_ip->s_ive_ip.u4_b_qp_max)) { |