Skip mode search based on reference frame consistency
Skip mode search based on reference frame consistency

This commit enables the encoder to skip NEARMV and ZEROMV if the
above and left blocks have identical reference frame, and the
current reference is different from that. It reduces the runtime
of speed 3 for test sequences:
bus cif at 1000 kbps 10064 ms -> 9823 ms
pedestrian 1080p at 2000 kbps 193078 ms -> 189559 ms

The compression performance is changed by
derf  -0.085%
stdhd -0.103%

Change-Id: If304f26d42e6412152a84c3dd7b02635c38444f4

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