Fix rate allocation bug.
Fix rate allocation bug.

Fix miss alignment of the frames contributing to the
error score and bit allocation for gf/arf groups.

Initial results slightly +.

Change-Id: Ie508bdcfdac52e592d48e1f13e01b3551b523deb

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