~medibuntu-maintainers/mplayer/medibuntu.natty

« back to all changes in this revision

Viewing changes to libavcodec/eatgq.c

  • Committer: Gauvain Pocentek
  • Date: 2010-09-25 09:39:02 UTC
  • mfrom: (66.1.6 maverick)
  • Revision ID: gauvain@images-20100925093902-9q2akz3ls3qzhaaw
* Merge from Ubuntu:
  - put back faac support
  - recommends apport-hooks-medibuntu
  - change Maintainer, Uploaders & Vcs-* fields.
* merge from debian, remaining changes:
  - build depend against, lame, x264, xvid
* debian/patches/60eval-api.patch, backport patch from upstream to
  unbreak compilation for eval.h move not yet in 0.6
* gmplayer is gone now, please see smplayer as alternative frontend.
  LP: #503537, #493088, #467534, #467524, #460326, #390399, #285570,
      #208680, #118709, #513065, #459595, #455913, #179918, #65165.
* enable the mencoder package
* sort build depends alphabetically
* enable dvdnav support, Closes: #582508, #488226, LP: #611749
* prepare new upload
* no longer build mplayer-gui, it doesn't build anymore with shared
  swscale
* merge from debian/experimental, remaining changes:
  - build depend against, lame, x264, xvid
  - enable mencoder and mplayer-gui
* ensure that quilt patches are actually applied
* New Upstream Version, LP: #539315
* Build (against) again the System FFmpeg 
* tighten dependency on FFmpeg 0.6
* remove patches merged upstream
* remove 22disable-xscreensaver.patch
* refresh patches
* readd x264, xvid and mp3lame support, LP: #606125
* remove old parallel building mechanism, fixes FTBFS
* New upstream version
* compile against internal ffmpeg for now, LP: #587203, #588097
* recompile for directfb transtion, LP: #587163
* remove patches that were merged upstream
* avoid removing DOCS/html directory. it is included in release
  tarball
* convert to source Format: 3.0 (quilt)
* refreshed patches
* remove files that are included in upstream tarball
* rework debian/rules file
  - support parallel building
  - merge build rules for mplayer and mencoder package
  - remove unreferenced COMMON_CONFIGURE_FLAGS macro
  - rename DEB_BUILD_CONFIGURE -> CONFIGURE_FLAGS
  - don't build documentation - release tarballs have them prebuilt
  - build HTML documentation only if not already avaiable in the build
    tree
  - remove remaining references to debian/strip.sh from debian/rules
* remove copied vdpau headers
* copy in mencoder.c from upstream
* enable mplayer-gui (Closes: #579925) and mencoder packages. 
  (Closes: #396954, #400940, #580168)
* Fix rtsp vulnerability. Patch applied by DSA. Closes: #581245
* Fix another integer overflow, Closes: #524805
* prepare new upload
* sync libao2/ao_pulse.c with svn r30062, Closes: #558196, #580113
* make configure use pkg-config for fribidi checks. Closes: #582784,
  LP: #556200
* document 23mplayer-debug-printf.patch
* avoid mentioning of GTK frontend in mplayer description
* improve package descriptions of mplayer-doc and mplayer-dbg
* medium urgency because of fixed security issue
* fix SVN_VERION regex in debian rules to unbreak get-orig-source
  target. Closes: #582369
* forcefully disable arts support. Closes: #581225
* Remove mencoder from Depends in mplayer-dbg package.
* new upstream snapshot from rc3 branch.
* remove patches applied upstream:
  
  - 24_enable_fontconfig_by_default.diff
  - 30_add_gmplayer_man_rules.diff
  - 40_improve_desktop_file.patch
  - 41_fix_forcedsubsonly.patch
  - 50_fix_crashes_with_invalid_SDPs.patch
  - 50_fix_initial_volume_setting_pulse_output.patch
  - 61-malloc-bsd.patch
  - 62-disable-vidix-on-kfreebsd-amd64.patch
  - 63-sys-kd-include.patch
* don't install apport hook
* gross hack to avoid building mplayer-nogui and mplayer-gui packages
* add md5sum to remove to avoid spurious conffile prompt, Closes: #568272
* Make mplayer build on kFreeBSD (backports from upstream), Closes: #578622
  - Revert obscure hack that disables the malloc.h check on certain BSD
    platforms. 
  - disable vidix on kFreeBSD-amd64
  - rename 'struct keypad' -> 'struct m_keypad' to avoid FTBFS on
    kFreeBSD/amd64
* enable fontconfig by default. (Closes: #573257)

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 */
21
21
 
22
22
/**
23
 
 * @file libavcodec/eatgq.c
 
23
 * @file
24
24
 * Electronic Arts TGQ Video Decoder
25
25
 * @author Peter Ross <pross@xvid.org>
26
26
 *
30
30
 
31
31
#include "avcodec.h"
32
32
#define ALT_BITSTREAM_READER_LE
33
 
#include "bitstream.h"
 
33
#include "get_bits.h"
34
34
#include "bytestream.h"
35
35
#include "dsputil.h"
36
36
#include "aandcttab.h"
42
42
    int width,height;
43
43
    ScanTable scantable;
44
44
    int qtable[64];
 
45
    DECLARE_ALIGNED(16, DCTELEM, block)[6][64];
45
46
} TgqContext;
46
47
 
47
48
static av_cold int tgq_decode_init(AVCodecContext *avctx){
140
141
    }
141
142
}
142
143
 
143
 
static void tgq_decode_mb(TgqContext *s, int mb_y, int mb_x, const int8_t **bs, const int8_t *buf_end){
 
144
static void tgq_decode_mb(TgqContext *s, int mb_y, int mb_x, const uint8_t **bs, const uint8_t *buf_end){
144
145
    int mode;
145
146
    int i;
146
147
    int8_t dc[6];
147
 
    DCTELEM block[6][64];
148
148
 
149
 
    mode = bytestream_get_byte((const uint8_t**)bs);
 
149
    mode = bytestream_get_byte(bs);
150
150
    if (mode>buf_end-*bs) {
151
151
        av_log(s->avctx, AV_LOG_ERROR, "truncated macroblock\n");
152
152
        return;
156
156
        GetBitContext gb;
157
157
        init_get_bits(&gb, *bs, mode*8);
158
158
        for(i=0; i<6; i++)
159
 
            tgq_decode_block(s, block[i], &gb);
160
 
        tgq_idct_put_mb(s, block, mb_x, mb_y);
 
159
            tgq_decode_block(s, s->block[i], &gb);
 
160
        tgq_idct_put_mb(s, s->block, mb_x, mb_y);
161
161
    }else{
162
162
        if (mode==3) {
163
163
            memset(dc, (*bs)[0], 4);
190
190
 
191
191
static int tgq_decode_frame(AVCodecContext *avctx,
192
192
                            void *data, int *data_size,
193
 
                            const uint8_t *buf, int buf_size){
 
193
                            AVPacket *avpkt){
 
194
    const uint8_t *buf = avpkt->data;
 
195
    int buf_size = avpkt->size;
194
196
    const uint8_t *buf_start = buf;
195
197
    const uint8_t *buf_end = buf + buf_size;
196
198
    TgqContext *s = avctx->priv_data;
226
228
 
227
229
    for (y=0; y<(avctx->height+15)/16; y++)
228
230
    for (x=0; x<(avctx->width+15)/16; x++)
229
 
        tgq_decode_mb(s, y, x, (const int8_t**)&buf, (const int8_t*)buf_end);
 
231
        tgq_decode_mb(s, y, x, &buf, buf_end);
230
232
 
231
233
    *data_size = sizeof(AVFrame);
232
234
    *(AVFrame*)data = s->frame;
243
245
 
244
246
AVCodec eatgq_decoder = {
245
247
    "eatgq",
246
 
    CODEC_TYPE_VIDEO,
 
248
    AVMEDIA_TYPE_VIDEO,
247
249
    CODEC_ID_TGQ,
248
250
    sizeof(TgqContext),
249
251
    tgq_decode_init,