xine-lib 1.2.13-20230125hg15249
|
#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 |
Variables | |
static const char *const | skip_loop_filter_enum_names [] |
static const int | skip_loop_filter_enum_values [] |
#define CM_HAVE_YCGCO_SUPPORT 1 |
#define ENABLE_DIRECT_RENDERING |
#define LOG_MODULE "ffmpeg_video_dec" |
#define LOG_VERBOSE |
#define SLICE_BUFFER_SIZE (1194*1024) |
#define SLICE_OFFSET_SIZE 128 |
Referenced by ff_handle_special_buffer().
#define VIDEOBUFSIZE (128*1024) |
Referenced by bitplane_decode_data(), and ff_video_open_plugin().
typedef struct ff_video_class_s ff_video_class_t |
typedef struct ff_video_decoder_s ff_video_decoder_t |
|
static |
References ff_video_class_s::choose_speed_over_accuracy, xine_cfg_entry_s::num_value, and user_data().
Referenced by init_video_plugin().
|
static |
References vaapi_accel_funcs_s::lock_vaapi, NULL, and vaapi_accel_funcs_s::unlock_vaapi.
Referenced by ff_flush_internal(), ff_handle_buffer(), and ff_handle_mpeg12_buffer().
|
static |
References NULL, and config_values_s::unregister_callbacks.
Referenced by init_video_plugin().
|
static |
References ff_video_class_s::enable_dri, xine_cfg_entry_s::num_value, and user_data().
Referenced by init_video_plugin().
|
static |
References _, XINE_VERBOSITY_LOG, and xprintf.
Referenced by ff_handle_buffer(), and ff_handle_header_buffer().
|
static |
References cm_names, mode(), VO_CAP_COLOR_MATRIX, VO_CAP_FULLRANGE, VO_SET_FLAGS_CM, XINE_VERBOSITY_LOG, and xprintf.
Referenced by ff_convert_frame(), and get_buffer().
|
static |
References BUF_VIDEO_VC1, and ff_vc1_find_header().
Referenced by ff_handle_buffer(), and ff_handle_preview_buffer().
|
static |
References vo_frame_s::base, ff_check_colorspace(), ff_setup_rgb2yuy2(), vaapi_accel_funcs_s::guarded_render, vo_frame_s::pitches, PIX_FMT_YUV411P, PIX_FMT_YUV420P, vaapi_accel_funcs_s::render_vaapi_surface, rgb2yuy2_palette(), rgb2yuy2_slice(), vo_frame_s::width, xine_fast_memcpy, yuv411_to_yv12, and yuv9_to_yv12.
Referenced by ff_flush_internal(), ff_handle_buffer(), and ff_handle_mpeg12_buffer().
|
static |
References _x_stream_info_set(), BUF_FLAG_ASPECT, BUF_FLAG_FRAMERATE, BUF_FLAG_HEADER, BUF_FLAG_PREVIEW, BUF_FLAG_SPECIAL, BUF_VIDEO_MPEG, buf_element_s::decoder_flags, buf_element_s::decoder_info, ff_handle_buffer(), ff_handle_header_buffer(), ff_handle_mpeg12_buffer(), ff_handle_preview_buffer(), ff_handle_special_buffer(), lprintf, buf_element_s::pts, set_stream_info(), buf_element_s::size, buf_element_s::type, and XINE_STREAM_INFO_FRAME_DURATION.
Referenced by ff_video_open_plugin().
|
static |
References lprintf.
Referenced by ff_video_open_plugin().
|
static |
References _, _x_freep(), DLIST_IS_EMPTY, DLIST_REMOVE, ff_flush_internal(), ff_free_dr1_frames(), ffmpeg_lock, lprintf, mpeg_parser_dispose(), ff_saved_frame_t::node, NULL, rgb2yuy2_free(), XINE_VERBOSITY_LOG, and xprintf.
Referenced by ff_video_open_plugin().
|
static |
References ff_flush_internal(), and lprintf.
Referenced by ff_video_open_plugin().
|
static |
References vo_frame_s::crop_bottom, vo_frame_s::crop_right, decode_video_wrapper(), vo_frame_s::draw, vo_frame_s::duration, ff_convert_frame(), ff_untag_pts(), ff_video_step_get(), vo_frame_s::free, vo_frame_s::height, lprintf, NULL, vo_frame_s::progressive_frame, vo_frame_s::pts, set_stream_info(), vo_frame_s::top_field_first, VO_BOTH_FIELDS, ff_saved_frame_t::vo_frame, vo_frame_s::width, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by ff_dispose(), ff_flush(), and ff_reset().
|
static |
References DLIST_ADD_TAIL, DLIST_IS_EMPTY, DLIST_REMOVE, vo_frame_s::free, ff_saved_frame_t::node, ff_saved_frame_t::vo_frame, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by ff_dispose(), and ff_reset().
|
static |
References _x_stream_info_set(), _x_tag32_me2str(), vo_frame_s::bad_frame, BUF_DECODER_MASK, BUF_FLAG_FRAME_END, BUF_FLAG_FRAME_START, BUF_MAJOR_MASK, BUF_VIDEO_DV, buf_element_s::content, vo_frame_s::crop_bottom, vo_frame_s::crop_right, decode_video_wrapper(), buf_element_s::decoder_flags, vo_frame_s::draw, vo_frame_s::duration, ff_check_bufsize(), ff_check_extradata(), ff_convert_frame(), ff_reset(), ff_tag_pts(), ff_untag_pts(), ff_video_step_get(), vo_frame_s::free, vo_frame_s::height, init_postprocess(), init_video_codec(), lprintf, buf_element_s::max_size, NULL, vo_frame_s::progressive_frame, vo_frame_s::pts, set_stream_info(), buf_element_s::size, vo_frame_s::top_field_first, buf_element_s::type, VO_BOTH_FIELDS, ff_saved_frame_t::vo_frame, vo_frame_s::width, xine_fast_memcpy, XINE_IMGFMT_YUY2, XINE_STREAM_INFO_FRAME_DURATION, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by ff_decode_data().
|
static |
References _X_BE_16, _X_BE_32, BUF_FLAG_FRAME_END, BUF_FLAG_STDHEADER, BUF_VIDEO_RV10, BUF_VIDEO_RV20, BUF_VIDEO_RV30, BUF_VIDEO_RV40, buf_element_s::content, buf_element_s::decoder_flags, ff_check_bufsize(), lprintf, buf_element_s::size, buf_element_s::type, xine_fast_memcpy, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.
Referenced by ff_decode_data().
|
static |
References _x_tag32_me2str(), vo_frame_s::bad_frame, buf_element_s::content, decode_video_wrapper(), vo_frame_s::draw, vo_frame_s::duration, ff_convert_frame(), ff_handle_mpeg_sequence(), ff_init_mpeg12_mode(), ff_reset(), ff_tag_pts(), ff_untag_pts(), vo_frame_s::free, lprintf, mpeg_parser_decode_data(), NULL, vo_frame_s::progressive_frame, vo_frame_s::pts, set_stream_info(), buf_element_s::size, vo_frame_s::top_field_first, VO_BOTH_FIELDS, ff_saved_frame_t::vo_frame, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by ff_decode_data().
|
static |
References xine_format_change_data_t::aspect, mpeg_parser_s::frame_aspect_ratio, xine_format_change_data_t::height, mpeg_parser_s::height, lprintf, xine_format_change_data_t::pan_scan, set_stream_info(), xine_format_change_data_t::width, mpeg_parser_s::width, XINE_EVENT_FRAME_FORMAT_CHANGE, and xine_event_send().
Referenced by ff_handle_mpeg12_buffer().
|
static |
References BUF_VIDEO_MPEG, ff_check_extradata(), ff_init_mpeg12_mode(), init_postprocess(), init_video_codec(), lprintf, and buf_element_s::type.
Referenced by ff_decode_data().
|
static |
|
static |
References _x_meta_info_set_utf8(), BUF_VIDEO_MPEG, init_video_codec(), mpeg_parser_init(), NULL, and XINE_META_INFO_VIDEOCODEC.
Referenced by ff_handle_mpeg12_buffer(), and ff_handle_preview_buffer().
|
static |
References ff_flush_internal(), ff_free_dr1_frames(), lprintf, and mpeg_parser_reset().
Referenced by ff_handle_buffer(), ff_handle_mpeg12_buffer(), and ff_video_open_plugin().
|
static |
References cm_names, rgb2yuy2_alloc(), rgb2yuy2_free(), VO_CAP_FULLRANGE, VO_SET_FLAGS_CM, XINE_VERBOSITY_LOG, and xprintf.
Referenced by ff_convert_frame().
|
static |
Referenced by ff_handle_buffer(), and ff_handle_mpeg12_buffer().
|
static |
Referenced by ff_flush_internal(), ff_handle_buffer(), and ff_handle_mpeg12_buffer().
|
static |
References buf_element_s::content, lprintf, buf_element_s::size, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.
Referenced by ff_check_extradata().
|
static |
References _, _x_get_video_streamtype(), _x_meta_info_set_utf8(), BUF_VIDEO_BASE, DLIST_INIT, ff_decode_data(), ff_discontinuity(), ff_dispose(), ff_flush(), ff_reset(), ff_video_lookup, ff_video_lookup_entries, ffmpeg_lock, xine_video_port_s::get_capabilities, xine_video_port_s::get_frame, init_once_routine(), lprintf, MM_ACCEL_X86_MMX, MM_ACCEL_X86_MMXEXT, name, NULL, set_stream_info(), type, xine_stream_s::video_out, VIDEOBUFSIZE, VO_BOTH_FIELDS, VO_CAP_VAAPI, VO_GET_FRAME_MAY_FAIL, xine_stream_s::xine, XINE_IMGFMT_VAAPI, XINE_META_INFO_VIDEOCODEC, xine_mm_accel(), XINE_VERBOSITY_LOG, and xprintf.
Referenced by init_video_plugin().
|
static |
Referenced by ff_flush_internal(), and ff_handle_buffer().
|
static |
References DLIST_ADD_TAIL, DLIST_REMOVE, ff_video_decoder_s::ffsf_free, ff_video_decoder_s::ffsf_mutex, ff_video_decoder_s::ffsf_num, ff_saved_frame_t::node, and ff_saved_frame_t::this.
Referenced by get_buffer(), and release_buffer().
|
static |
References DLIST_ADD_TAIL, DLIST_IS_EMPTY, DLIST_REMOVE, ff_saved_frame_t::node, NULL, ff_saved_frame_t::refs, ff_saved_frame_t::this, and ff_saved_frame_t::vo_frame.
Referenced by get_buffer().
|
static |
References _, vo_frame_s::base, vo_frame_s::crop_bottom, vo_frame_s::crop_left, vo_frame_s::crop_right, vo_frame_s::crop_top, emms, ff_check_colorspace(), ffsf_delete(), ffsf_new(), vo_frame_s::free, vo_frame_s::height, height, lprintf, NULL, vo_frame_s::pitches, PIX_FMT_YUV420P, ff_saved_frame_t::refs, set_stream_info(), VO_BOTH_FIELDS, VO_CAP_CROP, VO_CAP_YV12_DEEP, ff_saved_frame_t::vo_frame, VO_SET_FLAGS_DEPTH, width, XINE_IMGFMT_YV12, XINE_IMGFMT_YV12_DEEP, XINE_VERBOSITY_LOG, and xprintf.
Referenced by init_video_codec().
|
static |
References MM_ACCEL_X86_3DNOW, MM_ACCEL_X86_MMX, MM_ACCEL_X86_MMXEXT, and xine_mm_accel().
Referenced by ff_handle_buffer(), and ff_handle_preview_buffer().
|
static |
References _, _x_stream_info_get(), _x_stream_info_set(), BUF_VIDEO_DV, BUF_VIDEO_H264, BUF_VIDEO_HUFFYUV, BUF_VIDEO_MJPEG, BUF_VIDEO_MPEG, BUF_VIDEO_VP9, ffmpeg_lock, get_buffer(), lprintf, NULL, vaapi_accel_funcs_s::profile_from_imgfmt, release_buffer(), set_stream_info(), skip_loop_filter_enum_values, VO_CAP_CROP, VO_INTERLACED_FLAG, XINE_IMGFMT_VAAPI, XINE_IMGFMT_YV12, XINE_STREAM_INFO_VIDEO_FOURCC, XINE_STREAM_INFO_VIDEO_HANDLED, XINE_VERBOSITY_LOG, and xprintf.
Referenced by ff_handle_buffer(), ff_handle_preview_buffer(), and ff_init_mpeg12_mode().
void * init_video_plugin | ( | xine_t * | xine, |
const void * | data ) |
References _, choose_speed_over_accuracy_cb(), xine_s::config, dispose_video_class(), dri_cb(), ff_video_open_plugin(), N_, NULL, config_values_s::register_bool, config_values_s::register_enum, config_values_s::register_num, config_values_s::register_range, skip_loop_filter_enum_cb(), skip_loop_filter_enum_names, and thread_count_cb().
|
static |
References ffsf_delete(), vo_frame_s::free, lprintf, NULL, and ff_saved_frame_t::vo_frame.
Referenced by init_video_codec().
|
static |
References _x_stream_info_set(), XINE_STREAM_INFO_VIDEO_HEIGHT, XINE_STREAM_INFO_VIDEO_RATIO, and XINE_STREAM_INFO_VIDEO_WIDTH.
Referenced by ff_decode_data(), ff_flush_internal(), ff_handle_buffer(), ff_handle_mpeg12_buffer(), ff_handle_mpeg_sequence(), ff_video_open_plugin(), get_buffer(), and init_video_codec().
|
static |
References xine_cfg_entry_s::num_value, ff_video_class_s::skip_loop_filter_enum, and user_data().
Referenced by init_video_plugin().
|
static |
References xine_cfg_entry_s::num_value, ff_video_class_s::thread_count, and user_data().
Referenced by init_video_plugin().
|
static |
Referenced by init_video_plugin().
|
static |
Referenced by init_video_codec().