summaryrefslogtreecommitdiff
path: root/src/libvdpau
diff options
context:
space:
mode:
authorJulian Scheel <julian@jusst.de>2009-01-25 17:09:23 +0000
committerJulian Scheel <julian@jusst.de>2009-01-25 17:09:23 +0000
commita1b2e519be60481831eaad8280427ac1115b15c3 (patch)
treefd3a109624f505be4b35fc374fda5c1399a590a8 /src/libvdpau
parentcfdf89b5aa5f0cc2953723c48d7b56f9b1b79600 (diff)
downloadxine-lib-a1b2e519be60481831eaad8280427ac1115b15c3.tar.gz
xine-lib-a1b2e519be60481831eaad8280427ac1115b15c3.tar.bz2
Switch back to default color standard when necessary.
Diffstat (limited to 'src/libvdpau')
-rw-r--r--src/libvdpau/vdpau_h264.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/libvdpau/vdpau_h264.c b/src/libvdpau/vdpau_h264.c
index 906c65f4c..988c6c676 100644
--- a/src/libvdpau/vdpau_h264.c
+++ b/src/libvdpau/vdpau_h264.c
@@ -67,6 +67,7 @@ typedef struct vdpau_h264_decoder_s {
VdpDecoder decoder;
int decoder_started;
+ VdpColorStandard color_standard;
VdpDecoderProfile profile;
vdpau_accel_t *vdpau_accel;
@@ -490,16 +491,18 @@ static int vdpau_decoder_render(video_decoder_t *this_gen, VdpBitstreamBuffer *v
if(sps->vui_parameters.colour_description_present) {
switch (sps->vui_parameters.colour_primaries) {
case 1:
- this->vdpau_accel->color_standard = VDP_COLOR_STANDARD_ITUR_BT_709;
+ this->color_standard = VDP_COLOR_STANDARD_ITUR_BT_709;
break;
case 5:
case 6:
default:
- this->vdpau_accel->color_standard = VDP_COLOR_STANDARD_ITUR_BT_601;
+ this->color_standard = VDP_COLOR_STANDARD_ITUR_BT_601;
break;
}
}
+ this->vdpau_accel->color_standard = this->color_standard;
+
struct decoded_picture *decoded_pic = NULL;
if(pic.is_reference) {
if(!slc->field_pic_flag || !this->wait_for_bottom_field) {
@@ -672,6 +675,13 @@ static void vdpau_h264_reset (video_decoder_t *this_gen) {
}
free_parser(this->nal_parser);
+
+ this->color_standard = VDP_COLOR_STANDARD_ITUR_BT_601;
+ this->wait_for_bottom_field = 0;
+ this->video_step = 0;
+ this->curr_pts = 0;
+ this->next_pts = 0;
+
this->nal_parser = init_parser();
if(this->codec_private_len > 0) {
parse_codec_private(this->nal_parser, this->codec_private, this->codec_private_len);
@@ -683,11 +693,6 @@ static void vdpau_h264_reset (video_decoder_t *this_gen) {
this->wait_for_frame_start = this->have_frame_boundary_marks;
}
- this->wait_for_bottom_field = 0;
- this->video_step = 0;
- this->curr_pts = 0;
- this->next_pts = 0;
-
if (this->dangling_img) {
this->dangling_img->free(this->dangling_img);
this->dangling_img = NULL;
@@ -757,6 +762,7 @@ static video_decoder_t *open_plugin (video_decoder_class_t *class_gen, xine_stre
this->decoder = VDP_INVALID_HANDLE;
this->vdp_runtime_nr = 1;
+ this->color_standard = VDP_COLOR_STANDARD_ITUR_BT_601;
this->nal_parser = init_parser();