Maarten Lankhorst wrote:
Looks like I made the checking a bit too paranoid, causing it to not always
decode last few macroblocks because of fear of reaching end of stream..
Does this work? I removed a few paranoid asserts, and if performance is still
bad, I'll alter the patch to swap between multiple decode buffers to fix it.
That should bring performance back to old level.
This version does fix the macroblocks issue.
Perf is still poor.
The dvd assert is also still present. It doesn't happen with all dvds -
and is not a regression caused by this patch.
When playing with -cache and skipping around I get a different assert -
attached are backtraces from both types.
mplayer: vl/vl_vlc.h:172: vl_vlc_get_vlclbf: Assertion `tbl->length' failed.
Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb6b49a10 (LWP 6986)]
0xffffe424 in __kernel_vsyscall ()
(gdb) bt full
#0 0xffffe424 in __kernel_vsyscall ()
No symbol table info available.
#1 0xb6d0715a in raise () from /lib/libc.so.6
No symbol table info available.
#2 0xb6d08787 in abort () from /lib/libc.so.6
No symbol table info available.
#3 0xb6d0069e in __assert_fail () from /lib/libc.so.6
No symbol table info available.
#4 0xb5de9573 in motion_vector (bs=0xab51c50, r=<value optimized out>,
s=<value optimized out>, dmv=0, delta=0xbfc0e2d4, dmvector=0xbfc0e2d0) at
vl/vl_vlc.h:172
t = 1
__PRETTY_FUNCTION__ = "motion_vector"
#5 0xb5deab7f in decode_slice (bs=0xab51c50, code=<value optimized out>) at
vl/vl_mpeg12_bitstream.c:679
inc = 4
mb = {base = {codec = PIPE_VIDEO_CODEC_MPEG12}, x = 28, y = 1,
macroblock_type = 10 '\n', macroblock_modes = {bits = {frame_motion_type = 2,
field_motion_type = 0, dct_type = 0}, value = 2}, motion_vertical_field_select
= 0 '\0', PMV = {{{0, 0}, {0, 0}}, {{0, 0}, {0, 0}}}, coded_block_pattern = 58,
blocks = 0xbfc0dfa4, num_skipped_macroblocks = 3}
dct_blocks = {0, 0, -44, -44, -44, 44, 0 <repeats 58 times>, -44, -44,
44, -44, 44, 0, 44, -44, 0 <repeats 56 times>, 44, 44, 0, 0, 44, 0, 0, 0, 0,
44, -132, 0, 0, 0, 0, 0, 0, 0, -44, 0 <repeats 74 times>, 9220, -44, 0, 0, 0,
0, -44, 0 <repeats 156 times>}
dct_scale = 44
x = <value optimized out>
__PRETTY_FUNCTION__ = "decode_slice"
#6 0xb5deb72b in vl_mpg12_bs_decode (bs=0xab51c50, n=<value optimized out>,
len=107065, lens=0xbfc0e390, buffer=0xbfc0e3b0) at vl/vl_mpeg12_bitstream.c:982
__PRETTY_FUNCTION__ = "vl_mpg12_bs_decode"
#7 0xb5de808b in vl_mpeg12_decode_bitstream (decoder=0xaab5f98,
target=0xaac3c70, picture=0xbfc0e3f8, n=1, total_len=107065, lens=0xbfc0e390,
data=0xbfc0e3b0) at vl/vl_mpeg12_decoder.c:707
i = 3
__PRETTY_FUNCTION__ = "vl_mpeg12_decode_bitstream"
#8 0xb5d84dd4 in vlVdpDecoderRender (decoder=9, target=19,
picture_info=0x8ae38b4, bitstream_buffer_count=1, bitstream_buffers=0xaac3330)
at decode.c:382
total_size = 107065
ret = VDP_STATUS_OK
dec = (struct pipe_video_decoder *) 0xaab5f98
i = 6986
desc = {base = {profile = PIPE_VIDEO_PROFILE_MPEG2_MAIN}, mpeg12 =
{base = {profile = PIPE_VIDEO_PROFILE_MPEG2_MAIN}, ref_forward = 0xaabb7f8,
ref_backward = 0x0, picture_coding_type = 2, picture_structure = 3,
frame_pred_frame_dct = 1, q_scale_type = 1, alternate_scan = 0,
intra_vlc_format = 1,
concealment_motion_vectors = 0, intra_dc_precision = 2, f_code = {{5, 5},
{14, 14}}, top_field_first = 1, full_pel_forward_vector = 0,
full_pel_backward_vector = 0, num_slices = 35,
intra_matrix = 0x8ae38cf
"\b\b\b\b\b\b\b\t\b\b\b\b\b\b\t\t\b\b\b\b\b\t\t\n\b\b\b\b\b\t\t\n\b\b\b\b\b\t\n\f\b\b\b\b\t\n\f\017\b\b\b\t\n\f\016\021\b\b\t\n\f\016\021\025",
'\b' <repeats 64 times>, non_intra_matrix = 0x8ae390f '\b' <repeats 64
times>}, mpeg4 = {base = {profile = PIPE_VIDEO_PROFILE_MPEG2_MAIN},
ref_forward = 0xaabb7f8, ref_backward = 0x0, trd = {2, 3}, trb = {1, 1},
vop_time_increment_resolution = 0, vop_coding_type = 0 '\0', vop_fcode_forward
= 0 '\0', vop_fcode_backward = 1 '\001', resync_marker_disable = 0 '\0',
interlaced = 0 '\0', quant_type = 0 '\0', quarter_sample = 0 '\0',
short_video_header = 0 '\0', rounding_control = 0 '\0',
alternate_vertical_scan_flag = 0 '\0', top_field_first = 2 '\002', intra_matrix
= 0x5 <Address 0x5 out of bounds>, non_intra_matrix = 0x5 <Address 0x5 out of
bounds>}, vc1 = {base = {profile = PIPE_VIDEO_PROFILE_MPEG2_MAIN}, ref_forward
= 0xaabb7f8,
ref_backward = 0x0, slice_count = 2, picture_type = 3 '\003',
frame_coding_mode = 0 '\0', postprocflag = 0 '\0', pulldown = 0 '\0', interlace
= 1 '\001', tfcntrflag = 0 '\0', finterpflag = 0 '\0', psf = 0 '\0', dquant = 1
'\001', panscan_flag = 0 '\0', refdist_flag = 0 '\0', quantizer = 0 '\0',
extended_mv = 0 '\0', extended_dmv = 0 '\0', overlap = 0 '\0', vstransform
= 0 '\0', loopfilter = 1 '\001', fastuvmc = 0 '\0', range_mapy_flag = 0 '\0',
range_mapy = 0 '\0', range_mapuv_flag = 0 '\0', range_mapuv = 0 '\0', multires
= 0 '\0', syncmarker = 0 '\0', rangered = 2 '\002', maxbframes = 0 '\0',
deblockEnable = 0 '\0', pquant = 0 '\0'}}
#9 0x080f9855 in draw_slice (image=0xbfc0e4cc, stride=0xbfc0e4bc, w=720,
h=576, x=0, y=0) at libvo/vo_vdpau.c:995
vdp_st = <value optimized out>
rndr = (struct vdpau_render_state *) 0x8ae38a0
max_refs = 2
#10 0x08216c16 in draw_slice (s=0xaa7e380, src=0xabcdcf0, offset=0xbfc0e53c,
y=0, type=3, height=576) at libmpcodecs/vd_ffmpeg.c:471
sh = (sh_video_t *) 0xa9588c0
source = {0x8ae38a0 "\023", 0x0, 0x0, 0x0}
strides = {0, 0, 0, 0}
#11 0x085be638 in ff_draw_horiz_band (s=0xaa8ea70, y=0, h=576) at
libavcodec/mpegvideo.c:2377
src = (AVFrame *) 0xabcdcf0
offset = {0, 0, 0, 0}
field_pic = 0
#12 0x08694b6a in ff_vdpau_mpeg_picture_complete (s=0xaa8ea70, buf=0xb6008008
"", buf_size=107065, slice_count=35) at libavcodec/vdpau.c:246
last = <value optimized out>
i = <value optimized out>
__PRETTY_FUNCTION__ = "ff_vdpau_mpeg_picture_complete"
#13 0x08592ff1 in decode_chunks (avctx=0xaa7e380, picture=0xaa7e270,
data_size=0xbfc0e844, buf=0xb6008008 "", buf_size=107065) at
libavcodec/mpeg12.c:2309
i = <value optimized out>
start_code = 4156915712
s = (Mpeg1Context *) 0xaa8ea70
s2 = <value optimized out>
buf_ptr = (const uint8_t *) 0xb6022241 ""
buf_end = (const uint8_t *) 0xb6022241 ""
ret = <value optimized out>
input_size = 2020
last_code = 257
#14 0x085934a3 in mpeg_decode_frame (avctx=0xaa7e380, data=0xaa7e270,
data_size=0xbfc0e844, avpkt=0xbfc0e7e8) at libavcodec/mpeg12.c:2279
buf = (const uint8_t *) 0xb6008008 ""
buf_size = 107065
s = (Mpeg1Context *) 0xaa8ea70
picture = (AVFrame *) 0x6
#15 0x086705fe in avcodec_decode_video2 (avctx=0xaa7e380, picture=0xaa7e270,
got_picture_ptr=0xbfc0e844, avpkt=0xbfc0e7e8) at libavcodec/utils.c:819
ret = -1
#16 0x08215e94 in decode (sh=0xa9588c0, data=0xb6008008, len=107065, flags=0)
at libmpcodecs/vd_ffmpeg.c:800
got_picture = 0
ret = <value optimized out>
ctx = (vd_ffmpeg_ctx *) 0xaa7e1a0
pic = (AVFrame *) 0xaa7e270
avctx = (AVCodecContext *) 0xaa7e380
mpi = (mp_image_t *) 0x0
dr1 = <value optimized out>
pkt = {pts = -9223372036854775808, dts = -9223372036854775808, data =
0xb6008008 "", size = 107065, stream_index = 0, flags = 1, side_data = 0x0,
side_data_elems = 0, duration = 0, destruct = 0, priv = 0xc0040000, pos = -1,
convergence_duration = 0}
fvstats = (FILE *) 0x0
---Type <return> to continue, or q <return> to quit---
all_len = 0
frame_number = 0
all_frametime = 0
#17 0x08144a5a in decode_video (sh_video=0xa9588c0, start=0xb6008008 "",
in_size=107065, drop_frame=0, pts=0.039999999105930328, full_frame=0xbfc0e91c)
at libmpcodecs/dec_video.c:393
mpi = <value optimized out>
t = 2205330436
t2 = <value optimized out>
delay = <value optimized out>
got_picture = <value optimized out>
#18 0x080cb743 in update_video (blit_frame=0xbfc0fa84) at mplayer.c:2437
in_size = 107065
start = (unsigned char *) 0xb6008008 ""
decoded_frame = (void *) 0x0
drop_frame = 0
full_frame = 1
sh_video = (sh_video_t * const) 0xa9588c0
frame_time = 0
#19 0x080cf96c in main (argc=8, argv=0xbfc0fb54) at mplayer.c:3721
frame_time = 0.039999999105930328
frame_time_remaining = <value optimized out>
blit_frame = 0
aq_sleep_time = 0.031329032
opt_exit = <value optimized out>
profile_config_loaded = <value optimized out>
i = 0
last_heartbeat = 0
mplayer: vl/vl_vlc.h:138: vl_vlc_eatbits: Assertion `vlc->valid_bits >=
num_bits' failed.
Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb6acea10 (LWP 2194)]
0xffffe424 in __kernel_vsyscall ()
(gdb) bt full
#0 0xffffe424 in __kernel_vsyscall ()
No symbol table info available.
#1 0xb6c8c15a in raise () from /lib/libc.so.6
No symbol table info available.
#2 0xb6c8d787 in abort () from /lib/libc.so.6
No symbol table info available.
#3 0xb6c8569e in __assert_fail () from /lib/libc.so.6
No symbol table info available.
#4 0xb656c213 in vl_vlc_eatbits (vlc=0xa87eff4, num_bits=6) at vl/vl_vlc.h:138
No locals.
#5 0xb656e114 in decode_slice (bs=0xa87ef98, code=<value optimized out>) at
vl/vl_vlc.h:176
extra = <value optimized out>
inc = 1
mb = {base = {codec = PIPE_VIDEO_CODEC_MPEG12}, x = 37, y = 7,
macroblock_type = 16 '\020', macroblock_modes = {bits = {frame_motion_type = 0,
field_motion_type = 0, dct_type = 0}, value = 0}, motion_vertical_field_select
= 0 '\0', PMV = {{{0, 0}, {0, 0}}, {{0, 0}, {0, 0}}}, coded_block_pattern = 63,
blocks = 0xbfb6b0d4, num_skipped_macroblocks = 0}
dct_blocks = {-224, 0 <repeats 63 times>, -224, 0 <repeats 63 times>,
-224, 0 <repeats 63 times>, -224, 0 <repeats 191 times>}
dct_scale = 80
x = <value optimized out>
__PRETTY_FUNCTION__ = "decode_slice"
#6 0xb656f477 in vl_mpg12_bs_decode (bs=0xa87ef98, n=<value optimized out>,
len=2012, lens=0xbfb6b4d0, buffer=0xbfb6b4f0) at vl/vl_mpeg12_bitstream.c:982
__PRETTY_FUNCTION__ = "vl_mpg12_bs_decode"
#7 0xb656b94b in vl_mpeg12_decode_bitstream (decoder=0xa6af708,
target=0xa8f9c60, picture=0xbfb6b538, n=1, total_len=2012, lens=0xbfb6b4d0,
data=0xbfb6b4f0) at vl/vl_mpeg12_decoder.c:707
i = 3
__PRETTY_FUNCTION__ = "vl_mpeg12_decode_bitstream"
#8 0xb6507dd4 in vlVdpDecoderRender (decoder=9, target=17,
picture_info=0x8ae32f4, bitstream_buffer_count=1, bitstream_buffers=0xa945c20)
at decode.c:382
total_size = 2012
ret = VDP_STATUS_OK
dec = (struct pipe_video_decoder *) 0xa6af708
i = 2194
desc = {base = {profile = PIPE_VIDEO_PROFILE_MPEG2_MAIN}, mpeg12 =
{base = {profile = PIPE_VIDEO_PROFILE_MPEG2_MAIN}, ref_forward = 0x0,
ref_backward = 0x0, picture_coding_type = 1, picture_structure = 3,
frame_pred_frame_dct = 0, q_scale_type = 1, alternate_scan = 1,
intra_vlc_format = 1,
concealment_motion_vectors = 0, intra_dc_precision = 1, f_code = {{14, 14},
{14, 14}}, top_field_first = 0, full_pel_forward_vector = 0,
full_pel_backward_vector = 0, num_slices = 8,
intra_matrix = 0x8ae330f
"\b\020\023\026\032\033\035\"\020\020\026\030\033\035\"%\023\026\032\033\035\"\"&\026\026\032\033\035\"%(\026\032\033\035
#(0\032\033\035 #(0:\032\033\035\"&.8E\033\035#&.8ES", '\020' <repeats 64
times>, non_intra_matrix = 0x8ae334f '\020' <repeats 64 times>}, mpeg4 = {base
= {
profile = PIPE_VIDEO_PROFILE_MPEG2_MAIN}, ref_forward = 0x0, ref_backward
= 0x0, trd = {1, 3}, trb = {0, 1}, vop_time_increment_resolution = 1,
vop_coding_type = 0 '\0', vop_fcode_forward = 0 '\0', vop_fcode_backward = 1
'\001', resync_marker_disable = 0 '\0', interlaced = 0 '\0', quant_type = 0
'\0',
quarter_sample = 0 '\0', short_video_header = 0 '\0', rounding_control = 0
'\0', alternate_vertical_scan_flag = 0 '\0', top_field_first = 1 '\001',
intra_matrix = 0xe <Address 0xe out of bounds>, non_intra_matrix = 0xe <Address
0xe out of bounds>}, vc1 = {base = {profile = PIPE_VIDEO_PROFILE_MPEG2_MAIN},
ref_forward = 0x0, ref_backward = 0x0, slice_count = 1, picture_type = 3
'\003', frame_coding_mode = 0 '\0', postprocflag = 0 '\0', pulldown = 0 '\0',
interlace = 0 '\0', tfcntrflag = 0 '\0', finterpflag = 0 '\0', psf = 0 '\0',
dquant = 1 '\001', panscan_flag = 0 '\0', refdist_flag = 0 '\0',
quantizer = 0 '\0', extended_mv = 1 '\001', extended_dmv = 0 '\0', overlap
= 0 '\0', vstransform = 0 '\0', loopfilter = 1 '\001', fastuvmc = 0 '\0',
range_mapy_flag = 0 '\0', range_mapy = 0 '\0', range_mapuv_flag = 0 '\0',
range_mapuv = 0 '\0', multires = 0 '\0', syncmarker = 0 '\0', rangered = 1
'\001',
maxbframes = 0 '\0', deblockEnable = 0 '\0', pquant = 0 '\0'}}
#9 0x080f9855 in draw_slice (image=0xbfb6b60c, stride=0xbfb6b5fc, w=720,
h=576, x=0, y=0) at libvo/vo_vdpau.c:995
vdp_st = <value optimized out>
rndr = (struct vdpau_render_state *) 0x8ae32e0
max_refs = 2
#10 0x08216c16 in draw_slice (s=0xa7d1590, src=0xa90d700, offset=0xbfb6b67c,
y=0, type=3, height=576) at libmpcodecs/vd_ffmpeg.c:471
sh = (sh_video_t *) 0xa6958c0
source = {0x8ae32e0 "\021", 0x0, 0x0, 0x0}
strides = {0, 0, 0, 0}
#11 0x085be638 in ff_draw_horiz_band (s=0xa7e5040, y=0, h=576) at
libavcodec/mpegvideo.c:2377
src = (AVFrame *) 0xa90d700
offset = {0, 0, 0, 0}
field_pic = 0
#12 0x08694b6a in ff_vdpau_mpeg_picture_complete (s=0xa7e5040, buf=0xb678d008
"", buf_size=2012, slice_count=8) at libavcodec/vdpau.c:246
last = <value optimized out>
i = <value optimized out>
__PRETTY_FUNCTION__ = "ff_vdpau_mpeg_picture_complete"
#13 0x08592ff1 in decode_chunks (avctx=0xa7d1590, picture=0xa7d1470,
data_size=0xbfb6b984, buf=0xb678d008 "", buf_size=2012) at
libavcodec/mpeg12.c:2309
i = <value optimized out>
start_code = 2739309848
s = (Mpeg1Context *) 0xa7e5040
s2 = <value optimized out>
buf_ptr = (const uint8_t *) 0xb678d7e4 ""
buf_end = (const uint8_t *) 0xb678d7e4 ""
ret = <value optimized out>
input_size = 206
last_code = 257
#14 0x085934a3 in mpeg_decode_frame (avctx=0xa7d1590, data=0xa7d1470,
data_size=0xbfb6b984, avpkt=0xbfb6b928) at libavcodec/mpeg12.c:2279
buf = (const uint8_t *) 0xb678d008 ""
buf_size = 2012
s = (Mpeg1Context *) 0xa7e5040
picture = (AVFrame *) 0x6
#15 0x086705fe in avcodec_decode_video2 (avctx=0xa7d1590, picture=0xa7d1470,
got_picture_ptr=0xbfb6b984, avpkt=0xbfb6b928) at libavcodec/utils.c:819
ret = -1
#16 0x08215e94 in decode (sh=0xa6958c0, data=0xb678d008, len=2012, flags=0) at
libmpcodecs/vd_ffmpeg.c:800
got_picture = 0
ret = <value optimized out>
ctx = (vd_ffmpeg_ctx *) 0xa7d1388
pic = (AVFrame *) 0xa7d1470
avctx = (AVCodecContext *) 0xa7d1590
mpi = (mp_image_t *) 0x0
dr1 = <value optimized out>
pkt = {pts = -9223372036854775808, dts = -9223372036854775808, data =
0xb678d008 "", size = 2012, stream_index = 0, flags = 1, side_data = 0x0,
side_data_elems = 0, duration = 0, destruct = 0, priv = 0xc0040000, pos = -1,
convergence_duration = 0}
fvstats = (FILE *) 0x0
---Type <return> to continue, or q <return> to quit---
all_len = 0
frame_number = 0
all_frametime = 0
#17 0x08144a5a in decode_video (sh_video=0xa6958c0, start=0xb678d008 "",
in_size=2012, drop_frame=0, pts=0.039999999105930328, full_frame=0xbfb6ba5c) at
libmpcodecs/dec_video.c:393
mpi = <value optimized out>
t = 3314707188
t2 = <value optimized out>
delay = <value optimized out>
got_picture = <value optimized out>
#18 0x080cb743 in update_video (blit_frame=0xbfb6cbc4) at mplayer.c:2437
in_size = 2012
start = (unsigned char *) 0xb678d008 ""
decoded_frame = (void *) 0x0
drop_frame = 0
full_frame = 1
sh_video = (sh_video_t * const) 0xa6958c0
frame_time = 0
#19 0x080cf96c in main (argc=6, argv=0xbfb6cc94) at mplayer.c:3721
frame_time = -0.088993832402395598
frame_time_remaining = <value optimized out>
blit_frame = 0
aq_sleep_time = 0
opt_exit = <value optimized out>
profile_config_loaded = <value optimized out>
i = 0
last_heartbeat = 0
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev