comparison mpeg12.c @ 486:fde314e1aaa1 libavcodec

passing avctx->flags so that grayscale only decoding works with mpeg1/2 too
author michaelni
date Sun, 09 Jun 2002 13:43:53 +0000
parents 718a22dc121f
children 54b88078c361
comparison
equal deleted inserted replaced
485:20108840b0e5 486:fde314e1aaa1
30 #define PICTURE_START_CODE 0x00000100 30 #define PICTURE_START_CODE 0x00000100
31 #define SLICE_MIN_START_CODE 0x00000101 31 #define SLICE_MIN_START_CODE 0x00000101
32 #define SLICE_MAX_START_CODE 0x000001af 32 #define SLICE_MAX_START_CODE 0x000001af
33 #define EXT_START_CODE 0x000001b5 33 #define EXT_START_CODE 0x000001b5
34 #define USER_START_CODE 0x000001b2 34 #define USER_START_CODE 0x000001b2
35
36 //#define ABS(a) ((a)<0 ? -(a) : (a))
37 35
38 static void mpeg1_encode_block(MpegEncContext *s, 36 static void mpeg1_encode_block(MpegEncContext *s,
39 DCTELEM *block, 37 DCTELEM *block,
40 int component); 38 int component);
41 static void mpeg1_encode_motion(MpegEncContext *s, int val); 39 static void mpeg1_encode_motion(MpegEncContext *s, int val);
1192 s->buf_ptr = s->buffer; 1190 s->buf_ptr = s->buffer;
1193 s->mpeg_enc_ctx.picture_number = 0; 1191 s->mpeg_enc_ctx.picture_number = 0;
1194 s->repeat_field = 0; 1192 s->repeat_field = 0;
1195 s->mpeg_enc_ctx.codec_id= avctx->codec->id; 1193 s->mpeg_enc_ctx.codec_id= avctx->codec->id;
1196 avctx->mbskip_table= s->mpeg_enc_ctx.mbskip_table; 1194 avctx->mbskip_table= s->mpeg_enc_ctx.mbskip_table;
1195 s->mpeg_enc_ctx.flags= avctx->flags;
1197 return 0; 1196 return 0;
1198 } 1197 }
1199 1198
1200 /* return the 8 bit start code value and update the search 1199 /* return the 8 bit start code value and update the search
1201 state. Return -1 if no start code found */ 1200 state. Return -1 if no start code found */