New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Mpeg7 inconsistent signature comp result #4
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for squash+merge! Had a minor suggestion (and tested it works similar to memset on my machine)
|
@oscar-davids Mind dropping 1da1787 (a version of this is already included in the |
d79afe1
to
1da1787
Compare
|
A few additional minor Git related comments in the interest of maintaining a cleaner + easier to follow commit history:
|
61bd083
to
f2f49a4
Compare
1fdf06e
to
2dc2b11
Compare
In close_output(), a dummy frame is created with format NONE passed to enc_open(), which isn't prepared for it. The NULL pointer dereference happened at av_pix_fmt_desc_get(enc_ctx->pix_fmt)->comp[0].depth. When fgt.graph is NULL, skip fg_output_frame() since there is nothing to output. frame #0: 0x0000005555bc34a4 ffmpeg_g`enc_open(opaque=0xb400007efe2db690, frame=0xb400007efe2d9f70) at ffmpeg_enc.c:235:44 frame livepeer#1: 0x0000005555bef250 ffmpeg_g`enc_open(sch=0xb400007dde2d4090, enc=0xb400007e4e2daad0, frame=0xb400007efe2d9f70) at ffmpeg_sched.c:1462:11 frame livepeer#2: 0x0000005555bee094 ffmpeg_g`send_to_enc(sch=0xb400007dde2d4090, enc=0xb400007e4e2daad0, frame=0xb400007efe2d9f70) at ffmpeg_sched.c:1571:19 frame livepeer#3: 0x0000005555bee01c ffmpeg_g`sch_filter_send(sch=0xb400007dde2d4090, fg_idx=0, out_idx=0, frame=0xb400007efe2d9f70) at ffmpeg_sched.c:2154:12 frame livepeer#4: 0x0000005555bcf124 ffmpeg_g`close_output(ofp=0xb400007e4e2d85b0, fgt=0x0000007d1790eb08) at ffmpeg_filter.c:2225:15 frame livepeer#5: 0x0000005555bcb000 ffmpeg_g`fg_output_frame(ofp=0xb400007e4e2d85b0, fgt=0x0000007d1790eb08, frame=0x0000000000000000) at ffmpeg_filter.c:2317:16 frame livepeer#6: 0x0000005555bc7e48 ffmpeg_g`filter_thread(arg=0xb400007eae2ce7a0) at ffmpeg_filter.c:2836:15 frame livepeer#7: 0x0000005555bee568 ffmpeg_g`task_wrapper(arg=0xb400007d8e2db478) at ffmpeg_sched.c:2200:21 Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Motivation
Sometimes, the detection result of whether two videos match is inconsistent.
Why
I am sure that there was a bug in the calculation of compare two signature values.
In here, 2 * HOUGH_MAX_OFFSET + 1 hspace_elem structure array are created but initialized only HOUGH_MAX_OFFSET elements.
In the calculation of compare, used more array elements than HOUGH_MAX_OFFSET.
Testing
The signature compare result is always the same.
ffmpeg -i test_cpu/test_cpu_P720p30fps16x9_2_0_15.ts -i test_gpu/test_gpu_P720p30fps16x9_2_0_15.ts -filter_complex "[0:v][1:v] signature=nb_inputs=2:detectmode=full" -map :v -f null -