Reset Q for key frame when spatial resizing occurs.
Reset Q for key frame when spatial resizing occurs.

The logic for spatial resizing is done after the Q is selected for the
frame. This causes a problem that the Q we select for the (resized)
key frame may be based on a different resolution than the frame we
will encode.

This fix is to ensure that, when resize is on, the selected Q is still
based on the resolution of the frame to be encoded.

Change-Id: Ia49a9eac5f64e48d1c00dfc7ed4ce26fe84d3fa1

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