~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to ffmpeg/libavcodec/vdpau.c

  • Committer: Gauvain Pocentek
  • Date: 2012-03-06 11:59:12 UTC
  • mfrom: (66.1.15 precise)
  • Revision ID: gauvain@pocentek.net-20120306115912-h9d6kt9j0l532oo5
* Merge from Ubuntu:
  - put back faac support
  - recommends apport-hooks-medibuntu
  - change Maintainer, Uploaders & Vcs-* fields.
* New upstream snapshot
* upload to unstable
* Build against external libmpeg2
* drop 51_FTBFS_arm.patch again
* no longer build depend on libcdparanoia-dev on the Hurd
* Fix FTBFS on the hurd.
  Thanks to Samuel Thibault <sthibault@debian.org> (Closes: #654974)
* Fix FTBFS on arm
* New upstream snapshot, Closes: #650339, #643621, #481807
* Imported Upstream version 1.0~rc4+svn34492
* Bump standards version
* Bump dependency on libav >= 4:0.8~, Closes: #653887
* Fix build-indep
* Build mplayer-gui again, Closes: #568514
* Drop debian/all-lang-config-mak.sh, no longer needed
* include .dfsg1 in version number
* remove get-orig-source target
* no longer prune compiler flags from the environment
* No longer advertise nor build 3fdx, mga and dxr3 backends,
  Closes: #496106, #442181, #533546
* beautify mplayer version identification string
* Brown paperbag upload.
* Next try to fix build failure on sparce after recent binutils change.
* Brown paperbag upload.
* Really fix build failure on sparc after recent binutils change.
* Properly set Replaces/Conflicts on mplayer2{,-dbg} to avoid
  file overwrite errors.
* Adjust versioning of mplayer listed in the mplayer-dbg's Depends field.
* Fix build failure on sparc after recent binutils change.
* Urgency medium bumped because of RC-level bugfix
  and speeding up x264 transition.
* Update to my @debian.org email.
* Upload to unstable
* Enable joystick support on Linux only, Closes: #638408
* Rebuild fixes toolchain issue on arm, Closes: #637077
* New upstream snapshot
* following the discussion started by Diego Biurrun <diego@biurrun.de>
  in debian-devel, I have prepared a new packaging of 'mplayer'
  (with code that comes from CVS)
* the upstream tar.bz cannot be distributed by Debian, since it contains
   CSS code; so I am repackaging it 
* I have tried my best to address all known issues:
  - the package contains the detailed Copyright made by Diego Biurrun 
  - the package does not contain CSS code, or  AFAIK other code on which 
     there is active patent enforcement
  - there is a script  debian/cvs-changelog.sh  that shows all changes
     done to files included in this source.
    This should comply with GPLv2 sec 2.a  (in spirit if not in letter)
    For this reason, the source code contains CVS directories.
* needs   make (>= 3.80) for 'html-chunked-$(1)' in DOCS/xml/Makefile

* some corrections, as suggested Diego Biurrun
  - binary codecs should go into /usr/lib/codecs (upstream default)
  - better template 'mplayer/install_codecs'
  - an empty 'font=' in mplayer.conf breaks mplayer: postinst corrected
* correction in 'mplayer/cfgnote'
* better mplayer.postinst and mplayer.config

* New upstream release
* better debian/copyright file
* do not ship a skin
* New upstream release
* changed DEB_BUILD_OPTIONS to DEB_BUILD_CONFIGURE ,
  DEB_BUILD_OPTIONS is used as in debian policy
* use gcc-3.4
* changed xlibs-dev to a long list of dependencies, for Debian/etch
* try to adhere to  http://www.mplayerhq.hu/DOCS/tech/binary-packaging.txt
  (see README.Debian for details)
* removed dependency on xlibmesa-dev, disabled opengl
* New upstream release
* Simon McVittie <hacks@pseudorandom.co.uk> wonderful work:
- Work around Debian bug #267442 (glibc's sys/uio.h and gcc's altivec.h have
  conflicting uses for __vector) by re-ordering #includes
- Fix potential symlink attack in ./configure
- Disable support for binary codecs on platforms for which those codecs
  aren't available; also disable the corresponding Debconf note when it's
  inappropriate
- Changed Build-Depends: so it works in pbuilder
- Explicitly build-depend on libjpeg62-dev, libfontconfig1-dev,
  libungif4-dev 
- Tweak debian/rules to avoid certain errors being ignored
- Use --language=all
* provide a target  'debian/rules get-orig-source' 
  that recreates the orig.tar.gz ; then use the above orig.tar.gz
* rewrote some parts of debian/rules
* don't clean and recompile docs if upstream ships them
* mplayer-doc was shipping too much stuff
* translated man pages where not installed properly
* compile with libdv4-dev
* correct README.Debian
* Forgot build-dep on libtheora
* Must not depend on libxvidcore
* New upstream release
* new release.
* rc1 to become 0.90
* new pre-release
* new pre-release
* gtk bug fixed.
* new release.
* version bumped
* 0.60 pre2 release
* 0.60 pre-release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include "vdpau_internal.h"
34
34
 
35
35
/**
36
 
 * \addtogroup VDPAU_Decoding
 
36
 * @addtogroup VDPAU_Decoding
37
37
 *
38
38
 * @{
39
39
 */
46
46
    Picture *pic;
47
47
    int i, list, pic_frame_idx;
48
48
 
49
 
    render = (struct vdpau_render_state *)s->current_picture_ptr->data[0];
 
49
    render = (struct vdpau_render_state *)s->current_picture_ptr->f.data[0];
50
50
    assert(render);
51
51
 
52
52
    rf = &render->info.h264.referenceFrames[0];
58
58
 
59
59
        for (i = 0; i < ls; ++i) {
60
60
            pic = lp[i];
61
 
            if (!pic || !pic->reference)
 
61
            if (!pic || !pic->f.reference)
62
62
                continue;
63
63
            pic_frame_idx = pic->long_ref ? pic->pic_id : pic->frame_num;
64
64
 
65
 
            render_ref = (struct vdpau_render_state *)pic->data[0];
 
65
            render_ref = (struct vdpau_render_state *)pic->f.data[0];
66
66
            assert(render_ref);
67
67
 
68
68
            rf2 = &render->info.h264.referenceFrames[0];
76
76
                ++rf2;
77
77
            }
78
78
            if (rf2 != rf) {
79
 
                rf2->top_is_reference    |= (pic->reference & PICT_TOP_FIELD)    ? VDP_TRUE : VDP_FALSE;
80
 
                rf2->bottom_is_reference |= (pic->reference & PICT_BOTTOM_FIELD) ? VDP_TRUE : VDP_FALSE;
 
79
                rf2->top_is_reference    |= (pic->f.reference & PICT_TOP_FIELD)    ? VDP_TRUE : VDP_FALSE;
 
80
                rf2->bottom_is_reference |= (pic->f.reference & PICT_BOTTOM_FIELD) ? VDP_TRUE : VDP_FALSE;
81
81
                continue;
82
82
            }
83
83
 
86
86
 
87
87
            rf->surface             = render_ref->surface;
88
88
            rf->is_long_term        = pic->long_ref;
89
 
            rf->top_is_reference    = (pic->reference & PICT_TOP_FIELD)    ? VDP_TRUE : VDP_FALSE;
90
 
            rf->bottom_is_reference = (pic->reference & PICT_BOTTOM_FIELD) ? VDP_TRUE : VDP_FALSE;
 
89
            rf->top_is_reference    = (pic->f.reference & PICT_TOP_FIELD)    ? VDP_TRUE : VDP_FALSE;
 
90
            rf->bottom_is_reference = (pic->f.reference & PICT_BOTTOM_FIELD) ? VDP_TRUE : VDP_FALSE;
91
91
            rf->field_order_cnt[0]  = pic->field_poc[0];
92
92
            rf->field_order_cnt[1]  = pic->field_poc[1];
93
93
            rf->frame_idx           = pic_frame_idx;
112
112
{
113
113
    struct vdpau_render_state *render;
114
114
 
115
 
    render = (struct vdpau_render_state *)s->current_picture_ptr->data[0];
 
115
    render = (struct vdpau_render_state *)s->current_picture_ptr->f.data[0];
116
116
    assert(render);
117
117
 
118
118
    render->bitstream_buffers= av_fast_realloc(
133
133
    struct vdpau_render_state *render;
134
134
    int i;
135
135
 
136
 
    render = (struct vdpau_render_state *)s->current_picture_ptr->data[0];
 
136
    render = (struct vdpau_render_state *)s->current_picture_ptr->f.data[0];
137
137
    assert(render);
138
138
 
139
139
    for (i = 0; i < 2; ++i) {
151
151
    H264Context *h = s->avctx->priv_data;
152
152
    struct vdpau_render_state *render;
153
153
 
154
 
    render = (struct vdpau_render_state *)s->current_picture_ptr->data[0];
 
154
    render = (struct vdpau_render_state *)s->current_picture_ptr->f.data[0];
155
155
    assert(render);
156
156
 
157
157
    render->info.h264.slice_count = h->slice_num;
158
158
    if (render->info.h264.slice_count < 1)
159
159
        return;
160
160
 
161
 
    render->info.h264.is_reference                           = (s->current_picture_ptr->reference & 3) ? VDP_TRUE : VDP_FALSE;
 
161
    render->info.h264.is_reference                           = (s->current_picture_ptr->f.reference & 3) ? VDP_TRUE : VDP_FALSE;
162
162
    render->info.h264.field_pic_flag                         = s->picture_structure != PICT_FRAME;
163
163
    render->info.h264.bottom_field_flag                      = s->picture_structure == PICT_BOTTOM_FIELD;
164
164
    render->info.h264.num_ref_frames                         = h->sps.ref_frame_count;
183
183
    render->info.h264.deblocking_filter_control_present_flag = h->pps.deblocking_filter_parameters_present;
184
184
    render->info.h264.redundant_pic_cnt_present_flag         = h->pps.redundant_pic_cnt_present;
185
185
    memcpy(render->info.h264.scaling_lists_4x4, h->pps.scaling_matrix4, sizeof(render->info.h264.scaling_lists_4x4));
186
 
    memcpy(render->info.h264.scaling_lists_8x8, h->pps.scaling_matrix8, sizeof(render->info.h264.scaling_lists_8x8));
 
186
    memcpy(render->info.h264.scaling_lists_8x8[0], h->pps.scaling_matrix8[0], sizeof(render->info.h264.scaling_lists_8x8[0]));
 
187
    memcpy(render->info.h264.scaling_lists_8x8[1], h->pps.scaling_matrix8[3], sizeof(render->info.h264.scaling_lists_8x8[0]));
187
188
 
188
189
    ff_draw_horiz_band(s, 0, s->avctx->height);
189
190
    render->bitstream_buffers_used = 0;
197
198
 
198
199
    if (!s->current_picture_ptr) return;
199
200
 
200
 
    render = (struct vdpau_render_state *)s->current_picture_ptr->data[0];
 
201
    render = (struct vdpau_render_state *)s->current_picture_ptr->f.data[0];
201
202
    assert(render);
202
203
 
203
204
    /* fill VdpPictureInfoMPEG1Or2 struct */
226
227
 
227
228
    switch(s->pict_type){
228
229
    case  AV_PICTURE_TYPE_B:
229
 
        next = (struct vdpau_render_state *)s->next_picture.data[0];
 
230
        next = (struct vdpau_render_state *)s->next_picture.f.data[0];
230
231
        assert(next);
231
232
        render->info.mpeg.backward_reference     = next->surface;
232
233
        // no return here, going to set forward prediction
233
234
    case  AV_PICTURE_TYPE_P:
234
 
        last = (struct vdpau_render_state *)s->last_picture.data[0];
 
235
        last = (struct vdpau_render_state *)s->last_picture.f.data[0];
235
236
        if (!last) // FIXME: Does this test make sense?
236
237
            last = render; // predict second field from the first
237
238
        render->info.mpeg.forward_reference      = last->surface;
252
253
    VC1Context *v = s->avctx->priv_data;
253
254
    struct vdpau_render_state *render, *last, *next;
254
255
 
255
 
    render = (struct vdpau_render_state *)s->current_picture.data[0];
 
256
    render = (struct vdpau_render_state *)s->current_picture.f.data[0];
256
257
    assert(render);
257
258
 
258
259
    /*  fill LvPictureInfoVC1 struct */
296
297
 
297
298
    switch(s->pict_type){
298
299
    case  AV_PICTURE_TYPE_B:
299
 
        next = (struct vdpau_render_state *)s->next_picture.data[0];
 
300
        next = (struct vdpau_render_state *)s->next_picture.f.data[0];
300
301
        assert(next);
301
302
        render->info.vc1.backward_reference = next->surface;
302
303
        // no break here, going to set forward prediction
303
304
    case  AV_PICTURE_TYPE_P:
304
 
        last = (struct vdpau_render_state *)s->last_picture.data[0];
 
305
        last = (struct vdpau_render_state *)s->last_picture.f.data[0];
305
306
        if (!last) // FIXME: Does this test make sense?
306
307
            last = render; // predict second field from the first
307
308
        render->info.vc1.forward_reference = last->surface;
323
324
 
324
325
    if (!s->current_picture_ptr) return;
325
326
 
326
 
    render = (struct vdpau_render_state *)s->current_picture_ptr->data[0];
 
327
    render = (struct vdpau_render_state *)s->current_picture_ptr->f.data[0];
327
328
    assert(render);
328
329
 
329
330
    /* fill VdpPictureInfoMPEG4Part2 struct */
352
353
 
353
354
    switch (s->pict_type) {
354
355
    case AV_PICTURE_TYPE_B:
355
 
        next = (struct vdpau_render_state *)s->next_picture.data[0];
 
356
        next = (struct vdpau_render_state *)s->next_picture.f.data[0];
356
357
        assert(next);
357
358
        render->info.mpeg4.backward_reference     = next->surface;
358
359
        render->info.mpeg4.vop_coding_type        = 2;
359
360
        // no break here, going to set forward prediction
360
361
    case AV_PICTURE_TYPE_P:
361
 
        last = (struct vdpau_render_state *)s->last_picture.data[0];
 
362
        last = (struct vdpau_render_state *)s->last_picture.f.data[0];
362
363
        assert(last);
363
364
        render->info.mpeg4.forward_reference      = last->surface;
364
365
    }