Revision 79dec154

View differences:

libavcodec/vp8.c
1505 1505
    int inner_filter = f->inner_filter;
1506 1506
    int linesize = s->linesize;
1507 1507
    int uvlinesize = s->uvlinesize;
1508
    static const uint8_t hev_thresh_lut[2][64] = {
1509
        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
1510
          2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1511
          3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1512
          3, 3, 3, 3 },
1513
        { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,
1514
          1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1515
          2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1516
          2, 2, 2, 2 }
1517
    };
1508 1518

  
1509 1519
    if (!filter_level)
1510 1520
        return;
1511 1521

  
1512
    mbedge_lim = 2*(filter_level+2) + inner_limit;
1513
     bedge_lim = 2* filter_level    + inner_limit;
1514
    hev_thresh = filter_level >= 15;
1522
     bedge_lim = 2*filter_level + inner_limit;
1523
    mbedge_lim = bedge_lim + 4;
1515 1524

  
1516
    if (s->keyframe) {
1517
        if (filter_level >= 40)
1518
            hev_thresh = 2;
1519
    } else {
1520
        if (filter_level >= 40)
1521
            hev_thresh = 3;
1522
        else if (filter_level >= 20)
1523
            hev_thresh = 2;
1524
    }
1525
    hev_thresh = hev_thresh_lut[s->keyframe][filter_level];
1525 1526

  
1526 1527
    if (mb_x) {
1527 1528
        s->vp8dsp.vp8_h_loop_filter16y(dst[0],     linesize,
......
1577 1578
    if (!filter_level)
1578 1579
        return;
1579 1580

  
1580
    mbedge_lim = 2*(filter_level+2) + inner_limit;
1581
     bedge_lim = 2* filter_level    + inner_limit;
1581
     bedge_lim = 2*filter_level + inner_limit;
1582
    mbedge_lim = bedge_lim + 4;
1582 1583

  
1583 1584
    if (mb_x)
1584 1585
        s->vp8dsp.vp8_h_loop_filter_simple(dst, linesize, mbedge_lim);

Also available in: Unified diff