FFmpeg
libavcodec
mpegvideodec.h
Go to the documentation of this file.
1
/*
2
* MPEGVideo decoders header
3
* Copyright (c) 2000, 2001, 2002 Fabrice Bellard
4
* Copyright (c) 2002-2004 Michael Niedermayer
5
*
6
* This file is part of FFmpeg.
7
*
8
* FFmpeg is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public
10
* License as published by the Free Software Foundation; either
11
* version 2.1 of the License, or (at your option) any later version.
12
*
13
* FFmpeg is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* Lesser General Public License for more details.
17
*
18
* You should have received a copy of the GNU Lesser General Public
19
* License along with FFmpeg; if not, write to the Free Software
20
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
*/
22
23
/**
24
* @file
25
* mpegvideo decoder header.
26
*/
27
28
#ifndef AVCODEC_MPEGVIDEODEC_H
29
#define AVCODEC_MPEGVIDEODEC_H
30
31
#include "
libavutil/frame.h
"
32
#include "
avcodec.h
"
33
#include "
get_bits.h
"
34
#include "
mpegpicture.h
"
35
#include "
mpegvideo.h
"
36
#include "
mpegvideodata.h
"
37
38
#define FF_MPV_QSCALE_TYPE_MPEG1 0
39
#define FF_MPV_QSCALE_TYPE_MPEG2 1
40
41
/**
42
* Initialize the given MpegEncContext for decoding.
43
* the changed fields will not depend upon
44
* the prior state of the MpegEncContext.
45
*/
46
void
ff_mpv_decode_init
(
MpegEncContext
*
s
,
AVCodecContext
*avctx);
47
48
int
ff_mpv_common_frame_size_change
(
MpegEncContext
*
s
);
49
50
int
ff_mpv_frame_start
(
MpegEncContext
*
s
,
AVCodecContext
*avctx);
51
void
ff_mpv_report_decode_progress
(
MpegEncContext
*
s
);
52
void
ff_mpv_frame_end
(
MpegEncContext
*
s
);
53
54
int
ff_mpv_export_qp_table
(
MpegEncContext
*
s
,
AVFrame
*
f
,
Picture
*p,
int
qp_type);
55
int
ff_mpeg_update_thread_context
(
AVCodecContext
*dst,
const
AVCodecContext
*
src
);
56
void
ff_mpeg_draw_horiz_band
(
MpegEncContext
*
s
,
int
y,
int
h
);
57
void
ff_mpeg_flush
(
AVCodecContext
*avctx);
58
59
void
ff_print_debug_info
(
MpegEncContext
*
s
,
Picture
*p,
AVFrame
*pict);
60
61
static
inline
int
mpeg_get_qscale
(
MpegEncContext
*
s
)
62
{
63
int
qscale =
get_bits
(&
s
->gb, 5);
64
if
(
s
->q_scale_type)
65
return
ff_mpeg2_non_linear_qscale
[qscale];
66
else
67
return
qscale << 1;
68
}
69
70
#endif
/* AVCODEC_MPEGVIDEODEC_H */
ff_mpv_frame_start
int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx)
generic function called after decoding the header and before a frame is decoded.
Definition:
mpegvideo_dec.c:276
ff_mpeg_update_thread_context
int ff_mpeg_update_thread_context(AVCodecContext *dst, const AVCodecContext *src)
Definition:
mpegvideo_dec.c:51
AVFrame
This structure describes decoded (raw) audio or video data.
Definition:
frame.h:325
ff_mpeg2_non_linear_qscale
const uint8_t ff_mpeg2_non_linear_qscale[32]
Definition:
mpegvideodata.c:26
mpegvideo.h
Picture
Picture.
Definition:
mpegpicture.h:46
ff_mpv_report_decode_progress
void ff_mpv_report_decode_progress(MpegEncContext *s)
Definition:
mpegvideo_dec.c:580
get_bits
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
Definition:
get_bits.h:380
ff_mpv_decode_init
void ff_mpv_decode_init(MpegEncContext *s, AVCodecContext *avctx)
Initialize the given MpegEncContext for decoding.
Definition:
mpegvideo_dec.c:37
s
#define s(width, name)
Definition:
cbs_vp9.c:256
ff_mpeg_draw_horiz_band
void ff_mpeg_draw_horiz_band(MpegEncContext *s, int y, int h)
Definition:
mpegvideo_dec.c:543
get_bits.h
f
f
Definition:
af_crystalizer.c:122
frame.h
mpegpicture.h
mpegvideodata.h
avcodec.h
ff_mpv_common_frame_size_change
int ff_mpv_common_frame_size_change(MpegEncContext *s)
Definition:
mpegvideo_dec.c:194
ff_mpv_export_qp_table
int ff_mpv_export_qp_table(MpegEncContext *s, AVFrame *f, Picture *p, int qp_type)
Definition:
mpegvideo_dec.c:513
AVCodecContext
main external API structure.
Definition:
avcodec.h:389
ff_print_debug_info
void ff_print_debug_info(MpegEncContext *s, Picture *p, AVFrame *pict)
Definition:
mpegvideo_dec.c:506
mpeg_get_qscale
static int mpeg_get_qscale(MpegEncContext *s)
Definition:
mpegvideodec.h:61
src
INIT_CLIP pixel * src
Definition:
h264pred_template.c:418
h
h
Definition:
vp9dsp_template.c:2038
MpegEncContext
MpegEncContext.
Definition:
mpegvideo.h:62
ff_mpeg_flush
void ff_mpeg_flush(AVCodecContext *avctx)
Definition:
mpegvideo_dec.c:551
ff_mpv_frame_end
void ff_mpv_frame_end(MpegEncContext *s)
Definition:
mpegvideo_dec.c:498
Generated on Tue Jun 28 2022 19:21:34 for FFmpeg by
1.8.17