yading@10
|
1 /*
|
yading@10
|
2 * H261 decoder
|
yading@10
|
3 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
|
yading@10
|
4 * Copyright (c) 2004 Maarten Daniels
|
yading@10
|
5 *
|
yading@10
|
6 * This file is part of FFmpeg.
|
yading@10
|
7 *
|
yading@10
|
8 * FFmpeg is free software; you can redistribute it and/or
|
yading@10
|
9 * modify it under the terms of the GNU Lesser General Public
|
yading@10
|
10 * License as published by the Free Software Foundation; either
|
yading@10
|
11 * version 2.1 of the License, or (at your option) any later version.
|
yading@10
|
12 *
|
yading@10
|
13 * FFmpeg is distributed in the hope that it will be useful,
|
yading@10
|
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
yading@10
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
yading@10
|
16 * Lesser General Public License for more details.
|
yading@10
|
17 *
|
yading@10
|
18 * You should have received a copy of the GNU Lesser General Public
|
yading@10
|
19 * License along with FFmpeg; if not, write to the Free Software
|
yading@10
|
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
yading@10
|
21 */
|
yading@10
|
22
|
yading@10
|
23 /**
|
yading@10
|
24 * @file
|
yading@10
|
25 * h261codec.
|
yading@10
|
26 */
|
yading@10
|
27
|
yading@10
|
28 #ifndef AVCODEC_H261_H
|
yading@10
|
29 #define AVCODEC_H261_H
|
yading@10
|
30
|
yading@10
|
31 #include "mpegvideo.h"
|
yading@10
|
32 #include "rl.h"
|
yading@10
|
33
|
yading@10
|
34 /**
|
yading@10
|
35 * H261Context
|
yading@10
|
36 */
|
yading@10
|
37 typedef struct H261Context {
|
yading@10
|
38 MpegEncContext s;
|
yading@10
|
39
|
yading@10
|
40 int current_mba;
|
yading@10
|
41 int previous_mba;
|
yading@10
|
42 int mba_diff;
|
yading@10
|
43 int mtype;
|
yading@10
|
44 int current_mv_x;
|
yading@10
|
45 int current_mv_y;
|
yading@10
|
46 int gob_number;
|
yading@10
|
47 int gob_start_code_skipped; // 1 if gob start code is already read before gob header is read
|
yading@10
|
48 } H261Context;
|
yading@10
|
49
|
yading@10
|
50 #define MB_TYPE_H261_FIL 0x800000
|
yading@10
|
51
|
yading@10
|
52 extern uint8_t ff_h261_rl_table_store[2][2 * MAX_RUN + MAX_LEVEL + 3];
|
yading@10
|
53
|
yading@10
|
54 extern const uint8_t ff_h261_mba_code[35];
|
yading@10
|
55 extern const uint8_t ff_h261_mba_bits[35];
|
yading@10
|
56 extern const uint8_t ff_h261_mtype_code[10];
|
yading@10
|
57 extern const uint8_t ff_h261_mtype_bits[10];
|
yading@10
|
58 extern const int ff_h261_mtype_map[10];
|
yading@10
|
59 extern const uint8_t ff_h261_mv_tab[17][2];
|
yading@10
|
60 extern const uint8_t ff_h261_cbp_tab[63][2];
|
yading@10
|
61 extern RLTable ff_h261_rl_tcoeff;
|
yading@10
|
62
|
yading@10
|
63 void ff_h261_loop_filter(MpegEncContext *s);
|
yading@10
|
64 void ff_h261_common_init(void);
|
yading@10
|
65
|
yading@10
|
66 int ff_h261_get_picture_format(int width, int height);
|
yading@10
|
67 void ff_h261_reorder_mb_index(MpegEncContext *s);
|
yading@10
|
68 void ff_h261_encode_mb(MpegEncContext *s, int16_t block[6][64],
|
yading@10
|
69 int motion_x, int motion_y);
|
yading@10
|
70 void ff_h261_encode_picture_header(MpegEncContext *s, int picture_number);
|
yading@10
|
71 void ff_h261_encode_init(MpegEncContext *s);
|
yading@10
|
72
|
yading@10
|
73 #endif /* AVCODEC_H261_H */
|