Simplify & fix potential bug in rd_pick_partition
Simplify & fix potential bug in rd_pick_partition

Different partitionings were not being evaluated against
best_rd and there were unnecessary calls to RDCOST. This
could have resulted in a non-optimal partioning being
selected.

I simplified the variables used to track the rate,
distortion and RD values throughout the function.

Change-Id: Ifa7085ee80d824e86791432a5bc6d8fea5a3e313

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