xine-lib 1.2.13-20230125hg15249
Data Structures | Macros | Typedefs | Functions | Variables
ff_video_decoder.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <inttypes.h>
#include <string.h>
#include <pthread.h>
#include <math.h>
#include <assert.h>
#include <avcodec.h>
#include <xine/xine_internal.h>
#include "bswap.h"
#include <xine/buffer.h>
#include <xine/xineutils.h>
#include "ffmpeg_decoder.h"
#include "ff_mpeg_parser.h"
#include "ffmpeg_compat.h"
#include "../../video_out/color_matrix.c"

Data Structures

struct  ff_video_class_s
 
struct  ff_video_decoder_s
 
struct  ff_saved_frame_t
 

Macros

#define LOG_MODULE   "ffmpeg_video_dec"
 
#define LOG_VERBOSE
 
#define VIDEOBUFSIZE   (128*1024)
 
#define SLICE_BUFFER_SIZE   (1194*1024)
 
#define SLICE_OFFSET_SIZE   128
 
#define ENABLE_DIRECT_RENDERING
 
#define CM_HAVE_YCGCO_SUPPORT   1
 

Typedefs

typedef struct ff_video_decoder_s ff_video_decoder_t
 
typedef struct ff_video_class_s ff_video_class_t
 

Functions

static void ff_check_colorspace (ff_video_decoder_t *this)
 
static void set_stream_info (ff_video_decoder_t *this)
 
static ff_saved_frame_tffsf_new (ff_video_decoder_t *this)
 
static void ffsf_delete (ff_saved_frame_t *ffsf)
 
static void release_buffer (struct AVCodecContext *context, AVFrame *av_frame)
 
static int get_buffer (AVCodecContext *context, AVFrame *av_frame)
 
static void init_video_codec (ff_video_decoder_t *this, unsigned int codec_type)
 
static void choose_speed_over_accuracy_cb (void *user_data, xine_cfg_entry_t *entry)
 
static void skip_loop_filter_enum_cb (void *user_data, xine_cfg_entry_t *entry)
 
static void thread_count_cb (void *user_data, xine_cfg_entry_t *entry)
 
static void dri_cb (void *user_data, xine_cfg_entry_t *entry)
 
static void init_postprocess (ff_video_decoder_t *this)
 
static int ff_handle_mpeg_sequence (ff_video_decoder_t *this, mpeg_parser_t *parser)
 
static void ff_setup_rgb2yuy2 (ff_video_decoder_t *this, int pix_fmt)
 
static void ff_convert_frame (ff_video_decoder_t *this, vo_frame_t *img, AVFrame *av_frame)
 
static void ff_check_bufsize (ff_video_decoder_t *this, int size)
 
static int ff_vc1_find_header (ff_video_decoder_t *this, buf_element_t *buf)
 
static int ff_check_extradata (ff_video_decoder_t *this, unsigned int codec_type, buf_element_t *buf)
 
static void ff_init_mpeg12_mode (ff_video_decoder_t *this)
 
static void ff_handle_preview_buffer (ff_video_decoder_t *this, buf_element_t *buf)
 
static void ff_handle_header_buffer (ff_video_decoder_t *this, buf_element_t *buf)
 
static void ff_handle_special_buffer (ff_video_decoder_t *this, buf_element_t *buf)
 
static void ff_discontinuity (video_decoder_t *this_gen)
 
static int64_t ff_tag_pts (ff_video_decoder_t *this, int64_t pts)
 
static int64_t ff_untag_pts (ff_video_decoder_t *this, int64_t pts)
 
static int decode_video_wrapper (ff_video_decoder_t *this, AVFrame *av_frame, int *err, void *buf, size_t buf_size)
 
static void ff_reset (video_decoder_t *this_gen)
 
static void ff_handle_mpeg12_buffer (ff_video_decoder_t *this, buf_element_t *buf)
 
static int ff_video_step_get (ff_video_decoder_t *this)
 
static void ff_handle_buffer (ff_video_decoder_t *this, buf_element_t *buf)
 
static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf)
 
static void ff_flush_internal (ff_video_decoder_t *this, int display)
 
static void ff_free_dr1_frames (ff_video_decoder_t *this, int all)
 
static void ff_flush (video_decoder_t *this_gen)
 
static void ff_dispose (video_decoder_t *this_gen)
 
static video_decoder_tff_video_open_plugin (video_decoder_class_t *class_gen, xine_stream_t *stream)
 
static void dispose_video_class (video_decoder_class_t *this_gen)
 
void * init_video_plugin (xine_t *xine, const void *data)
 

Variables

static const char *const skip_loop_filter_enum_names []
 
static const int skip_loop_filter_enum_values []
 

Macro Definition Documentation

◆ CM_HAVE_YCGCO_SUPPORT

#define CM_HAVE_YCGCO_SUPPORT   1

◆ ENABLE_DIRECT_RENDERING

#define ENABLE_DIRECT_RENDERING

◆ LOG_MODULE

#define LOG_MODULE   "ffmpeg_video_dec"

◆ LOG_VERBOSE

#define LOG_VERBOSE

◆ SLICE_BUFFER_SIZE

#define SLICE_BUFFER_SIZE   (1194*1024)

◆ SLICE_OFFSET_SIZE

#define SLICE_OFFSET_SIZE   128

◆ VIDEOBUFSIZE

#define VIDEOBUFSIZE   (128*1024)

Typedef Documentation

◆ ff_video_class_t

◆ ff_video_decoder_t

Function Documentation

◆ choose_speed_over_accuracy_cb()

static void choose_speed_over_accuracy_cb ( void * user_data,
xine_cfg_entry_t * entry )
static

◆ decode_video_wrapper()

static int decode_video_wrapper ( ff_video_decoder_t * this,
AVFrame * av_frame,
int * err,
void * buf,
size_t buf_size )
static

◆ dispose_video_class()

static void dispose_video_class ( video_decoder_class_t * this_gen)
static

◆ dri_cb()

static void dri_cb ( void * user_data,
xine_cfg_entry_t * entry )
static

◆ ff_check_bufsize()

static void ff_check_bufsize ( ff_video_decoder_t * this,
int size )
static

◆ ff_check_colorspace()

static void ff_check_colorspace ( ff_video_decoder_t * this)
static

◆ ff_check_extradata()

static int ff_check_extradata ( ff_video_decoder_t * this,
unsigned int codec_type,
buf_element_t * buf )
static

◆ ff_convert_frame()

static void ff_convert_frame ( ff_video_decoder_t * this,
vo_frame_t * img,
AVFrame * av_frame )
static

◆ ff_decode_data()

static void ff_decode_data ( video_decoder_t * this_gen,
buf_element_t * buf )
static

◆ ff_discontinuity()

static void ff_discontinuity ( video_decoder_t * this_gen)
static

References lprintf.

Referenced by ff_video_open_plugin().

◆ ff_dispose()

static void ff_dispose ( video_decoder_t * this_gen)
static

◆ ff_flush()

static void ff_flush ( video_decoder_t * this_gen)
static

References ff_flush_internal(), and lprintf.

Referenced by ff_video_open_plugin().

◆ ff_flush_internal()

static void ff_flush_internal ( ff_video_decoder_t * this,
int display )
static

◆ ff_free_dr1_frames()

static void ff_free_dr1_frames ( ff_video_decoder_t * this,
int all )
static

◆ ff_handle_buffer()

static void ff_handle_buffer ( ff_video_decoder_t * this,
buf_element_t * buf )
static

◆ ff_handle_header_buffer()

static void ff_handle_header_buffer ( ff_video_decoder_t * this,
buf_element_t * buf )
static

◆ ff_handle_mpeg12_buffer()

static void ff_handle_mpeg12_buffer ( ff_video_decoder_t * this,
buf_element_t * buf )
static

◆ ff_handle_mpeg_sequence()

static int ff_handle_mpeg_sequence ( ff_video_decoder_t * this,
mpeg_parser_t * parser )
static

◆ ff_handle_preview_buffer()

static void ff_handle_preview_buffer ( ff_video_decoder_t * this,
buf_element_t * buf )
static

◆ ff_handle_special_buffer()

static void ff_handle_special_buffer ( ff_video_decoder_t * this,
buf_element_t * buf )
static

◆ ff_init_mpeg12_mode()

static void ff_init_mpeg12_mode ( ff_video_decoder_t * this)
static

◆ ff_reset()

static void ff_reset ( video_decoder_t * this_gen)
static

◆ ff_setup_rgb2yuy2()

static void ff_setup_rgb2yuy2 ( ff_video_decoder_t * this,
int pix_fmt )
static

◆ ff_tag_pts()

static int64_t ff_tag_pts ( ff_video_decoder_t * this,
int64_t pts )
static

◆ ff_untag_pts()

static int64_t ff_untag_pts ( ff_video_decoder_t * this,
int64_t pts )
static

◆ ff_vc1_find_header()

static int ff_vc1_find_header ( ff_video_decoder_t * this,
buf_element_t * buf )
static

◆ ff_video_open_plugin()

static video_decoder_t * ff_video_open_plugin ( video_decoder_class_t * class_gen,
xine_stream_t * stream )
static

◆ ff_video_step_get()

static int ff_video_step_get ( ff_video_decoder_t * this)
static

◆ ffsf_delete()

static void ffsf_delete ( ff_saved_frame_t * ffsf)
static

◆ ffsf_new()

static ff_saved_frame_t * ffsf_new ( ff_video_decoder_t * this)
static

◆ get_buffer()

static int get_buffer ( AVCodecContext * context,
AVFrame * av_frame )
static

◆ init_postprocess()

static void init_postprocess ( ff_video_decoder_t * this)
static

◆ init_video_codec()

static void init_video_codec ( ff_video_decoder_t * this,
unsigned int codec_type )
static

◆ init_video_plugin()

void * init_video_plugin ( xine_t * xine,
const void * data )

◆ release_buffer()

static void release_buffer ( struct AVCodecContext * context,
AVFrame * av_frame )
static

◆ set_stream_info()

static void set_stream_info ( ff_video_decoder_t * this)
static

◆ skip_loop_filter_enum_cb()

static void skip_loop_filter_enum_cb ( void * user_data,
xine_cfg_entry_t * entry )
static

◆ thread_count_cb()

static void thread_count_cb ( void * user_data,
xine_cfg_entry_t * entry )
static

Variable Documentation

◆ skip_loop_filter_enum_names

const char* const skip_loop_filter_enum_names[]
static
Initial value:
= {
"default",
"none",
"nonref",
"bidir",
"nonkey",
"all",
}
NULL
Definition xine_plugin.c:78

Referenced by init_video_plugin().

◆ skip_loop_filter_enum_values

const int skip_loop_filter_enum_values[]
static
Initial value:
= {
AVDISCARD_DEFAULT,
AVDISCARD_NONE,
AVDISCARD_NONREF,
AVDISCARD_BIDIR,
AVDISCARD_NONKEY,
AVDISCARD_ALL
}

Referenced by init_video_codec().