~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to ffmpeg/libavcodec/mpegvideo_xvmc.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2012-01-12 22:23:28 UTC
  • mfrom: (0.4.7 sid)
  • mto: This revision was merged to the branch mainline in revision 76.
  • Revision ID: package-import@ubuntu.com-20120112222328-8jqdyodym3p84ygu
Tags: 2:1.0~rc4.dfsg1+svn34540-1
* New upstream snapshot
* upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
 */
42
42
void ff_xvmc_init_block(MpegEncContext *s)
43
43
{
44
 
    struct xvmc_pix_fmt *render = (struct xvmc_pix_fmt*)s->current_picture.data[2];
 
44
    struct xvmc_pix_fmt *render = (struct xvmc_pix_fmt*)s->current_picture.f.data[2];
45
45
    assert(render && render->xvmc_id == AV_XVMC_ID);
46
46
 
47
47
    s->block = (DCTELEM (*)[64])(render->data_blocks + render->next_free_data_block_num * 64);
73
73
 */
74
74
int ff_xvmc_field_start(MpegEncContext *s, AVCodecContext *avctx)
75
75
{
76
 
    struct xvmc_pix_fmt *last, *next, *render = (struct xvmc_pix_fmt*)s->current_picture.data[2];
 
76
    struct xvmc_pix_fmt *last, *next, *render = (struct xvmc_pix_fmt*)s->current_picture.f.data[2];
77
77
    const int mb_block_count = 4 + (1 << s->chroma_format);
78
78
 
79
79
    assert(avctx);
113
113
        case  AV_PICTURE_TYPE_I:
114
114
            return 0; // no prediction from other frames
115
115
        case  AV_PICTURE_TYPE_B:
116
 
            next = (struct xvmc_pix_fmt*)s->next_picture.data[2];
 
116
            next = (struct xvmc_pix_fmt*)s->next_picture.f.data[2];
117
117
            if (!next)
118
118
                return -1;
119
119
            if (next->xvmc_id != AV_XVMC_ID)
121
121
            render->p_future_surface = next->p_surface;
122
122
            // no return here, going to set forward prediction
123
123
        case  AV_PICTURE_TYPE_P:
124
 
            last = (struct xvmc_pix_fmt*)s->last_picture.data[2];
 
124
            last = (struct xvmc_pix_fmt*)s->last_picture.f.data[2];
125
125
            if (!last)
126
126
                last = render; // predict second field from the first
127
127
            if (last->xvmc_id != AV_XVMC_ID)
141
141
 */
142
142
void ff_xvmc_field_end(MpegEncContext *s)
143
143
{
144
 
    struct xvmc_pix_fmt *render = (struct xvmc_pix_fmt*)s->current_picture.data[2];
 
144
    struct xvmc_pix_fmt *render = (struct xvmc_pix_fmt*)s->current_picture.f.data[2];
145
145
    assert(render);
146
146
 
147
147
    if (render->filled_mv_blocks_num > 0)
179
179
 
180
180
    // Do I need to export quant when I could not perform postprocessing?
181
181
    // Anyway, it doesn't hurt.
182
 
    s->current_picture.qscale_table[mb_xy] = s->qscale;
 
182
    s->current_picture.f.qscale_table[mb_xy] = s->qscale;
183
183
 
184
184
    // start of XVMC-specific code
185
 
    render = (struct xvmc_pix_fmt*)s->current_picture.data[2];
 
185
    render = (struct xvmc_pix_fmt*)s->current_picture.f.data[2];
186
186
    assert(render);
187
187
    assert(render->xvmc_id == AV_XVMC_ID);
188
188
    assert(render->mv_blocks);