~ubuntu-branches/ubuntu/lucid/ffmpeg/lucid-updates

« back to all changes in this revision

Viewing changes to libavcodec/avs.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-01-20 17:51:19 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090120175119-gu6kw1arv5tmf1vr
Tags: 3:0.svn20090119-1ubuntu1+unstripped1
* merge with the ubuntu.jaunty branch
* reenable x264 LP: #303537
* build against vdpau
* enable xvmc support

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
typedef struct {
27
27
    AVFrame picture;
28
 
} avs_context_t;
 
28
} AvsContext;
29
29
 
30
30
typedef enum {
31
31
    AVS_VIDEO     = 0x01,
32
32
    AVS_AUDIO     = 0x02,
33
33
    AVS_PALETTE   = 0x03,
34
34
    AVS_GAME_DATA = 0x04,
35
 
} avs_block_type_t;
 
35
} AvsBlockType;
36
36
 
37
37
typedef enum {
38
38
    AVS_I_FRAME     = 0x00,
39
39
    AVS_P_FRAME_3X3 = 0x01,
40
40
    AVS_P_FRAME_2X2 = 0x02,
41
41
    AVS_P_FRAME_2X3 = 0x03,
42
 
} avs_video_sub_type_t;
 
42
} AvsVideoSubType;
43
43
 
44
44
 
45
45
static int
46
46
avs_decode_frame(AVCodecContext * avctx,
47
47
                 void *data, int *data_size, const uint8_t * buf, int buf_size)
48
48
{
49
 
    avs_context_t *const avs = avctx->priv_data;
 
49
    AvsContext *const avs = avctx->priv_data;
50
50
    AVFrame *picture = data;
51
51
    AVFrame *const p = (AVFrame *) & avs->picture;
52
52
    const uint8_t *table, *vect;
53
53
    uint8_t *out;
54
54
    int i, j, x, y, stride, vect_w = 3, vect_h = 3;
55
 
    int sub_type;
56
 
    avs_block_type_t type;
 
55
    AvsVideoSubType sub_type;
 
56
    AvsBlockType type;
57
57
    GetBitContext change_map;
58
58
 
59
59
    if (avctx->reget_buffer(avctx, p)) {
152
152
    "avs",
153
153
    CODEC_TYPE_VIDEO,
154
154
    CODEC_ID_AVS,
155
 
    sizeof(avs_context_t),
 
155
    sizeof(AvsContext),
156
156
    avs_decode_init,
157
157
    NULL,
158
158
    NULL,