diff mbox series

[FFmpeg-devel,1/2] libavfilter/dnn_backend_openvino: Check bbox's height

Message ID 20240402081306.1314398-1-wenbin.chen@intel.com
State Accepted
Commit 8869f5ce864f197f3192c1660124e64da3f26989
Headers show
Series [FFmpeg-devel,1/2] libavfilter/dnn_backend_openvino: Check bbox's height | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Chen, Wenbin April 2, 2024, 8:13 a.m. UTC
From: Wenbin Chen <wenbin.chen@intel.com>

Check bbox's height with frame's height rather than frame's width.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
---
 libavfilter/dnn/dnn_backend_openvino.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c
index 1e2c2404c7..8907bef69b 100644
--- a/libavfilter/dnn/dnn_backend_openvino.c
+++ b/libavfilter/dnn/dnn_backend_openvino.c
@@ -1200,7 +1200,7 @@  static int contain_valid_detection_bbox(AVFrame *frame)
         if (bbox->x < 0 || bbox->w < 0 || bbox->x + bbox->w >= frame->width) {
             return 0;
         }
-        if (bbox->y < 0 || bbox->h < 0 || bbox->y + bbox->h >= frame->width) {
+        if (bbox->y < 0 || bbox->h < 0 || bbox->y + bbox->h >= frame->height) {
             return 0;
         }