Check the width/height and adjust level used for RC

Since 6cb6772805, the actual level used is
MAX(u4_max_level, ih264e_get_min_level()), which means that it isn't
a fatal error to set u4_max_level to a too low level (if the caller
doesn't know or care). Despite this, the actual value set by the caller
was still used for initializing the RC.

This allows the caller to not have to set u4_max_level (currently
every caller has to duplicate a table or code snippet for determining
the right level for each resolution). The caller still can set it
to a higher value if he wants to explicitly use a higher level than
what is necessary.

This makes sure that the output is identical even if u4_max_level is
set too low.

Change-Id: Icdc6c0652a97568d1eafc050226357a9d643d809
diff --git a/encoder/ih264e_utils.c b/encoder/ih264e_utils.c
index 2e5b812..8623949 100644
--- a/encoder/ih264e_utils.c
+++ b/encoder/ih264e_utils.c
@@ -1330,7 +1330,8 @@
                        ps_codec->s_cfg.u4_num_bframes + 1, au1_init_qp,
                        ps_codec->s_cfg.u4_num_bframes + 2 , au1_min_max_qp,
-                       ps_codec->s_cfg.u4_max_level);
+                       MAX(ps_codec->s_cfg.u4_max_level,
+                               (UWORD32)ih264e_get_min_level(ps_codec->s_cfg.u4_max_wd, ps_codec->s_cfg.u4_max_ht)));
     /* recon stride */