Refactor the non-RD partition decision process
Refactor the non-RD partition decision process

Combine the common variables and functions used by different
speed features.

Change-Id: Ifd1fa86200edbcc9e50b3fc3b1ba8a275bc3c17f

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