From: <uni...@sh...> - 2004-05-27 08:55:43
|
Hi, all! I'm new to this list but I am having discussions with Andreas Robinson=20 who made a post concerning "Hardware decoding and Xine" lib, about the=20 way to go to implement VIA's HW mpeg decoders in xine. I have no=20 connection whatsoever with VIA. The VIA decoders cannot do XvMC "MOCOMP" and "IDCT" levels of HW=20 decoding. Therefore the "unichrome" sourceforge project made a=20 nonstandard extension to XvMC which we named "VLD", (variable length=20 decoding) which basically takes care of all decoding. However, according=20 to Mark Vojkovic, the "father" of XvMC, there is no chance that this=20 level will be standard until another HW developer agrees on an API.=20 Anyway, the API is implemented and working using DRI. Now, in order to implement Xine support for this level of XvMC in=20 "video_out_xvmc" and also to help Andreas easily make some sort of =20 "video_out_viadirectfb" plugin out of the video_out_xvmc plugin, an idea=20 is to add the following methods to "video_out.h", "struct vo_frame_s" /* XvMC methods for VLD acceleration */ void (*proc_vld_frame) (struct vo_frame_s *this_gen, const vo_vld_frame_t *vft, vo_frame_t *current_frame, vo_frame_t *forward_ref_frame, vo_frame_t *backward_ref_frame); void (*proc_vld_slice) (struct vo_frame_s *this_gen, const uint8_t *slice, int num_bytes); "proc_vld_frame" is called before decoding of a frame and=20 "proc_vld_frame" is called to send each slice to the output plugin. The=20 decoder plugin must determine when the last slice of a frame is sent. The vo_vld_frame_t contains at least (for mpeg2 and mpeg1) typedef struct vo_vld_frame_s { int vld_frame_t_version; /* For future backward binary compatibility = */ int mv_ranges[2][2]; =20 int picture_structure; int intra_dc_precision; int mpeg_coding; /* 1, 2, 4 etc.*/ int progressive_sequence; int scan; int pred_dct_frame; int concealment_motion_vectors; int q_scale_type; int intra_vlc_format; int second_field; int load_intra_quantizer_matrix; int load_non_intra_quantizer_matrix; uint8_t intra_quantizer_matrix[64]; uint8_t non_intra_quantizer_matrix[64]; ... ... ... ... } vo_vld_frame_t; and probably needs to be extended for a) mpeg4 support, b) if a standard=20 VLD XvMC API is agreed upon. Knowing that this will break backward binary compatibility of libxine=20 I'm asking for your advice if the change is at all feasible. It would=20 probably make the life much easier for me, Andreas and future=20 implementors of mpeg4 etc. Any answer would be greatly appreciated. Best regards Thomas Hellstr=F6m |