~ubuntu-branches/ubuntu/wily/ffmpeg/wily

« back to all changes in this revision

Viewing changes to libavcodec/diracdec.c

  • Committer: Package Import Robot
  • Author(s): Andreas Cadhalpun, Reinhard Tartler, Andreas Cadhalpun
  • Date: 2015-07-20 10:23:49 UTC
  • mfrom: (27.1.4 sid)
  • Revision ID: package-import@ubuntu.com-20150720102349-prx70m0x0su1xek6
Tags: 7:2.7.2-1
[ Reinhard Tartler ]
* Add myself to uploaders.
* Merge qt-faststart back into 'ffmpeg'.

[ Andreas Cadhalpun ]
* Upload to unstable.
* Import new upstream bugfix release 2.7.2.
   - Make -xerror with multi-threading more robust. (Closes: #780344)
* Enable frei0r, opencv, x264, x265 on x32 and x265 on sparc64.
* Disable x264 on sparc64 due to #792921.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1563
1563
    }
1564
1564
}
1565
1565
 
1566
 
static void interpolate_refplane(DiracContext *s, DiracFrame *ref, int plane, int width, int height)
 
1566
static int interpolate_refplane(DiracContext *s, DiracFrame *ref, int plane, int width, int height)
1567
1567
{
1568
1568
    /* chroma allocates an edge of 8 when subsampled
1569
1569
       which for 4:2:2 means an h edge of 16 and v edge of 8
1575
1575
 
1576
1576
    /* no need for hpel if we only have fpel vectors */
1577
1577
    if (!s->mv_precision)
1578
 
        return;
 
1578
        return 0;
1579
1579
 
1580
1580
    for (i = 1; i < 4; i++) {
1581
1581
        if (!ref->hpel_base[plane][i])
1582
1582
            ref->hpel_base[plane][i] = av_malloc((height+2*edge) * ref->avframe->linesize[plane] + 32);
 
1583
        if (!ref->hpel_base[plane][i]) {
 
1584
            return AVERROR(ENOMEM);
 
1585
        }
1583
1586
        /* we need to be 16-byte aligned even for chroma */
1584
1587
        ref->hpel[plane][i] = ref->hpel_base[plane][i] + edge*ref->avframe->linesize[plane] + 16;
1585
1588
    }
1593
1596
        s->mpvencdsp.draw_edges(ref->hpel[plane][3], ref->avframe->linesize[plane], width, height, edge, edge, EDGE_TOP | EDGE_BOTTOM);
1594
1597
    }
1595
1598
    ref->interpolated[plane] = 1;
 
1599
 
 
1600
    return 0;
1596
1601
}
1597
1602
 
1598
1603
/**
1646
1651
 
1647
1652
            select_dsp_funcs(s, p->width, p->height, p->xblen, p->yblen);
1648
1653
 
1649
 
            for (i = 0; i < s->num_refs; i++)
1650
 
                interpolate_refplane(s, s->ref_pics[i], comp, p->width, p->height);
 
1654
            for (i = 0; i < s->num_refs; i++) {
 
1655
                int ret = interpolate_refplane(s, s->ref_pics[i], comp, p->width, p->height);
 
1656
                if (ret < 0)
 
1657
                    return ret;
 
1658
            }
1651
1659
 
1652
1660
            memset(s->mctmp, 0, 4*p->yoffset*p->stride);
1653
1661