FFmpeg
Loading...
Searching...
No Matches
h263dec.h
Go to the documentation of this file.
1/*
2 * H.263 decoder internal header
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20#ifndef AVCODEC_H263DEC_H
21#define AVCODEC_H263DEC_H
22
23#include "get_bits.h"
24#include "mpegvideo.h"
25#include "vlc.h"
27
28// The defines below define the number of bits that are read at once for
29// reading vlc values. Changing these may improve speed and data cache needs
30// be aware though that decreasing them may need the number of stages that is
31// passed to get_vlc* to be increased.
32#define H263_MV_VLC_BITS 9
33#define INTRA_MCBPC_VLC_BITS 6
34#define INTER_MCBPC_VLC_BITS 7
35#define CBPY_VLC_BITS 6
36#define TEX_VLC_BITS 9
37
41extern VLCElem ff_h263_mv_vlc[];
42
43typedef struct H263DecContext {
44 MPVContext c;
45
47
48 int mb_num_left; ///< number of MBs left in this video packet (for partitioned slices only)
49
51
52 int pb_frame; ///< PB-frame mode (0 = none, 1 = base, 2 = improved)
53
54 /* motion compensation */
55 int h263_long_vectors; ///< use horrible H.263v1 long vector mode
56
57 /* FLV specific */
58 int flv; ///< use flv H.263 header
59
60 /* H.263 specific */
63
64 /* H.263+ specific */
66 int umvplus; ///< == H.263+ && unrestricted_mv
68 int alt_inter_vlc; ///< alternative inter vlc
71
72 /* MPEG-4 specific */
73 int padding_bug_score; ///< used to detect the VERY common padding bug in MPEG-4
75 int divx_packed; ///< divx specific, used to workaround (many) bugs in divx5
76 int data_partitioning; ///< data partitioning flag from header
77 int partitioned_frame; ///< is current frame partitioned
78
79 /* MSMPEG4 specific */
80 int slice_height; ///< in macroblocks
81
82 /* MPEG-4 (Studio Profile), MSMPEG4 and RV10 specific */
83 int last_dc[3]; ///< last DC values, used by MPEG4, MSMPEG4V1, RV10
84
85 /* RV10 specific */
86 int rv10_version; ///< RV10 version: 0 or 3
88
89 int (*decode_header)(struct H263DecContext *const h);
90#define FRAME_SKIPPED 100 ///< Frame is not coded
91
92 int (*decode_mb)(struct H263DecContext *h);
93#define SLICE_OK 0
94#define SLICE_ERROR -1
95#define SLICE_END -2 ///<end marker found
96#define SLICE_NOEND -3 ///<no end marker or error found but mb count exceeded
97
98 GetBitContext last_resync_gb; ///< used to search for the next resync marker
99
102
103 DECLARE_ALIGNED_32(int16_t, block)[6][64];
105
106int ff_h263_decode_motion(H263DecContext *const h, int pred, int f_code);
109 int *got_frame, AVPacket *avpkt);
110void ff_h263_decode_init_vlc(void);
114
115/**
116 * Print picture info if FF_DEBUG_PICT_INFO is set.
117 */
118void ff_h263_show_pict_info(H263DecContext *const h, int h263_plus);
119
122
124
125#endif
static int16_t block[64]
Definition dct.c:125
static AVFrame * frame
bitstream reader API header.
int ff_h263_decode_gob_header(H263DecContext *const h)
VLCElem ff_h263_inter_MCBPC_vlc[]
Definition ituh263dec.c:103
int ff_h263_decode_motion(H263DecContext *const h, int pred, int f_code)
Definition ituh263dec.c:279
void ff_h263_decode_init_vlc(void)
Definition ituh263dec.c:136
VLCElem ff_h263_mv_vlc[]
Definition ituh263dec.c:105
int ff_h263_decode_picture_header(H263DecContext *const h)
int ff_intel_h263_decode_picture_header(H263DecContext *const h)
int ff_h263_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
Definition h263dec.c:443
VLCElem ff_h263_cbpy_vlc[]
Definition ituh263dec.c:104
int ff_h263_decode_mb(H263DecContext *const h)
Definition ituh263dec.c:784
int ff_h263_decode_init(AVCodecContext *avctx)
Definition h263dec.c:94
void ff_h263_show_pict_info(H263DecContext *const h, int h263_plus)
Print picture info if FF_DEBUG_PICT_INFO is set.
Definition ituh263dec.c:80
int ff_h263_decode_mba(H263DecContext *const h)
Definition ituh263dec.c:142
VLCElem ff_h263_intra_MCBPC_vlc[]
Definition ituh263dec.c:102
int ff_h263_resync(H263DecContext *const h)
Decode the group of blocks / video packet header / slice header (MPEG-4 Studio).
Definition ituh263dec.c:217
mpegvideo header.
static const float pred[4]
Definition siprdata.h:259
main external API structure.
Definition avcodec.h:443
This structure describes decoded (raw) audio or video data.
Definition frame.h:472
This structure stores compressed data.
Definition packet.h:580
int umvplus
== H.263+ && unrestricted_mv
Definition h263dec.h:66
MPVContext c
Definition h263dec.h:44
GetBitContext gb
Definition h263dec.h:46
int last_dc[3]
last DC values, used by MPEG4, MSMPEG4V1, RV10
Definition h263dec.h:83
int flv
use flv H.263 header
Definition h263dec.h:58
int h263_long_vectors
use horrible H.263v1 long vector mode
Definition h263dec.h:55
int divx_packed
divx specific, used to workaround (many) bugs in divx5
Definition h263dec.h:75
int picture_number
Definition h263dec.h:50
int pb_frame
PB-frame mode (0 = none, 1 = base, 2 = improved)
Definition h263dec.h:52
int rv10_version
RV10 version: 0 or 3.
Definition h263dec.h:86
uint8_t permutated_intra_v_scantable[64]
Definition h263dec.h:101
uint8_t permutated_intra_h_scantable[64]
Definition h263dec.h:100
DECLARE_ALIGNED_32(int16_t, block)[6][64]
int(* decode_header)(struct H263DecContext *const h)
Definition h263dec.h:89
int slice_height
in macroblocks
Definition h263dec.h:80
int mb_num_left
number of MBs left in this video packet (for partitioned slices only)
Definition h263dec.h:48
int padding_bug_score
used to detect the VERY common padding bug in MPEG-4
Definition h263dec.h:73
int(* decode_mb)(struct H263DecContext *h)
Definition h263dec.h:92
int modified_quant
Definition h263dec.h:70
GetBitContext last_resync_gb
used to search for the next resync marker
Definition h263dec.h:98
int h263_slice_structured
Definition h263dec.h:67
int data_partitioning
data partitioning flag from header
Definition h263dec.h:76
int partitioned_frame
is current frame partitioned
Definition h263dec.h:77
int alt_inter_vlc
alternative inter vlc
Definition h263dec.h:68
int loop_filter
Definition h263dec.h:69
int rv10_first_dc_coded[3]
Definition h263dec.h:87
int skipped_last_frame
Definition h263dec.h:74
Definition vlc.h:32