FFmpeg
Macros | Functions
mpegvideo_dec.c File Reference
#include <limits.h>
#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
#include "libavutil/video_enc_params.h"
#include "avcodec.h"
#include "internal.h"
#include "mpegutils.h"
#include "mpegvideo.h"
#include "mpegvideodec.h"
#include "threadframe.h"

Go to the source code of this file.

Macros

#define UPDATE_PICTURE(pic)
 
#define REBASE_PICTURE(pic, new_ctx, old_ctx)
 

Functions

void ff_mpv_decode_init (MpegEncContext *s, AVCodecContext *avctx)
 Initialize the given MpegEncContext for decoding. More...
 
int ff_mpeg_update_thread_context (AVCodecContext *dst, const AVCodecContext *src)
 
int ff_mpv_common_frame_size_change (MpegEncContext *s)
 
static int alloc_picture (MpegEncContext *s, Picture *pic)
 
static void gray_frame (AVFrame *frame)
 
int ff_mpv_frame_start (MpegEncContext *s, AVCodecContext *avctx)
 generic function called after decoding the header and before a frame is decoded. More...
 
void ff_mpv_frame_end (MpegEncContext *s)
 
void ff_print_debug_info (const MpegEncContext *s, const Picture *p, AVFrame *pict)
 
int ff_mpv_export_qp_table (const MpegEncContext *s, AVFrame *f, const Picture *p, int qp_type)
 
void ff_mpeg_draw_horiz_band (MpegEncContext *s, int y, int h)
 
void ff_mpeg_flush (AVCodecContext *avctx)
 
void ff_mpv_report_decode_progress (MpegEncContext *s)
 

Macro Definition Documentation

◆ UPDATE_PICTURE

#define UPDATE_PICTURE (   pic)
Value:
do {\
ff_mpeg_unref_picture(s->avctx, &s->pic);\
if (s1->pic.f && s1->pic.f->buf[0])\
ret = ff_mpeg_ref_picture(s->avctx, &s->pic, &s1->pic);\
else\
ret = ff_update_picture_tables(&s->pic, &s1->pic);\
if (ret < 0)\
return ret;\
} while (0)

◆ REBASE_PICTURE

#define REBASE_PICTURE (   pic,
  new_ctx,
  old_ctx 
)
Value:
((pic && pic >= old_ctx->picture && \
pic < old_ctx->picture + MAX_PICTURE_COUNT) ? \
&new_ctx->picture[pic - old_ctx->picture] : NULL)

Function Documentation

◆ ff_mpv_decode_init()

void ff_mpv_decode_init ( MpegEncContext s,
AVCodecContext avctx 
)

Initialize the given MpegEncContext for decoding.

the changed fields will not depend upon the prior state of the MpegEncContext.

Definition at line 37 of file mpegvideo_dec.c.

Referenced by ff_h263_decode_init(), ff_rv34_decode_init(), h261_decode_init(), ipu_decode_init(), mpeg_decode_init(), and rv10_decode_init().

◆ ff_mpeg_update_thread_context()

int ff_mpeg_update_thread_context ( AVCodecContext dst,
const AVCodecContext src 
)

Definition at line 51 of file mpegvideo_dec.c.

Referenced by ff_rv34_decode_update_thread_context().

◆ ff_mpv_common_frame_size_change()

int ff_mpv_common_frame_size_change ( MpegEncContext s)

◆ alloc_picture()

static int alloc_picture ( MpegEncContext s,
Picture pic 
)
static

Definition at line 235 of file mpegvideo_dec.c.

Referenced by ff_mpv_frame_start().

◆ gray_frame()

static void gray_frame ( AVFrame frame)
static

Definition at line 243 of file mpegvideo_dec.c.

Referenced by ff_mpv_frame_start().

◆ 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 at line 263 of file mpegvideo_dec.c.

Referenced by decode_wmv9(), ff_h263_decode_frame(), ff_rv34_decode_frame(), h261_decode_frame(), mpeg_field_start(), rv10_decode_packet(), and vc1_decode_frame().

◆ ff_mpv_frame_end()

void ff_mpv_frame_end ( MpegEncContext s)

◆ ff_print_debug_info()

void ff_print_debug_info ( const MpegEncContext s,
const Picture p,
AVFrame pict 
)

◆ ff_mpv_export_qp_table()

int ff_mpv_export_qp_table ( const MpegEncContext s,
AVFrame f,
const Picture p,
int  qp_type 
)

Definition at line 494 of file mpegvideo_dec.c.

Referenced by ff_h263_decode_frame(), finish_frame(), rv10_decode_frame(), and slice_end().

◆ ff_mpeg_draw_horiz_band()

void ff_mpeg_draw_horiz_band ( MpegEncContext s,
int  y,
int  h 
)

◆ ff_mpeg_flush()

void ff_mpeg_flush ( AVCodecContext avctx)

Definition at line 532 of file mpegvideo_dec.c.

Referenced by decode_wmv9(), and flush().

◆ ff_mpv_report_decode_progress()

void ff_mpv_report_decode_progress ( MpegEncContext s)

Definition at line 561 of file mpegvideo_dec.c.

Referenced by decode_slice(), and mpeg_decode_slice().

MAX_PICTURE_COUNT
#define MAX_PICTURE_COUNT
Definition: mpegpicture.h:33
s
#define s(width, name)
Definition: cbs_vp9.c:256
s1
#define s1
Definition: regdef.h:38
NULL
#define NULL
Definition: coverity.c:32
ff_update_picture_tables
int ff_update_picture_tables(Picture *dst, const Picture *src)
Definition: mpegpicture.c:337
ff_mpeg_ref_picture
int ff_mpeg_ref_picture(AVCodecContext *avctx, Picture *dst, Picture *src)
Definition: mpegpicture.c:369
ret
ret
Definition: filter_design.txt:187