2010-01-30 16:57:40 +00:00
|
|
|
/*
|
|
|
|
* This file is part of MPlayer.
|
|
|
|
*
|
|
|
|
* MPlayer is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* MPlayer is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
|
|
|
|
2008-02-22 09:09:46 +00:00
|
|
|
#ifndef MPLAYER_DEC_VIDEO_H
|
|
|
|
#define MPLAYER_DEC_VIDEO_H
|
2001-10-30 17:04:59 +00:00
|
|
|
|
2008-03-06 08:34:50 +00:00
|
|
|
#include "libmpdemux/stheader.h"
|
|
|
|
|
2008-06-23 22:53:58 +00:00
|
|
|
struct osd_state;
|
|
|
|
|
2001-10-30 17:04:59 +00:00
|
|
|
// dec_video.c:
|
2008-12-03 23:01:03 +00:00
|
|
|
void vfm_help(void);
|
2002-08-31 13:09:23 +00:00
|
|
|
|
2008-12-03 23:01:03 +00:00
|
|
|
int init_best_video_codec(sh_video_t *sh_video, char** video_codec_list, char** video_fm_list);
|
|
|
|
void uninit_video(sh_video_t *sh_video);
|
2001-10-30 17:04:59 +00:00
|
|
|
|
2011-08-20 17:25:43 +00:00
|
|
|
struct demux_packet;
|
|
|
|
void *decode_video(sh_video_t *sh_video, struct demux_packet *packet,
|
|
|
|
unsigned char *start, int in_size, int drop_frame,
|
|
|
|
double pts);
|
2009-01-14 23:07:12 +00:00
|
|
|
int filter_video(sh_video_t *sh_video, void *frame, double pts);
|
2001-10-30 17:04:59 +00:00
|
|
|
|
2008-12-03 23:01:03 +00:00
|
|
|
int get_video_quality_max(sh_video_t *sh_video);
|
2001-10-30 17:04:59 +00:00
|
|
|
|
2008-12-03 23:01:03 +00:00
|
|
|
int get_video_colors(sh_video_t *sh_video, const char *item, int *value);
|
|
|
|
int set_video_colors(sh_video_t *sh_video, const char *item, int value);
|
video, options: implement better YUV->RGB conversion control
Rewrite control of the colorspace and input/output level parameters
used in YUV-RGB conversions, replacing VO-specific suboptions with new
common options and adding configuration support to more cases.
Add new option --colormatrix which selects the colorspace the original
video is assumed to have in YUV->RGB conversions. The default
behavior changes from assuming BT.601 to colorspace autoselection
between BT.601 and BT.709 using a simple heuristic based on video
size. Add new options --colormatrix-input-range and
--colormatrix-output-range which select input YUV and output RGB range.
Disable the previously existing VO-specific colorspace and level
conversion suboptions in vo_gl and vo_vdpau. Remove the
"yuv_colorspace" property and replace it with one named "colormatrix"
and semantics matching the new option. Add new properties matching the
options for level conversion.
Colorspace selection is currently supported by vo_gl, vo_vdpau, vo_xv
and vf_scale, and all can change it at runtime (previously only
vo_vdpau and vo_xv could). vo_vdpau now uses the same conversion
matrix generation as vo_gl instead of libvdpau functionality; the main
functional difference is that the "contrast" equalizer control behaves
somewhat differently (it scales the Y component around 1/2 instead of
around 0, so that contrast 0 makes the image gray rather than black).
vo_xv does not support level conversion. vf_scale supports range
setting for input, but always outputs full-range RGB.
The value of the slave properties is the policy setting used for
conversions. This means they can be set to any value regardless of
whether the current VO supports that value or whether there currently
even is any video. Possibly separate properties could be added to
query the conversion actually used at the moment, if any.
Because the colorspace and level settings are now set with a single
VF/VO control call, the return value of that is no longer used to
signal whether all the settings are actually supported. Instead code
should set all the details it can support, and ignore the rest. The
core will use GET_YUV_COLORSPACE to check which colorspace details
have been set and which not. In other words, the return value for
SET_YUV_COLORSPACE only signals whether any kind of YUV colorspace
conversion handling exists at all, and VOs have to take care to return
the actual state with GET_YUV_COLORSPACE instead.
To be changed in later commits: add missing option documentation.
2011-10-15 21:50:21 +00:00
|
|
|
struct mp_csp_details;
|
|
|
|
void get_detected_video_colorspace(struct sh_video *sh, struct mp_csp_details *csp);
|
|
|
|
void set_video_colorspace(struct sh_video *sh);
|
2008-12-03 23:01:03 +00:00
|
|
|
void resync_video_stream(sh_video_t *sh_video);
|
2011-11-14 18:12:20 +00:00
|
|
|
void video_reset_aspect(struct sh_video *sh_video);
|
2008-12-03 23:01:03 +00:00
|
|
|
int get_current_video_decoder_lag(sh_video_t *sh_video);
|
2001-10-30 17:38:09 +00:00
|
|
|
|
|
|
|
extern int divx_quality;
|
2008-01-01 21:35:58 +00:00
|
|
|
|
2008-02-22 09:09:46 +00:00
|
|
|
#endif /* MPLAYER_DEC_VIDEO_H */
|