Refactor encode_sb_ for 4x8/8x4 partition
Refactor encode_sb_ for 4x8/8x4 partition

Deprecate set_block_index. Replace it with get_sb_index_ for
consistency with partition search and bit-stream writing/reading.

Use b_width/height_log2 instead of mi_width/height_log2, to support
4x4 resolution partition types.

Change-Id: Ic1e71981e163c669f7ea6b3c12b831c284c4a494

kleopatra999/webm.libvpx,ittiamvpx/libvpx,ShiftMediaProject/libvpx,jacklicn/webm.libvpx,smarter/aom,jacklicn/webm.libvpx,pcwalton/libvpx,Maria1099/webm.libvpx,turbulenz/libvpx,matanbs/webm.libvpx,sanyaade-teachings/libvpx,stewnorriss/libvpx,running770/libvpx,ittiamvpx/libvpx,kim42083/webm.libvpx,Topopiccione/libvpx,gshORTON/webm.libvpx,ittiamvpx/libvpx-1,liqianggao/libvpx,kim42083/webm.libvpx,n4t/libvpx,mbebenita/aom,matanbs/webm.libvpx,cinema6/libvpx,openpeer/libvpx_new,jdm/libvpx,Laknot/libvpx,jdm/libvpx,liqianggao/libvpx,cinema6/libvpx,mbebenita/aom,kleopatra999/webm.libvpx,hsueceumd/test_hui,ittiamvpx/libvpx-1,sanyaade-teachings/libvpx,jdm/libvpx,lyx2014/libvpx_c,running770/libvpx,reimaginemedia/webm.libvpx,webmproject/libvpx,iniwf/webm.libvpx,ittiamvpx/libvpx,ShiftMediaProject/libvpx,jacklicn/webm.libvpx,felipebetancur/libvpx,Acidburn0zzz/webm.libvpx,abwiz0086/webm.libvpx,kim42083/webm.libvpx,jmvalin/aom,Suvarna1488/webm.libvpx,zofuthan/libvpx,jmvalin/aom,liqianggao/libvpx,hsueceumd/test_hui,sanyaade-teachings/libvpx,shacklettbp/aom,shyamalschandra/libvpx,GrokImageCompression/aom,altogother/webm.libvpx,Topopiccione/libvpx,n4t/libvpx,VTCSecureLLC/libvpx,smarter/aom,reimaginemedia/webm.libvpx,matanbs/webm.libvpx,Topopiccione/libvpx,altogother/webm.libvpx,pcwalton/libvpx,Acidburn0zzz/webm.libvpx,GrokImageCompression/aom,kleopatra999/webm.libvpx,goodleixiao/vpx,hsueceumd/test_hui,mbebenita/aom,turbulenz/libvpx,luctrudeau/aom,charup/https---github.com-webmproject-libvpx-,thdav/aom,stewnorriss/libvpx,matanbs/webm.libvpx,webmproject/libvpx,zofuthan/libvpx,mwgoldsmith/libvpx,mwgoldsmith/vpx,altogother/webm.libvpx,shacklettbp/aom,iniwf/webm.libvpx,openpeer/libvpx_new,webmproject/libvpx,matanbs/webm.libvpx,shyamalschandra/libvpx,ittiamvpx/libvpx-1,Maria1099/webm.libvpx,gshORTON/webm.libvpx,matanbs/vp982,felipebetancur/libvpx,shyamalschandra/libvpx,mbebenita/aom,Suvarna1488/webm.libvpx,Laknot/libvpx,reimaginemedia/webm.libvpx,kleopatra999/webm.libvpx,reimaginemedia/webm.libvpx,sanyaade-teachings/libvpx,ittiamvpx/libvpx-1,ittiamvpx/libvpx-1,Distrotech/libvpx,ShiftMediaProject/libvpx,mbebenita/aom,jmvalin/aom,felipebetancur/libvpx,hsueceumd/test_hui,Suvarna1488/webm.libvpx,mwgoldsmith/vpx,n4t/libvpx,mwgoldsmith/libvpx,kalli123/webm.libvpx,ittiamvpx/libvpx,WebRTC-Labs/libvpx,running770/libvpx,luctrudeau/aom,Distrotech/libvpx,WebRTC-Labs/libvpx,VTCSecureLLC/libvpx,Distrotech/libvpx,shacklettbp/aom,abwiz0086/webm.libvpx,turbulenz/libvpx,mbebenita/aom,sanyaade-teachings/libvpx,cinema6/libvpx,VTCSecureLLC/libvpx,shareefalis/libvpx,turbulenz/libvpx,luctrudeau/aom,gshORTON/webm.libvpx,abwiz0086/webm.libvpx,abwiz0086/webm.libvpx,Maria1099/webm.libvpx,matanbs/vp982,gshORTON/webm.libvpx,jdm/libvpx,smarter/aom,thdav/aom,kleopatra999/webm.libvpx,kim42083/webm.libvpx,matanbs/vp982,mwgoldsmith/vpx,Distrotech/libvpx,lyx2014/libvpx_c,felipebetancur/libvpx,cinema6/libvpx,kalli123/webm.libvpx,turbulenz/libvpx,ittiamvpx/libvpx,webmproject/libvpx,goodleixiao/vpx,smarter/aom,turbulenz/libvpx,webmproject/libvpx,shyamalschandra/libvpx,jdm/libvpx,Distrotech/libvpx,zofuthan/libvpx,charup/https---github.com-webmproject-libvpx-,jdm/libvpx,abwiz0086/webm.libvpx,reimaginemedia/webm.libvpx,iniwf/webm.libvpx,Topopiccione/libvpx,jmvalin/aom,Suvarna1488/webm.libvpx,Distrotech/libvpx,mwgoldsmith/libvpx,GrokImageCompression/aom,stewnorriss/libvpx,openpeer/libvpx_new,reimaginemedia/webm.libvpx,webmproject/libvpx,liqianggao/libvpx,thdav/aom,zofuthan/libvpx,thdav/aom,smarter/aom,matanbs/vp982,kalli123/webm.libvpx,liqianggao/libvpx,mwgoldsmith/libvpx,smarter/aom,cinema6/libvpx,goodleixiao/vpx,thdav/aom,kleopatra999/webm.libvpx,jacklicn/webm.libvpx,hsueceumd/test_hui,gshORTON/webm.libvpx,matanbs/vp982,mwgoldsmith/libvpx,WebRTC-Labs/libvpx,mbebenita/aom,iniwf/webm.libvpx,VTCSecureLLC/libvpx,shyamalschandra/libvpx,jmvalin/aom,n4t/libvpx,goodleixiao/vpx,jmvalin/aom,shareefalis/libvpx,kalli123/webm.libvpx,stewnorriss/libvpx,luctrudeau/aom,kim42083/webm.libvpx,openpeer/libvpx_new,pcwalton/libvpx,iniwf/webm.libvpx,goodleixiao/vpx,shacklettbp/aom,shareefalis/libvpx,charup/https---github.com-webmproject-libvpx-,cinema6/libvpx,openpeer/libvpx_new,Maria1099/webm.libvpx,matanbs/vp982,Laknot/libvpx,running770/libvpx,kalli123/webm.libvpx,VTCSecureLLC/libvpx,running770/libvpx,Laknot/libvpx,mbebenita/aom,felipebetancur/libvpx,felipebetancur/libvpx,matanbs/webm.libvpx,Maria1099/webm.libvpx,turbulenz/libvpx,charup/https---github.com-webmproject-libvpx-,ShiftMediaProject/libvpx,lyx2014/libvpx_c,altogother/webm.libvpx,jacklicn/webm.libvpx,shyamalschandra/libvpx,VTCSecureLLC/libvpx,charup/https---github.com-webmproject-libvpx-,Acidburn0zzz/webm.libvpx,mbebenita/aom,mwgoldsmith/libvpx,lyx2014/libvpx_c,WebRTC-Labs/libvpx,Topopiccione/libvpx,iniwf/webm.libvpx,luctrudeau/aom,stewnorriss/libvpx,jacklicn/webm.libvpx,ittiamvpx/libvpx-1,liqianggao/libvpx,mwgoldsmith/vpx,gshORTON/webm.libvpx,shareefalis/libvpx,zofuthan/libvpx,goodleixiao/vpx,ittiamvpx/libvpx,WebRTC-Labs/libvpx,abwiz0086/webm.libvpx,shacklettbp/aom,stewnorriss/libvpx,hsueceumd/test_hui,openpeer/libvpx_new,zofuthan/libvpx,Topopiccione/libvpx,turbulenz/libvpx,thdav/aom,luctrudeau/aom,pcwalton/libvpx,mwgoldsmith/vpx,Suvarna1488/webm.libvpx,pcwalton/libvpx,GrokImageCompression/aom,running770/libvpx,shareefalis/libvpx,shacklettbp/aom,lyx2014/libvpx_c,charup/https---github.com-webmproject-libvpx-,lyx2014/libvpx_c,ShiftMediaProject/libvpx,Suvarna1488/webm.libvpx,Acidburn0zzz/webm.libvpx,turbulenz/libvpx,kim42083/webm.libvpx,GrokImageCompression/aom,Laknot/libvpx,Laknot/libvpx,shareefalis/libvpx,altogother/webm.libvpx,Acidburn0zzz/webm.libvpx,kalli123/webm.libvpx,mwgoldsmith/vpx,Acidburn0zzz/webm.libvpx,pcwalton/libvpx,GrokImageCompression/aom,cinema6/libvpx,n4t/libvpx,matanbs/vp982,altogother/webm.libvpx,Maria1099/webm.libvpx