Skip to content

libvmaf crashes for input video dimensions < 32 pixels on a side #1035

Description

@tdaede
$ ffmpeg -f lavfi -i testsrc -t 1 -pix_fmt yuv420p -vf scale=16x16 test_16x16.y4m
$ libvmaf/build/tools/vmaf -r test_16x16.y4m -d test_16x16.y4m 
VMAF version dfe183cd
1 frame  ⢀⠀ 0.00 FPSSegmentation fault (core dumped)

Full backtrace:

#0  0x0000000000426e29 in dwt2_src_indices_filt (src_ind_y=0x61d938, src_ind_x=0x61d958, w=2, h=2) at ../src/feature/integer_adm.c:587
        ind0 = 152559
        ind1 = 152560
        ind2 = 152561
        ind3 = 152562
        h_half = 1
        w_half = 1
        i = 76280
        j = 1
#1  0x00000000004365f6 in integer_compute_adm (s=0x61d900, ref_pic=0x7fffffff8f00, dis_pic=0x7fffffff8f60, score=0x7fffffff8e08, 
    score_num=0x7fffffff8e00, score_den=0x7fffffff8df8, scores=0x7fffffff8db0, buf=0x61d908, adm_enhn_gain_limit=100, adm_norm_view_dist=3, 
    adm_ref_display_height=1080) at ../src/feature/integer_adm.c:2453
        num_scale = 0
        den_scale = 0
        scale = 3
        w = 2
        h = 2
        numden_limit = 1.2345679012345679e-14
        curr_ref_stride = 8
        curr_dis_stride = 8
        buf_stride = 8
        i4_curr_ref_scale = 0x61f120
        i4_curr_dis_scale = 0x61f520
        num = 28.096094608306885
        den = 40.501220226287842
#2  0x0000000000437328 in extract (fex=0x61c6f0, ref_pic=0x7fffffff8f00, ref_pic_90=0x0, dist_pic=0x7fffffff8f60, dist_pic_90=0x0, index=0, 
    feature_collector=0x613730) at ../src/feature/integer_adm.c:2665
        s = 0x61d900
        err = 0
        score = 3.3951932663349407e-313
        score_num = 1.3580773064154005e-312
        score_den = 2.1477596859555246e-317
        scores = {4.452723503112793, 13.645867347717285, 18.86121940612793, 18.861213684082031, 4.7821516990661621, 7.9941391944885254, 
          3.182993686497315e-313, 3.1682176928454105e-317}
#3  0x0000000000425606 in vmaf_feature_extractor_context_extract (fex_ctx=0x61c7b0, ref=0x7fffffff8f00, ref_90=0x0, dist=0x7fffffff8f60, 
    dist_90=0x0, pic_index=0, vfc=0x613730) at ../src/feature/feature_extractor.c:185
        err = -28832
#4  0x000000000040be69 in vmaf_read_pictures (vmaf=0x6136d0, ref=0x7fffffff8f00, dist=0x7fffffff8f60, index=0) at ../src/libvmaf.c:358
        fex_ctx = 0x61c7b0
        i = 0
        err = 0
#5  0x0000000000404ca0 in main (argc=5, argv=0x7fffffffdb58) at ../tools/vmaf.c:348
        pic_ref = {pix_fmt = VMAF_PIX_FMT_YUV420P, bpc = 8, w = {16, 8, 8}, h = {16, 8, 8}, stride = {32, 32, 32}, data = {0x61de60, 0x61e060, 
            0x61e160}, ref = 0x61dcf0}
        pic_dist = {pix_fmt = VMAF_PIX_FMT_YUV420P, bpc = 8, w = {16, 8, 8}, h = {16, 8, 8}, stride = {32, 32, 32}, data = {0x61e2c0, 0x61e4c0, 
            0x61e5c0}, ref = 0x61de10}
        ret1 = 0
        ret2 = 0
        err = 0
        istty = 1
        c = {path_ref = 0x7fffffffdf56 "test_16x16.y4m", path_dist = 0x7fffffffdf68 "test_16x16.y4m", frame_cnt = 0, width = 0, height = 0, 
          pix_fmt = VMAF_PIX_FMT_UNKNOWN, bitdepth = 0, use_yuv = false, output_path = 0x0, output_fmt = VMAF_OUTPUT_FORMAT_XML, model_config = {{
              path = 0x0, version = 0x484fcd "vmaf_v0.6.1", cfg = {name = 0x0, flags = 0}, feature_overload = {{name = 0x0, 
                  opts_dict = 0x0} <repeats 32 times>}, overload_cnt = 0, buf = 0x0}, {path = 0x0, version = 0x0, cfg = {name = 0x0, flags = 0}, 
              feature_overload = {{name = 0x0, opts_dict = 0x0} <repeats 32 times>}, overload_cnt = 0, buf = 0x0} <repeats 31 times>}, 
          model_cnt = 1, feature_cfg = {{name = 0x0, opts_dict = 0x0, buf = 0x0} <repeats 32 times>}, feature_cnt = 0, 
          log_level = VMAF_LOG_LEVEL_NONE, subsample = 0, thread_cnt = 0, no_prediction = false, quiet = false, cpumask = 0}
        file_ref = 0x610eb0
        file_dist = 0x611090
        vid_ref = {vtbl = 0x485b00 <Y4M_INPUT_VTBL>, ctx = 0x611270, fin = 0x610eb0}
        vid_dist = {vtbl = 0x485b00 <Y4M_INPUT_VTBL>, ctx = 0x6124a0, fin = 0x611090}
        cfg = {log_level = VMAF_LOG_LEVEL_INFO, n_threads = 0, n_subsample = 0, cpumask = 0}
        vmaf = 0x6136d0
        model = 0x6138c0
        model_sz = 8
        model_collection = 0x6138e0
        model_collection_sz = 8
        model_collection_label = {0x0}
        model_collection_cnt = 0
        fps = 0
        t0 = 6645
        picture_index = 0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions