xine-lib 1.2.13-20230125hg15249
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <xine/xine_internal.h>
#include <xine/video_out.h>
#include <xine/buffer.h>
#include <xine/xineutils.h>
#include "accel_vdpau.h"
#include "bits_reader.h"
#include "group_vdpau.h"
#include <vdpau/vdpau.h>
Data Structures | |
struct | picture_t |
struct | sequence_t |
struct | vdpau_mpeg4_decoder_s |
Macros | |
#define | LOG_MODULE "vdpau_mpeg4" |
#define | begin_vo_start_code 0x00 |
#define | end_vo_start_code 0x1f |
#define | begin_vol_start_code 0x20 |
#define | end_vol_start_code 0x2f |
#define | viso_sequence_start_code 0xb0 |
#define | viso_sequence_end_code 0xb1 |
#define | viso_start_code 0xb5 |
#define | group_start_code 0xb3 |
#define | user_data_start_code 0xb2 |
#define | vop_start_code 0xb6 |
#define | I_FRAME 0 |
#define | P_FRAME 1 |
#define | B_FRAME 2 |
#define | PICTURE_TOP 1 |
#define | PICTURE_BOTTOM 2 |
#define | PICTURE_FRAME 3 |
#define | SHAPE_RECT 0 |
#define | SHAPE_BIN 1 |
#define | SHAPE_BINONLY 2 |
#define | SHAPE_GRAY 3 |
#define | SPRITE_STATIC 1 |
#define | SPRITE_GMC 2 |
#define | ROUNDED_DIV(a, b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b)) |
Typedefs | |
typedef struct vdpau_mpeg4_decoder_s | vdpau_mpeg4_decoder_t |
Functions | |
static void | reset_picture (picture_t *pic) |
static void | init_picture (picture_t *pic) |
static void | reset_sequence (sequence_t *sequence, int free_refs) |
static void | free_sequence (sequence_t *sequence) |
static void | update_metadata (vdpau_mpeg4_decoder_t *this_gen) |
static void | visual_object (vdpau_mpeg4_decoder_t *this_gen, uint8_t *buf, int len) |
static void | video_object_layer (vdpau_mpeg4_decoder_t *this_gen, uint8_t *buf, int len) |
static void | video_object_plane (vdpau_mpeg4_decoder_t *this_gen, uint8_t *buf, int len) |
static void | gop_header (vdpau_mpeg4_decoder_t *this_gen, uint8_t *buf, int len) |
static void | user_data (vdpau_mpeg4_decoder_t *this_gen, uint8_t *buffer, int len) |
static int | parse_code (vdpau_mpeg4_decoder_t *this_gen, uint8_t *buf, int len) |
static void | decode_render (vdpau_mpeg4_decoder_t *vd, vdpau_accel_t *accel, uint8_t *buf, int len) |
static void | decode_picture (vdpau_mpeg4_decoder_t *vd) |
static void | vdpau_mpeg4_decode_data (video_decoder_t *this_gen, buf_element_t *buf) |
static void | vdpau_mpeg4_flush (video_decoder_t *this_gen) |
static void | vdpau_mpeg4_reset (video_decoder_t *this_gen) |
static void | vdpau_mpeg4_discontinuity (video_decoder_t *this_gen) |
static void | vdpau_mpeg4_dispose (video_decoder_t *this_gen) |
static video_decoder_t * | open_plugin (video_decoder_class_t *class_gen, xine_stream_t *stream) |
void * | mpeg4_init_plugin (xine_t *xine, const void *data) |
Variables | |
static int | nframe |
static const uint8_t | default_intra_quantizer_matrix [64] |
static const uint8_t | default_non_intra_quantizer_matrix [64] |
uint8_t | mpeg_scan_norm [64] |
#define B_FRAME 2 |
Referenced by decode_picture(), and video_object_plane().
#define begin_vo_start_code 0x00 |
#define begin_vol_start_code 0x20 |
Referenced by parse_code().
#define end_vo_start_code 0x1f |
Referenced by parse_code().
#define end_vol_start_code 0x2f |
Referenced by parse_code().
#define group_start_code 0xb3 |
Referenced by parse_code().
#define I_FRAME 0 |
Referenced by decode_picture(), and video_object_plane().
#define LOG_MODULE "vdpau_mpeg4" |
#define P_FRAME 1 |
Referenced by decode_picture(), and video_object_plane().
#define PICTURE_BOTTOM 2 |
#define PICTURE_FRAME 3 |
#define PICTURE_TOP 1 |
#define ROUNDED_DIV | ( | a, | |
b ) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b)) |
Referenced by video_object_plane().
#define SHAPE_BIN 1 |
#define SHAPE_BINONLY 2 |
Referenced by video_object_layer(), and video_object_plane().
#define SHAPE_GRAY 3 |
Referenced by video_object_layer(), and video_object_plane().
#define SHAPE_RECT 0 |
Referenced by reset_picture(), video_object_layer(), and video_object_plane().
#define SPRITE_GMC 2 |
Referenced by video_object_layer().
#define SPRITE_STATIC 1 |
Referenced by video_object_layer().
#define user_data_start_code 0xb2 |
Referenced by parse_code().
#define viso_sequence_end_code 0xb1 |
Referenced by parse_code().
#define viso_sequence_start_code 0xb0 |
Referenced by parse_code().
#define viso_start_code 0xb5 |
Referenced by parse_code().
#define vop_start_code 0xb6 |
Referenced by parse_code().
typedef struct vdpau_mpeg4_decoder_s vdpau_mpeg4_decoder_t |
|
static |
References vo_frame_s::accel_data, sequence_t::accel_vdpau, B_FRAME, sequence_t::backward_ref, vo_frame_s::bad_frame, sequence_t::buf, sequence_t::bufpos, sequence_t::coded_height, sequence_t::coded_width, sequence_t::color_matrix, vdpau_accel_t::current_vdp_runtime_nr, decode_render(), vdpau_mpeg4_decoder_s::decoder, vo_frame_s::draw, vo_frame_s::drawn, vo_frame_s::duration, sequence_t::forward_ref, vo_frame_s::free, xine_video_port_s::get_frame, I_FRAME, NULL, P_FRAME, sequence_t::picture, sequence_t::profile, vo_frame_s::progressive_frame, vo_frame_s::pts, sequence_t::ratio, sequence_t::seq_pts, vdpau_mpeg4_decoder_s::sequence, vdpau_mpeg4_decoder_s::stream, vdpau_accel_t::surface, vo_frame_s::top_field_first, picture_t::vdp_infos, sequence_t::vdp_runtime_nr, xine_stream_s::video_out, sequence_t::video_step, VO_BOTH_FIELDS, and XINE_IMGFMT_VDPAU.
Referenced by vdpau_mpeg4_decode_data().
|
static |
References CAST_VdpPictureInfo_PTR, sequence_t::coded_height, sequence_t::coded_width, vdpau_mpeg4_decoder_s::decoder, vdpau_mpeg4_decoder_s::decoder_height, vdpau_mpeg4_decoder_s::decoder_profile, vdpau_mpeg4_decoder_s::decoder_width, vdpau_accel_t::lock, lprintf, nframe, sequence_t::picture, sequence_t::profile, sequence_t::seq_pts, vdpau_mpeg4_decoder_s::sequence, vdpau_accel_t::surface, vdpau_accel_t::unlock, vdpau_accel_t::vdp_decoder_create, vdpau_accel_t::vdp_decoder_destroy, vdpau_accel_t::vdp_decoder_render, vdpau_accel_t::vdp_device, vdpau_accel_t::vdp_get_error_string, picture_t::vdp_infos, sequence_t::vdp_runtime_nr, vdpau_accel_t::vdp_runtime_nr, and vdpau_accel_t::vo_frame.
Referenced by decode_picture().
|
static |
|
static |
References bits_reader_set(), sequence_t::br, read_bits(), vdpau_mpeg4_decoder_s::sequence, skip_bits(), and sequence_t::time_base.
Referenced by parse_code().
|
static |
References reset_picture().
Referenced by open_plugin().
void * mpeg4_init_plugin | ( | xine_t * | xine, |
const void * | data ) |
References video_decoder_s::dispose, N_, NULL, open_plugin(), and video_decoder_class_s::open_plugin.
|
static |
References vo_frame_s::accel_data, vo_frame_s::free, free_sequence(), xine_video_port_s::get_capabilities, xine_video_port_s::get_frame, init_picture(), vdpau_accel_t::lock, lprintf, nframe, NULL, xine_video_port_s::open, vdpau_accel_t::unlock, vdpau_accel_t::vdp_decoder_create, vdpau_accel_t::vdp_decoder_destroy, VDP_DECODER_PROFILE_MPEG4_PART2_ASP, vdpau_accel_t::vdp_device, vdpau_accel_t::vdp_runtime_nr, vdpau_mpeg4_decode_data(), vdpau_mpeg4_discontinuity(), vdpau_mpeg4_dispose(), vdpau_mpeg4_flush(), vdpau_mpeg4_reset(), xine_stream_s::video_out, VO_BOTH_FIELDS, VO_CAP_VDPAU_MPEG4, vdpau_accel_t::vo_frame, VO_GET_FRAME_MAY_FAIL, VO_NEW_SEQUENCE_FLAG, and XINE_IMGFMT_VDPAU.
Referenced by mpeg4_init_plugin().
|
static |
References begin_vol_start_code, end_vo_start_code, end_vol_start_code, gop_header(), group_start_code, sequence_t::have_header, lprintf, vdpau_mpeg4_decoder_s::sequence, user_data(), user_data_start_code, video_object_layer(), video_object_plane(), viso_sequence_end_code, viso_sequence_start_code, viso_start_code, visual_object(), and vop_start_code.
Referenced by vdpau_mpeg4_decode_data().
|
static |
References picture_t::complexity_estimation_disable, lprintf, picture_t::newpred_enable, picture_t::progressive_frame, picture_t::quant_precision, picture_t::reduced_resolution_vop_enable, SHAPE_RECT, picture_t::vdp_infos, picture_t::viso_verid, and picture_t::vol_shape.
Referenced by init_picture().
|
static |
References sequence_t::backward_ref, sequence_t::bufpos, sequence_t::bufseek, sequence_t::cur_pts, sequence_t::forward_ref, vo_frame_s::free, sequence_t::last_non_b_time, sequence_t::last_time_base, NULL, vo_frame_s::pts, sequence_t::reset, sequence_t::seq_pts, sequence_t::start, sequence_t::t_frame, sequence_t::time, sequence_t::time_base, sequence_t::top_field_first, and VO_NEW_SEQUENCE_FLAG.
Referenced by free_sequence(), vdpau_mpeg4_discontinuity(), and vdpau_mpeg4_reset().
|
static |
References _x_meta_info_set_utf8(), _x_stream_info_set(), xine_format_change_data_t::aspect, sequence_t::codec_name, sequence_t::coded_height, sequence_t::coded_width, xine_format_change_data_t::height, sequence_t::ratio, vdpau_mpeg4_decoder_s::sequence, vdpau_mpeg4_decoder_s::stream, sequence_t::video_step, xine_format_change_data_t::width, XINE_EVENT_FRAME_FORMAT_CHANGE, xine_event_send(), XINE_META_INFO_VIDEOCODEC, XINE_STREAM_INFO_FRAME_DURATION, XINE_STREAM_INFO_VIDEO_HEIGHT, XINE_STREAM_INFO_VIDEO_RATIO, and XINE_STREAM_INFO_VIDEO_WIDTH.
Referenced by user_data(), and video_object_layer().
|
static |
References sequence_t::codec_name, sequence_t::have_codec_name, vdpau_mpeg4_decoder_s::sequence, and update_metadata().
Referenced by __attribute__(), __attribute__(), _alsa_dev_name_cb(), _alsa_mmap_cb(), _alsa_speaker_arrangement_cb(), _new_entry_cb(), _x_vo_scale_init(), _x_vo_scale_redraw_needed(), alphablend_disable_exact_osd_alpha_blending_changed(), ao_ticket_revoked(), choose_speed_over_accuracy_cb(), directfb_frame_output_cb(), dri_cb(), event_handler(), event_handler_external(), ff_gain_cb(), gain_cb(), jack_speaker_arrangement_cb(), metronom_register_speed_change_callback(), metronom_unregister_speed_change_callback(), oss_speaker_arrangement_cb(), parse_code(), pgx64_config_changed(), raw_display_frame(), raw_open_plugin(), raw_overlay_end(), skip_loop_filter_enum_cb(), thread_count_cb(), ticket_revoke_cb_register(), ticket_revoke_cb_unregister(), update_fast_memcpy(), vcd_flush_buffers(), vcd_force_redisplay(), vcd_set_aspect_ratio(), vcd_update_title_display(), vdec_hw_h264_new(), vdpau_h264_alter_frame_delete(), vdpau_h264_alter_frame_new(), vdpau_h264_alter_frame_ready(), vdpau_h264_alter_frame_render(), vo_ticket_revoked(), xine_event_create_listener_thread(), XINE_FORMAT_PRINTF(), xine_register_log_cb(), xshm_open_plugin_2(), xv_default_lock_display(), and xv_default_unlock_display().
|
static |
References sequence_t::buf, BUF_FLAG_PREVIEW, sequence_t::bufpos, sequence_t::bufseek, sequence_t::bufsize, buf_element_s::content, sequence_t::cur_pts, decode_picture(), buf_element_s::decoder_flags, parse_code(), buf_element_s::pts, buf_element_s::size, sequence_t::start, and xine_fast_memcpy.
Referenced by open_plugin().
|
static |
References lprintf, and reset_sequence().
Referenced by open_plugin().
|
static |
References free_sequence(), and lprintf.
Referenced by open_plugin().
|
static |
References lprintf.
Referenced by open_plugin().
|
static |
References lprintf, and reset_sequence().
Referenced by open_plugin().
|
static |
References bits_reader_set(), sequence_t::br, sequence_t::coded_height, sequence_t::coded_width, picture_t::complexity_estimation_disable, default_intra_quantizer_matrix, default_non_intra_quantizer_matrix, sequence_t::fixed_vop_time_increment, sequence_t::have_header, lprintf, mpeg_scan_norm, picture_t::newpred_enable, sequence_t::picture, picture_t::quant_precision, sequence_t::ratio, read_bits(), picture_t::reduced_resolution_vop_enable, vdpau_mpeg4_decoder_s::sequence, SHAPE_BINONLY, SHAPE_GRAY, SHAPE_RECT, skip_bits(), picture_t::sprite_enable, SPRITE_GMC, SPRITE_STATIC, sequence_t::t_frame, sequence_t::time_increment_bits, update_metadata(), picture_t::vdp_infos, sequence_t::video_step, and picture_t::vol_shape.
Referenced by parse_code().
|
static |
References B_FRAME, bits_reader_set(), sequence_t::br, picture_t::complexity_estimation_disable, sequence_t::cur_pts, get_bits(), I_FRAME, sequence_t::last_non_b_time, sequence_t::last_time_base, picture_t::newpred_enable, P_FRAME, sequence_t::picture, picture_t::quant_precision, read_bits(), picture_t::reduced_resolution_vop_enable, ROUNDED_DIV, sequence_t::seq_pts, vdpau_mpeg4_decoder_s::sequence, SHAPE_BINONLY, SHAPE_GRAY, SHAPE_RECT, skip_bits(), sequence_t::t_frame, sequence_t::time, sequence_t::time_base, sequence_t::time_increment_bits, picture_t::vdp_infos, and picture_t::vol_shape.
Referenced by parse_code().
|
static |
References bits_reader_set(), sequence_t::br, sequence_t::color_matrix, lprintf, sequence_t::picture, read_bits(), vdpau_mpeg4_decoder_s::sequence, skip_bits(), picture_t::viso_verid, and VO_SET_FLAGS_CM.
Referenced by parse_code().
|
static |
Referenced by video_object_layer().
|
static |
Referenced by video_object_layer().
uint8_t mpeg_scan_norm[64] |
Referenced by video_object_layer().
|
static |
Referenced by decode_render(), and open_plugin().