Adding update_tx_ct function, removing duplicated code.
Adding update_tx_ct function, removing duplicated code.

Change-Id: I8882fe3cd247a5a8304ab8ab2ee9abdb92830133

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