Minor refactoring of RD cost functions.
Minor refactoring of RD cost functions.

Change-Id: I876955b1d577321b5cd3f71e3fb2c4083ad5111b

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