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
1 file changed