提交 a001aec1 编写于 作者: B BohaoWu 提交者: BohaoWu

Add pre-commit.

上级 a832f4bf
......@@ -35,7 +35,8 @@ std::shared_ptr<OpContext> Resize::operator()(
percent = static_cast<float>(_max_size) / static_cast<float>(im_max_size);
}
resized_width = static_cast<int>(round(input->nppi_size().width * percent));
resized_height = static_cast<int>(round(input->nppi_size().height * percent));
resized_height =
static_cast<int>(round(input->nppi_size().height * percent));
}
auto output = std::make_shared<OpContext>(resized_height, resized_width);
auto ret = resize_linear(input->p_frame(),
......
......@@ -14,8 +14,8 @@
#include <npp.h>
#include "core/preprocess/hwvideoframe/include/utils.h"
#include "core/preprocess/hwvideoframe/include/rgb_swap.h"
#include "core/preprocess/hwvideoframe/include/utils.h"
const int SwapChannel::_ORDER[CHANNEL_SIZE] = {2, 1, 0};
......
......@@ -82,7 +82,7 @@ class ExtractFrameJpeg : public ExtractFrameBase {
int jpeg_encode(uint8_t* p_image,
int width,
int height,
FrameResult &result);
const FrameResult& result);
nvjpegHandle_t _nv_jpeg_handler;
nvjpegEncoderState_t _nv_enc_state;
nvjpegEncoderParams_t _nv_enc_params;
......
......@@ -21,6 +21,7 @@ from paddle_serving_app.reader import Sequential, Resize, File2Image
import libgpupreprocess as pp
import libhwextract
class TestOperators(unittest.TestCase):
"""
test all operators, e.g. Div, Normalize
......@@ -172,5 +173,6 @@ class TestOperators(unittest.TestCase):
item.free_memory()
# have to release memor
if __name__ == '__main__':
unittest.main()
......@@ -11,5 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# pylint: disable=doc-string-missing
from .arr2image import Arr2Image
\ No newline at end of file
from .arr2image import Arr2Image
......@@ -40,13 +40,14 @@ max_version, mid_version, min_version = python_version()
if '${PACK}' == 'ON':
copy_lib()
os.system('mkdir -p ./paddle_serving_app/reader/lib')
os.system('cp -a -f ../core/preprocess/hwvideoframe/libgpupreprocess.so ./paddle_serving_app/reader')
os.system('cp -a -f ../core/preprocess/nvdec-extractframe/libhwextract.so ./paddle_serving_app/reader')
os.system('cp -a -f ../core/preprocess/hwvideoframe/cuda/libgpu.so ./paddle_serving_app/reader/lib')
os.system('cp -a -f ../core/preprocess/nvdec-extractframe/cuda/libhwgpu.so ./paddle_serving_app/reader/lib')
os.system('cp -a -f ../../core/preprocess/nvdec-extractframe/lib/* ./paddle_serving_app/reader/lib')
os.system('export LD_LIBRARY_PATH="./paddle_serving_app/reader/lib"')
if os.path.exists(../core/preprocess/hwvideoframe/libgpupreprocess.so):
os.system('mkdir ./paddle_serving_app/reader/lib')
os.system('cp ../core/preprocess/hwvideoframe/libgpupreprocess.so ./paddle_serving_app/reader')
os.system('cp ../core/preprocess/nvdec-extractframe/libhwextract.so ./paddle_serving_app/reader')
os.system('cp ../core/preprocess/hwvideoframe/cuda/libgpu.so ./paddle_serving_app/reader/lib')
os.system('cp ../core/preprocess/nvdec-extractframe/cuda/libhwgpu.so ./paddle_serving_app/reader/lib')
os.system('cp -a -i ../../core/preprocess/nvdec-extractframe/lib/* ./paddle_serving_app/reader/lib')
os.system('export LD_LIBRARY_PATH="./paddle_serving_app/reader/lib"')
REQUIRED_PACKAGES = [
'six >= 1.10.0', 'sentencepiece', 'opencv-python<=4.2.0.32', 'pillow',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册