Fix crash in pick_inter_mode_sb().
Fix crash in pick_inter_mode_sb().

It didn't handle rd_thresh == INT_MAX, which means the reference is
unavailable.

Change-Id: Ie6fa8b2577437411db81a8c24e8dcdfd856a0e8d

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