[Encode] VP9 Encode Replace Recon Surface to be Variant

[Encode] VP9 Encode Replace Recon Surface to be Variant
This change will enable handling of recon surfaces to be variant format and resolution adjustment

Change-Id: If13736ed9a6a2aa8975e283d97ed4bde5cae42cc
diff --git a/media_driver/linux/common/codec/ddi/media_ddi_encode_vp9.cpp b/media_driver/linux/common/codec/ddi/media_ddi_encode_vp9.cpp
index 9474cd6..a103cee 100644
--- a/media_driver/linux/common/codec/ddi/media_ddi_encode_vp9.cpp
+++ b/media_driver/linux/common/codec/ddi/media_ddi_encode_vp9.cpp
@@ -651,6 +651,12 @@
     DDI_CODEC_RENDER_TARGET_TABLE *rtTbl = &(m_encodeCtx->RTtbl);
 
     auto recon = DdiMedia_GetSurfaceFromVASurfaceID(mediaCtx, picParam->reconstructed_frame);
+    if(m_encodeCtx->vaProfile == VAProfileVP9Profile1
+       ||m_encodeCtx->vaProfile == VAProfileVP9Profile2
+       ||m_encodeCtx->vaProfile == VAProfileVP9Profile3)
+    {
+        recon = DdiMedia_ReplaceSurfaceWithVariant(recon, m_encodeCtx->vaEntrypoint);
+    }
     DDI_CHK_RET(RegisterRTSurfaces(rtTbl, recon),"RegisterRTSurfaces failed!");
 
     SetupCodecPicture(mediaCtx, rtTbl, &vp9PicParam->CurrReconstructedPic,