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_mpeg12_decoder_s |
Macros | |
#define | LOG_MODULE "vdpau_mpeg12" |
#define | sequence_header_code 0xb3 |
#define | sequence_error_code 0xb4 |
#define | sequence_end_code 0xb7 |
#define | group_start_code 0xb8 |
#define | extension_start_code 0xb5 |
#define | user_data_start_code 0xb2 |
#define | picture_start_code 0x00 |
#define | begin_slice_start_code 0x01 |
#define | end_slice_start_code 0xaf |
#define | sequence_ext_sc 1 |
#define | quant_matrix_ext_sc 3 |
#define | picture_coding_ext_sc 8 |
#define | sequence_display_ext_sc 2 |
#define | I_FRAME 1 |
#define | P_FRAME 2 |
#define | B_FRAME 3 |
#define | PICTURE_TOP 1 |
#define | PICTURE_BOTTOM 2 |
#define | PICTURE_FRAME 3 |
Typedefs | |
typedef struct vdpau_mpeg12_decoder_s | vdpau_mpeg12_decoder_t |
Functions | |
static void | picture_ready (vdpau_mpeg12_decoder_t *vd, uint8_t end_of_sequence) |
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 | sequence_header (vdpau_mpeg12_decoder_t *this_gen, uint8_t *buf, int len) |
static void | process_sequence_mpeg12_dependent_data (vdpau_mpeg12_decoder_t *this_gen) |
static void | picture_header (vdpau_mpeg12_decoder_t *this_gen, uint8_t *buf, int len) |
static void | sequence_extension (sequence_t *sequence, uint8_t *buf, int len) |
static void | picture_coding_extension (sequence_t *sequence, uint8_t *buf, int len) |
static void | quant_matrix_extension (sequence_t *sequence, uint8_t *buf, int len) |
static void | copy_slice (sequence_t *sequence, uint8_t *buf, int len) |
static int | parse_code (vdpau_mpeg12_decoder_t *this_gen, uint8_t *buf, int len) |
static void | decode_render (vdpau_mpeg12_decoder_t *vd, vdpau_accel_t *accel) |
static void | decode_picture (vdpau_mpeg12_decoder_t *vd, uint8_t end_of_sequence) |
static void | vdpau_mpeg12_decode_data (video_decoder_t *this_gen, buf_element_t *buf) |
static void | vdpau_mpeg12_flush (video_decoder_t *this_gen) |
static void | vdpau_mpeg12_reset (video_decoder_t *this_gen) |
static void | vdpau_mpeg12_discontinuity (video_decoder_t *this_gen) |
static void | vdpau_mpeg12_dispose (video_decoder_t *this_gen) |
static video_decoder_t * | open_plugin (video_decoder_class_t *class_gen, xine_stream_t *stream) |
void * | mpeg12_init_plugin (xine_t *xine, const void *data) |
Variables | |
static const uint8_t | default_intra_quantizer_matrix [64] |
uint8_t | mpeg2_scan_norm [64] |
#define B_FRAME 3 |
Referenced by decode_picture(), decode_render(), and picture_header().
#define begin_slice_start_code 0x01 |
Referenced by parse_code().
#define end_slice_start_code 0xaf |
Referenced by parse_code().
#define extension_start_code 0xb5 |
Referenced by parse_code().
#define group_start_code 0xb8 |
Referenced by parse_code().
#define I_FRAME 1 |
Referenced by decode_picture(), decode_render(), and picture_header().
#define LOG_MODULE "vdpau_mpeg12" |
#define P_FRAME 2 |
Referenced by decode_picture(), and decode_render().
#define PICTURE_BOTTOM 2 |
#define picture_coding_ext_sc 8 |
Referenced by parse_code().
#define PICTURE_FRAME 3 |
Referenced by decode_picture(), decode_render(), picture_coding_extension(), and picture_header().
#define picture_start_code 0x00 |
Referenced by parse_code().
#define PICTURE_TOP 1 |
#define quant_matrix_ext_sc 3 |
Referenced by parse_code().
#define sequence_display_ext_sc 2 |
Referenced by parse_code().
#define sequence_end_code 0xb7 |
Referenced by parse_code(), and vdpau_mpeg12_decode_data().
#define sequence_error_code 0xb4 |
Referenced by parse_code().
#define sequence_ext_sc 1 |
Referenced by parse_code().
#define sequence_header_code 0xb3 |
Referenced by parse_code().
#define user_data_start_code 0xb2 |
Referenced by parse_code().
typedef struct vdpau_mpeg12_decoder_s vdpau_mpeg12_decoder_t |
|
static |
References sequence_t::picture, picture_t::slices, picture_t::slices_count, picture_t::slices_count2, picture_t::slices_pos, picture_t::slices_pos_top, picture_t::slices_size, and xine_fast_memcpy.
Referenced by parse_code().
|
static |
References vo_frame_s::accel_data, sequence_t::accel_vdpau, B_FRAME, sequence_t::backward_ref, vo_frame_s::bad_frame, sequence_t::chroma, sequence_t::coded_height, sequence_t::coded_width, vdpau_accel_t::current_vdp_runtime_nr, decode_render(), vdpau_mpeg12_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, lprintf, NULL, P_FRAME, sequence_t::picture, PICTURE_FRAME, sequence_t::profile, vo_frame_s::progressive_frame, picture_t::progressive_frame, sequence_t::progressive_sequence, vo_frame_s::pts, sequence_t::ratio, vo_frame_s::repeat_first_field, picture_t::repeat_first_field, sequence_t::reset, sequence_t::seq_pts, vdpau_mpeg12_decoder_s::sequence, picture_t::slices, picture_t::slices_pos, vdpau_mpeg12_decoder_s::stream, vdpau_accel_t::surface, vo_frame_s::top_field_first, sequence_t::top_field_first, picture_t::vdp_infos, sequence_t::vdp_runtime_nr, xine_stream_s::video_out, sequence_t::video_step, VO_BOTH_FIELDS, VO_SET_FLAGS_CM, VO_STILL_IMAGE, and XINE_IMGFMT_VDPAU.
Referenced by picture_ready(), and vdpau_mpeg12_decode_data().
|
static |
References B_FRAME, CAST_VdpPictureInfo_PTR, sequence_t::coded_height, sequence_t::coded_width, sequence_t::cur_pts, vdpau_mpeg12_decoder_s::decoder, vdpau_mpeg12_decoder_s::decoder_height, vdpau_mpeg12_decoder_s::decoder_profile, vdpau_mpeg12_decoder_s::decoder_width, I_FRAME, vdpau_accel_t::lock, lprintf, P_FRAME, sequence_t::picture, PICTURE_FRAME, sequence_t::profile, vdpau_mpeg12_decoder_s::sequence, picture_t::slices, picture_t::slices_count, picture_t::slices_count2, picture_t::slices_pos, picture_t::slices_pos_top, 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, picture_t::vdp_infos2, sequence_t::vdp_runtime_nr, vdpau_accel_t::vdp_runtime_nr, and vdpau_accel_t::vo_frame.
Referenced by decode_picture().
|
static |
References sequence_t::chroma, sequence_t::have_header, lprintf, sequence_t::profile, reset_sequence(), and sequence_t::video_step.
Referenced by open_plugin(), and vdpau_mpeg12_dispose().
|
static |
References reset_picture(), picture_t::slices, and picture_t::slices_size.
Referenced by open_plugin().
void * mpeg12_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, NULL, xine_video_port_s::open, vdpau_accel_t::unlock, vdpau_accel_t::vdp_decoder_create, vdpau_accel_t::vdp_decoder_destroy, vdpau_accel_t::vdp_device, vdpau_accel_t::vdp_runtime_nr, vdpau_mpeg12_decode_data(), vdpau_mpeg12_discontinuity(), vdpau_mpeg12_dispose(), vdpau_mpeg12_flush(), vdpau_mpeg12_reset(), xine_stream_s::video_out, VO_BOTH_FIELDS, VO_CAP_VDPAU_MPEG12, vdpau_accel_t::vo_frame, VO_GET_FRAME_MAY_FAIL, VO_NEW_SEQUENCE_FLAG, and XINE_IMGFMT_VDPAU.
Referenced by mpeg12_init_plugin().
|
static |
References begin_slice_start_code, copy_slice(), end_slice_start_code, extension_start_code, group_start_code, sequence_t::have_header, lprintf, picture_coding_ext_sc, picture_coding_extension(), picture_header(), picture_start_code, quant_matrix_ext_sc, quant_matrix_extension(), vdpau_mpeg12_decoder_s::sequence, sequence_display_ext_sc, sequence_end_code, sequence_error_code, sequence_ext_sc, sequence_extension(), sequence_header(), sequence_header_code, and user_data_start_code.
Referenced by vdpau_mpeg12_decode_data().
|
static |
References bits_reader_set(), sequence_t::br, lprintf, sequence_t::picture, PICTURE_FRAME, picture_t::progressive_frame, read_bits(), picture_t::repeat_first_field, skip_bits(), picture_t::vdp_infos, and picture_t::vdp_infos2.
Referenced by parse_code().
|
static |
References B_FRAME, bits_reader_set(), sequence_t::br, sequence_t::cur_pts, I_FRAME, lprintf, sequence_t::picture, PICTURE_FRAME, picture_ready(), process_sequence_mpeg12_dependent_data(), sequence_t::profile, read_bits(), reset_picture(), sequence_t::seq_pts, vdpau_mpeg12_decoder_s::sequence, skip_bits(), picture_t::slices_pos, picture_t::slices_pos_top, picture_t::vdp_infos, and picture_t::vdp_infos2.
Referenced by parse_code().
|
static |
References decode_picture(), sequence_t::picture, vdpau_mpeg12_decoder_s::sequence, picture_t::slices_count, picture_t::slices_count2, and picture_t::vdp_infos2.
Referenced by picture_header().
|
static |
References _x_meta_info_set_utf8(), _x_stream_info_set(), xine_format_change_data_t::aspect, sequence_t::aspect_ratio_information, sequence_t::coded_height, sequence_t::coded_width, sequence_t::display_horizontal_size, sequence_t::display_vertical_size, sequence_t::frame_rate_code, sequence_t::frame_rate_extension_d, sequence_t::frame_rate_extension_n, sequence_t::have_display_extension, sequence_t::have_header, xine_format_change_data_t::height, sequence_t::horizontal_size_extension, sequence_t::horizontal_size_value, sequence_t::profile, sequence_t::ratio, sequence_t::reported_video_step, vdpau_mpeg12_decoder_s::sequence, vdpau_mpeg12_decoder_s::stream, sequence_t::vertical_size_extension, sequence_t::vertical_size_value, 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 picture_header().
|
static |
References bits_reader_set(), sequence_t::br, default_intra_quantizer_matrix, lprintf, mpeg2_scan_norm, sequence_t::picture, read_bits(), skip_bits(), picture_t::vdp_infos, and picture_t::vdp_infos2.
Referenced by parse_code().
|
static |
|
static |
References sequence_t::backward_ref, sequence_t::bufpos, sequence_t::bufseek, sequence_t::cur_pts, sequence_t::forward_ref, vo_frame_s::free, NULL, vo_frame_s::pts, sequence_t::reset, sequence_t::seq_pts, sequence_t::start, sequence_t::top_field_first, and VO_NEW_SEQUENCE_FLAG.
Referenced by free_sequence(), vdpau_mpeg12_discontinuity(), and vdpau_mpeg12_reset().
|
static |
|
static |
References sequence_t::aspect_ratio_information, bits_reader_set(), sequence_t::br, default_intra_quantizer_matrix, sequence_t::frame_rate_code, sequence_t::have_display_extension, sequence_t::have_header, sequence_t::horizontal_size_extension, sequence_t::horizontal_size_value, lprintf, mpeg2_scan_norm, sequence_t::picture, sequence_t::profile, read_bits(), vdpau_mpeg12_decoder_s::sequence, skip_bits(), picture_t::vdp_infos, picture_t::vdp_infos2, sequence_t::vertical_size_extension, and sequence_t::vertical_size_value.
Referenced by parse_code().
|
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, sequence_end_code, 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 |
Referenced by quant_matrix_extension(), and sequence_header().
uint8_t mpeg2_scan_norm[64] |
Referenced by quant_matrix_extension(), and sequence_header().