FFmpeg
|
#include <stdint.h>
#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/pixdesc.h"
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "motion_est.h"
#include "mpegpicture.h"
#include "mpegutils.h"
#include "refstruct.h"
#include "threadframe.h"
Go to the source code of this file.
Macros | |
#define | MAKE_WRITABLE(table) |
#define | EMU_EDGE_HEIGHT (4 * 70) |
Functions | |
static void av_noinline | free_picture_tables (Picture *pic) |
static int | make_table_writable (AVBufferRef **ref) |
static int | make_tables_writable (Picture *pic) |
int | ff_mpeg_framesize_alloc (AVCodecContext *avctx, MotionEstContext *me, ScratchpadContext *sc, int linesize) |
static int | handle_pic_linesizes (AVCodecContext *avctx, Picture *pic, MotionEstContext *me, ScratchpadContext *sc, int linesize, int uvlinesize) |
Check the pic's linesize and allocate linesize dependent scratch buffers. More... | |
static int | alloc_picture_tables (AVCodecContext *avctx, Picture *pic, int encoding, int out_format, int mb_stride, int mb_width, int mb_height, int b8_stride) |
int | ff_alloc_picture (AVCodecContext *avctx, Picture *pic, MotionEstContext *me, ScratchpadContext *sc, int encoding, int out_format, int mb_stride, int mb_width, int mb_height, int b8_stride, ptrdiff_t *linesize, ptrdiff_t *uvlinesize) |
Allocate a Picture. More... | |
void | ff_mpeg_unref_picture (Picture *pic) |
Deallocate a picture; frees the picture tables in case they need to be reallocated anyway. More... | |
int | ff_update_picture_tables (Picture *dst, const Picture *src) |
int | ff_mpeg_ref_picture (Picture *dst, Picture *src) |
static int | pic_is_unused (Picture *pic) |
static int | find_unused_picture (AVCodecContext *avctx, Picture *picture, int shared) |
int | ff_find_unused_picture (AVCodecContext *avctx, Picture *picture, int shared) |
void av_cold | ff_mpv_picture_free (Picture *pic) |
#define MAKE_WRITABLE | ( | table | ) |
#define EMU_EDGE_HEIGHT (4 * 70) |
|
static |
Definition at line 35 of file mpegpicture.c.
Referenced by ff_alloc_picture(), ff_mpeg_unref_picture(), ff_mpv_picture_free(), and ff_update_picture_tables().
|
static |
Definition at line 50 of file mpegpicture.c.
Definition at line 64 of file mpegpicture.c.
Referenced by ff_alloc_picture().
int ff_mpeg_framesize_alloc | ( | AVCodecContext * | avctx, |
MotionEstContext * | me, | ||
ScratchpadContext * | sc, | ||
int | linesize | ||
) |
Definition at line 87 of file mpegpicture.c.
Referenced by ff_mpeg_update_thread_context(), ff_update_duplicate_context(), and handle_pic_linesizes().
|
static |
Check the pic's linesize and allocate linesize dependent scratch buffers.
Definition at line 127 of file mpegpicture.c.
Referenced by ff_alloc_picture().
|
static |
Definition at line 163 of file mpegpicture.c.
Referenced by ff_alloc_picture().
int ff_alloc_picture | ( | AVCodecContext * | avctx, |
Picture * | pic, | ||
MotionEstContext * | me, | ||
ScratchpadContext * | sc, | ||
int | encoding, | ||
int | out_format, | ||
int | mb_stride, | ||
int | mb_width, | ||
int | mb_height, | ||
int | b8_stride, | ||
ptrdiff_t * | linesize, | ||
ptrdiff_t * | uvlinesize | ||
) |
Allocate a Picture.
Allocate a Picture's accessories, but not the AVFrame's buffer itself.
The pixels are allocated/set by calling get_buffer() if shared = 0
Definition at line 203 of file mpegpicture.c.
Referenced by alloc_picture().
void ff_mpeg_unref_picture | ( | Picture * | pic | ) |
Deallocate a picture; frees the picture tables in case they need to be reallocated anyway.
Definition at line 253 of file mpegpicture.c.
Referenced by alloc_picture(), ff_alloc_picture(), ff_find_unused_picture(), ff_mpeg_flush(), ff_mpeg_ref_picture(), ff_mpeg_update_thread_context(), ff_mpv_encode_picture(), ff_mpv_frame_start(), ff_mpv_picture_free(), frame_start(), handle_pic_linesizes(), load_input_picture(), and select_input_picture().
Definition at line 272 of file mpegpicture.c.
Referenced by ff_mpeg_ref_picture().
Definition at line 304 of file mpegpicture.c.
Referenced by ff_mpeg_update_thread_context(), ff_mpv_frame_start(), and frame_start().
Definition at line 338 of file mpegpicture.c.
Referenced by find_unused_picture().
|
static |
Definition at line 347 of file mpegpicture.c.
Referenced by ff_find_unused_picture().
int ff_find_unused_picture | ( | AVCodecContext * | avctx, |
Picture * | picture, | ||
int | shared | ||
) |
Definition at line 380 of file mpegpicture.c.
Referenced by ff_mpv_frame_start(), load_input_picture(), and select_input_picture().
Definition at line 392 of file mpegpicture.c.
Referenced by ff_mpv_common_end().