/*
- * MPEG1/2 common code
+ * MPEG-1/2 common code
* Copyright (c) 2007 Aurelien Jacobs <aurel@gnuage.org>
*
* This file is part of Libav.
#ifndef AVCODEC_MPEG12_H
#define AVCODEC_MPEG12_H
+#include "mpeg12vlc.h"
#include "mpegvideo.h"
-#define DC_VLC_BITS 9
-#define TEX_VLC_BITS 9
-
-extern VLC ff_dc_lum_vlc;
-extern VLC ff_dc_chroma_vlc;
-
-typedef struct Mpeg1Context {
- MpegEncContext mpeg_enc_ctx;
- int mpeg_enc_ctx_allocated; /* true if decoding context allocated */
- int repeat_field; /* true if we must repeat the field */
- AVPanScan pan_scan; /**< some temporary storage for the panscan */
- int slice_count;
- int swap_uv;//indicate VCR2
- int save_aspect_info;
- int save_width, save_height, save_progressive_seq;
- AVRational frame_rate_ext; ///< MPEG-2 specific framerate modificator
- int sync; ///< Did we reach a sync point like a GOP/SEQ/KEYFrame?
- int full_pel[2];
-} Mpeg1Context;
-
extern uint8_t ff_mpeg12_static_rl_table_store[2][2][2*MAX_RUN + MAX_LEVEL + 3];
void ff_mpeg12_common_init(MpegEncContext *s);
-void ff_mpeg12_init_vlcs(void);
static inline int decode_dc(GetBitContext *gb, int component)
{
return diff;
}
-extern int ff_mpeg1_decode_block_intra(MpegEncContext *s, DCTELEM *block, int n);
+int ff_mpeg1_decode_block_intra(GetBitContext *gb,
+ const uint16_t *quant_matrix,
+ uint8_t *const scantable, int last_dc[3],
+ int16_t *block, int index, int qscale);
+
+void ff_mpeg1_clean_buffers(MpegEncContext *s);
+int ff_mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size, AVCodecParserContext *s);
+
+void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number);
+void ff_mpeg1_encode_mb(MpegEncContext *s, int16_t block[8][64],
+ int motion_x, int motion_y);
+void ff_mpeg1_encode_init(MpegEncContext *s);
+void ff_mpeg1_encode_slice_header(MpegEncContext *s);
#endif /* AVCODEC_MPEG12_H */