FFmpeg
Data Structures | Macros | Functions
mpegpicture.h File Reference
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include "avcodec.h"
#include "threadprogress.h"

Go to the source code of this file.

Data Structures

struct  ScratchpadContext
 
struct  BufferPoolContext
 
struct  MPVPicture
 MPVPicture. More...
 
struct  MPVWorkPicture
 

Macros

#define MPV_MAX_PLANES   3
 
#define EDGE_WIDTH   16
 

Functions

struct AVRefStructPoolff_mpv_alloc_pic_pool (int init_progress)
 Allocate a pool of MPVPictures. More...
 
int ff_mpv_alloc_pic_accessories (AVCodecContext *avctx, MPVWorkPicture *pic, ScratchpadContext *sc, BufferPoolContext *pools, int mb_height)
 Allocate an MPVPicture's accessories (but not the AVFrame's buffer itself) and set the MPVWorkPicture's fields. More...
 
int ff_mpv_pic_check_linesize (void *logctx, const struct AVFrame *f, ptrdiff_t *linesizep, ptrdiff_t *uvlinesizep)
 Check that the linesizes of an AVFrame are consistent with the requirements of mpegvideo. More...
 
int ff_mpv_framesize_alloc (AVCodecContext *avctx, ScratchpadContext *sc, int linesize)
 
static void ff_mpv_framesize_disable (ScratchpadContext *sc)
 Disable allocating the ScratchpadContext's buffers in future calls to ff_mpv_framesize_alloc(). More...
 
void ff_mpv_unref_picture (MPVWorkPicture *pic)
 
void ff_mpv_workpic_from_pic (MPVWorkPicture *wpic, MPVPicture *pic)
 
void ff_mpv_replace_picture (MPVWorkPicture *dst, const MPVWorkPicture *src)
 

Macro Definition Documentation

◆ MPV_MAX_PLANES

#define MPV_MAX_PLANES   3

Definition at line 31 of file mpegpicture.h.

◆ EDGE_WIDTH

#define EDGE_WIDTH   16

Definition at line 32 of file mpegpicture.h.

Function Documentation

◆ ff_mpv_alloc_pic_pool()

struct AVRefStructPool* ff_mpv_alloc_pic_pool ( int  init_progress)

Allocate a pool of MPVPictures.

Definition at line 90 of file mpegpicture.c.

Referenced by ff_mpv_decode_init(), and ff_mpv_encode_init().

◆ ff_mpv_alloc_pic_accessories()

int ff_mpv_alloc_pic_accessories ( AVCodecContext avctx,
MPVWorkPicture pic,
ScratchpadContext sc,
BufferPoolContext pools,
int  mb_height 
)

Allocate an MPVPicture's accessories (but not the AVFrame's buffer itself) and set the MPVWorkPicture's fields.

Definition at line 237 of file mpegpicture.c.

Referenced by alloc_picture(), and select_input_picture().

◆ ff_mpv_pic_check_linesize()

int ff_mpv_pic_check_linesize ( void *  logctx,
const struct AVFrame f,
ptrdiff_t *  linesizep,
ptrdiff_t *  uvlinesizep 
)

Check that the linesizes of an AVFrame are consistent with the requirements of mpegvideo.

FIXME: There should be no need for this function. mpegvideo should be made to work with changing linesizes.

◆ ff_mpv_framesize_alloc()

int ff_mpv_framesize_alloc ( AVCodecContext avctx,
ScratchpadContext sc,
int  linesize 
)

Definition at line 138 of file mpegpicture.c.

Referenced by ff_mpv_alloc_pic_accessories(), and ff_update_duplicate_context().

◆ ff_mpv_framesize_disable()

static void ff_mpv_framesize_disable ( ScratchpadContext sc)
inlinestatic

Disable allocating the ScratchpadContext's buffers in future calls to ff_mpv_framesize_alloc().

Definition at line 143 of file mpegpicture.h.

Referenced by mpeg_decode_postinit(), and vcr2_init_sequence().

◆ ff_mpv_unref_picture()

void ff_mpv_unref_picture ( MPVWorkPicture pic)

◆ ff_mpv_workpic_from_pic()

void ff_mpv_workpic_from_pic ( MPVWorkPicture wpic,
MPVPicture pic 
)

Definition at line 128 of file mpegpicture.c.

Referenced by ff_mpv_frame_start().

◆ ff_mpv_replace_picture()

void ff_mpv_replace_picture ( MPVWorkPicture dst,
const MPVWorkPicture src 
)

Definition at line 121 of file mpegpicture.c.

Referenced by ff_mpeg_update_thread_context(), and frame_start().