[Media Decode] dont reduce the slice number when app layer destroy SliceDataBuffer sometimes, app call vaDestoryBuffer for VASliceDataBufferType in middle of one frame execution. for example: there are two VASliceDataBufferType for one frame. after first VASliceDataBufferType was created. then destroy one VASliceDataBufferType of last frame , then create second slice for current frame, it will cause problem. the rootcause is :media driver try to optimize the bistream combination, so it allocate one buffer for mulitple slice data. then these slice data just get the offset and were filled into one bistream buffer. this method reduce one combination copy. Signed-off-by: Carl Zhang <carl.zhang@intel.com>
diff --git a/media_driver/linux/common/ddi/media_libva.cpp b/media_driver/linux/common/ddi/media_libva.cpp index 397e737..9917cdd 100755 --- a/media_driver/linux/common/ddi/media_libva.cpp +++ b/media_driver/linux/common/ddi/media_libva.cpp
@@ -280,11 +280,7 @@ } return false; } - else - { - if (bufMgr->dwNumSliceData) - bufMgr->dwNumSliceData--; - } + return true; }
diff --git a/media_softlet/linux/common/codec/ddi/dec/ddi_decode_functions.cpp b/media_softlet/linux/common/codec/ddi/dec/ddi_decode_functions.cpp index 23fe5ba..7993f69 100644 --- a/media_softlet/linux/common/codec/ddi/dec/ddi_decode_functions.cpp +++ b/media_softlet/linux/common/codec/ddi/dec/ddi_decode_functions.cpp
@@ -1383,11 +1383,7 @@ } return false; } - else - { - if (bufMgr->dwNumSliceData) - bufMgr->dwNumSliceData--; - } + return true; }