summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJulian Scheel <julian@jusst.de>2009-01-19 11:13:22 +0000
committerJulian Scheel <julian@jusst.de>2009-01-19 11:13:22 +0000
commit83c558ce5a21df2b9ae6a5b9432d57fc9ec5b9bd (patch)
treef23edaca49ec9cab4a1ae44575b5ceb43e6dbb89 /src
parentb8ca90c4fcac747e743d4df4969a68f0e18b1a93 (diff)
downloadxine-lib-83c558ce5a21df2b9ae6a5b9432d57fc9ec5b9bd.tar.gz
xine-lib-83c558ce5a21df2b9ae6a5b9432d57fc9ec5b9bd.tar.bz2
Scaling list fixes; duration fixes.
Diffstat (limited to 'src')
-rw-r--r--src/libvdpau/h264_parser.c4
-rw-r--r--src/libvdpau/vdpau_h264.c17
2 files changed, 11 insertions, 10 deletions
diff --git a/src/libvdpau/h264_parser.c b/src/libvdpau/h264_parser.c
index cdf3b6b2b..315ae6420 100644
--- a/src/libvdpau/h264_parser.c
+++ b/src/libvdpau/h264_parser.c
@@ -402,7 +402,7 @@ uint8_t parse_sps(struct buf_reader *buf, struct nal_parser *parser)
sps->seq_parameter_set_id = read_exp_golomb(buf);
memset(sps->scaling_lists_4x4, 16, sizeof(sps->scaling_lists_4x4));
- memset(sps->scaling_lists_8x8, 16, sizeof(sps->scaling_lists_4x4));
+ memset(sps->scaling_lists_8x8, 16, sizeof(sps->scaling_lists_8x8));
if (sps->profile_idc == 100 || sps->profile_idc == 110 || sps->profile_idc
== 122 || sps->profile_idc == 144) {
sps->chroma_format_idc = read_exp_golomb(buf);
@@ -686,7 +686,7 @@ uint8_t parse_pps(struct buf_reader *buf, struct pic_parameter_set_rbsp *pps,
int bit_read = bits_read(buf);
memset(pps->scaling_lists_4x4, 16, sizeof(pps->scaling_lists_4x4));
- memset(pps->scaling_lists_8x8, 16, sizeof(pps->scaling_lists_4x4));
+ memset(pps->scaling_lists_8x8, 16, sizeof(pps->scaling_lists_8x8));
if (bit_length-bit_read > 1) {
printf("Read transform 8x8\n");
pps->transform_8x8_mode_flag = read_bits(buf, 1);
diff --git a/src/libvdpau/vdpau_h264.c b/src/libvdpau/vdpau_h264.c
index 2138121a2..516b279bb 100644
--- a/src/libvdpau/vdpau_h264.c
+++ b/src/libvdpau/vdpau_h264.c
@@ -127,7 +127,7 @@ static inline void dump_pictureinfo_h264(VdpPictureInfoH264 *pic)
printf("C: deblocking_filter_control_present_flag: %d\n", pic->deblocking_filter_control_present_flag);
printf("C: redundant_pic_cnt_present_flag: %d\n", pic->redundant_pic_cnt_present_flag);
- /*int i, j;
+ int i, j;
for(i = 0; i < 6; i++) {
printf("C: scalint_list4x4[%d]:\nC:", i);
for(j = 0; j < 16; j++) {
@@ -145,9 +145,9 @@ static inline void dump_pictureinfo_h264(VdpPictureInfoH264 *pic)
printf("\nC:");
}
printf("C: \n");
- }*/
+ }
- int i;
+ //int i;
for(i = 0; i < 16; i++) {
if(pic->referenceFrames[i].surface != VDP_INVALID_HANDLE) {
printf("C: -------------------\n");
@@ -379,6 +379,10 @@ static int vdpau_decoder_render(video_decoder_t *this_gen, VdpBitstreamBuffer *v
vdpau_h264_decoder_t *this = (vdpau_h264_decoder_t *)this_gen;
vo_frame_t *img = this->last_img;
+ if(this->nal_parser->current_nal->nal_unit_type == NAL_SLICE_IDR) {
+ dpb_flush(&(this->nal_parser->dpb));
+ }
+
VdpPictureInfoH264 pic;
fill_vdpau_pictureinfo_h264(this_gen, slice_count, &pic);
@@ -401,9 +405,6 @@ static int vdpau_decoder_render(video_decoder_t *this_gen, VdpBitstreamBuffer *v
/* flush the DPB if this frame was an IDR */
//printf("is_idr: %d\n", this->nal_parser->is_idr);
- if(this->nal_parser->current_nal->nal_unit_type == NAL_SLICE_IDR) {
- dpb_flush(&(this->nal_parser->dpb));
- }
this->nal_parser->is_idr = 0;
/* go and decode a frame */
@@ -481,8 +482,8 @@ static int vdpau_decoder_render(video_decoder_t *this_gen, VdpBitstreamBuffer *v
if(!img->progressive_frame && this->nal_parser->current_nal->repeat_pic)
img->repeat_first_field = 1;
- else if(img->progressive_frame && this->nal_parser->current_nal->repeat_pic)
- img->duration *= this->nal_parser->current_nal->repeat_pic;
+ //else if(img->progressive_frame && this->nal_parser->current_nal->repeat_pic)
+ // img->duration *= this->nal_parser->current_nal->repeat_pic;
struct decoded_picture *decoded_pic = NULL;
if(pic.is_reference) {