Squashed commit of the following:

commit 35200646a7a01af51d3d77268f843e787825779e
Author: sijchen <sijchen@cisco.com>
Date:   Thu Jan 2 09:29:54 2014 +0800

    reformatting and remove the unnecessary case

commit 98bc89a717563a1c406b57eeddc3065046ed4567
Author: sijchen <sijchen@cisco.com>
Date:   Tue Dec 31 14:28:33 2013 +0800

    reformat and correct the static_cast

commit 96a18395bca8bf452cf931e54f95add5dd8818f1
Author: sijchen <sijchen@cisco.com>
Date:   Tue Dec 31 13:57:48 2013 +0800

    modify the type and line length

commit ccd1b4249432a9e5fcf6586a848a1304fff51ddd
Author: sijchen <sijchen@cisco.com>
Date:   Tue Dec 31 10:19:15 2013 +0800

    modify the encoder interface

    modify the encoder interface to support the bit rate setting