get_ref_frame: fix test for valid buffer.
get_ref_frame: fix test for valid buffer.

In the current implementation of the encoder,
frame buffers may come from the wider set of
12 such buffers, and is not restricted to the
8 allowed as reference frames. This is only
an implementation detail and does not affect
the constraint of having a total of 8 reference
buffers overall.

Change-Id: I075f777146c2df49c275d89232933f8127235175

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