yading@10: /* yading@10: * H261 decoder yading@10: * Copyright (c) 2002-2004 Michael Niedermayer yading@10: * Copyright (c) 2004 Maarten Daniels yading@10: * yading@10: * This file is part of FFmpeg. yading@10: * yading@10: * FFmpeg is free software; you can redistribute it and/or yading@10: * modify it under the terms of the GNU Lesser General Public yading@10: * License as published by the Free Software Foundation; either yading@10: * version 2.1 of the License, or (at your option) any later version. yading@10: * yading@10: * FFmpeg is distributed in the hope that it will be useful, yading@10: * but WITHOUT ANY WARRANTY; without even the implied warranty of yading@10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU yading@10: * Lesser General Public License for more details. yading@10: * yading@10: * You should have received a copy of the GNU Lesser General Public yading@10: * License along with FFmpeg; if not, write to the Free Software yading@10: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA yading@10: */ yading@10: yading@10: /** yading@10: * @file yading@10: * h261codec. yading@10: */ yading@10: yading@10: #ifndef AVCODEC_H261_H yading@10: #define AVCODEC_H261_H yading@10: yading@10: #include "mpegvideo.h" yading@10: #include "rl.h" yading@10: yading@10: /** yading@10: * H261Context yading@10: */ yading@10: typedef struct H261Context { yading@10: MpegEncContext s; yading@10: yading@10: int current_mba; yading@10: int previous_mba; yading@10: int mba_diff; yading@10: int mtype; yading@10: int current_mv_x; yading@10: int current_mv_y; yading@10: int gob_number; yading@10: int gob_start_code_skipped; // 1 if gob start code is already read before gob header is read yading@10: } H261Context; yading@10: yading@10: #define MB_TYPE_H261_FIL 0x800000 yading@10: yading@10: extern uint8_t ff_h261_rl_table_store[2][2 * MAX_RUN + MAX_LEVEL + 3]; yading@10: yading@10: extern const uint8_t ff_h261_mba_code[35]; yading@10: extern const uint8_t ff_h261_mba_bits[35]; yading@10: extern const uint8_t ff_h261_mtype_code[10]; yading@10: extern const uint8_t ff_h261_mtype_bits[10]; yading@10: extern const int ff_h261_mtype_map[10]; yading@10: extern const uint8_t ff_h261_mv_tab[17][2]; yading@10: extern const uint8_t ff_h261_cbp_tab[63][2]; yading@10: extern RLTable ff_h261_rl_tcoeff; yading@10: yading@10: void ff_h261_loop_filter(MpegEncContext *s); yading@10: void ff_h261_common_init(void); yading@10: yading@10: int ff_h261_get_picture_format(int width, int height); yading@10: void ff_h261_reorder_mb_index(MpegEncContext *s); yading@10: void ff_h261_encode_mb(MpegEncContext *s, int16_t block[6][64], yading@10: int motion_x, int motion_y); yading@10: void ff_h261_encode_picture_header(MpegEncContext *s, int picture_number); yading@10: void ff_h261_encode_init(MpegEncContext *s); yading@10: yading@10: #endif /* AVCODEC_H261_H */