~ubuntu-branches/debian/experimental/libav/experimental

« back to all changes in this revision

Viewing changes to libavcodec/rv34.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2014-08-10 09:45:02 UTC
  • mfrom: (1.1.28) (2.1.45 sid)
  • Revision ID: package-import@ubuntu.com-20140810094502-p8pds4kq0zpig5oq
Tags: 6:11~alpha1-1
* New upstream Release v11
  - Fixes Unchecked conversion from double to enum (Closes: #749164)
* Add some post v11_alpha1 patches from upstream
* All SONAMEs bumped because of internal changes, but external API is
  promised to have not changed

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
#include "avcodec.h"
30
30
#include "error_resilience.h"
 
31
#include "mpegutils.h"
31
32
#include "mpegvideo.h"
32
33
#include "golomb.h"
33
34
#include "internal.h"
34
35
#include "mathops.h"
 
36
#include "mpeg_er.h"
 
37
#include "qpeldsp.h"
35
38
#include "rectangle.h"
36
39
#include "thread.h"
37
40
 
707
710
    }
708
711
 
709
712
    dxy = ly*4 + lx;
710
 
    srcY = dir ? s->next_picture_ptr->f.data[0] : s->last_picture_ptr->f.data[0];
711
 
    srcU = dir ? s->next_picture_ptr->f.data[1] : s->last_picture_ptr->f.data[1];
712
 
    srcV = dir ? s->next_picture_ptr->f.data[2] : s->last_picture_ptr->f.data[2];
 
713
    srcY = dir ? s->next_picture_ptr->f->data[0] : s->last_picture_ptr->f->data[0];
 
714
    srcU = dir ? s->next_picture_ptr->f->data[1] : s->last_picture_ptr->f->data[1];
 
715
    srcV = dir ? s->next_picture_ptr->f->data[2] : s->last_picture_ptr->f->data[2];
713
716
    src_x = s->mb_x * 16 + xoff + mx;
714
717
    src_y = s->mb_y * 16 + yoff + my;
715
718
    uvsrc_x = s->mb_x * 8 + (xoff >> 1) + umx;
1582
1585
        ff_thread_report_progress(&s->current_picture_ptr->tf, INT_MAX, 0);
1583
1586
 
1584
1587
    if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
1585
 
        if ((ret = av_frame_ref(pict, &s->current_picture_ptr->f)) < 0)
 
1588
        if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0)
1586
1589
            return ret;
1587
1590
        ff_print_debug_info(s, s->current_picture_ptr);
1588
1591
        got_picture = 1;
1589
1592
    } else if (s->last_picture_ptr != NULL) {
1590
 
        if ((ret = av_frame_ref(pict, &s->last_picture_ptr->f)) < 0)
 
1593
        if ((ret = av_frame_ref(pict, s->last_picture_ptr->f)) < 0)
1591
1594
            return ret;
1592
1595
        ff_print_debug_info(s, s->last_picture_ptr);
1593
1596
        got_picture = 1;
1615
1618
    if (buf_size == 0) {
1616
1619
        /* special case for last picture */
1617
1620
        if (s->low_delay==0 && s->next_picture_ptr) {
1618
 
            if ((ret = av_frame_ref(pict, &s->next_picture_ptr->f)) < 0)
 
1621
            if ((ret = av_frame_ref(pict, s->next_picture_ptr->f)) < 0)
1619
1622
                return ret;
1620
1623
            s->next_picture_ptr = NULL;
1621
1624
 
1643
1646
        av_log(avctx, AV_LOG_ERROR, "First slice header is incorrect\n");
1644
1647
        return AVERROR_INVALIDDATA;
1645
1648
    }
1646
 
    if ((!s->last_picture_ptr || !s->last_picture_ptr->f.data[0]) &&
 
1649
    if ((!s->last_picture_ptr || !s->last_picture_ptr->f->data[0]) &&
1647
1650
        si.type == AV_PICTURE_TYPE_B) {
1648
1651
        av_log(avctx, AV_LOG_ERROR, "Invalid decoder state: B-frame without "
1649
1652
               "reference data.\n");