Early termination after partition NONE is done in RD.
Early termination after partition NONE is done in RD.

This patch allows the encoder to skip the search for partition
SPLIT, HORZ, VERT after the search for partition NONE is done
in RD optimization. It uses the first pass block-wise statistics
to make the decision. If all 16x16 blocks in the current partition
have zero motions and small residues from the frist pass statistics,
and it has small difference variance, further partition search is
skipped.

For speed 2 setting, experiments on general youtube clips show that
the speedup varies from 1% - 10%, 5% on average. On the performance
side in PSNR, derf 0.004%, yt -0.059%, hd -0.106%, stdhd 0.032%.

For hard stdhd clips:
park_joy_1080p, 502952 ms -> 503307 ms (-0.07%)
pedestrian_area_1080p, 227049 ms -> 220531 ms (+3%)

This feature is under the compilation flag CONFIG_FP_MB_STATS and
it is off in current setting.

Change-Id: I554537e9242178263b65ebe14a04f9c221b58bae

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