[MPlayer-users] VDPAU decoding in MPlayer broken by recent FFmpeg changes
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Wed Aug 14 18:57:22 CEST 2013
On Tue, Aug 13, 2013 at 11:01:43PM +0200, Ilja Sekler wrote:
> Am 13.08.2013 22:02, schrieb Reimar Döffinger:
>
> >On Sun, Aug 11, 2013 at 08:06:14PM +0200, Ilja Sekler wrote:
> >
> >>Am 11.08.2013 13:38, schrieb Reimar Döffinger:
> >>
> >>>Could you try below change?
> >>>--- a/libavcodec/ituh263dec.c
> >>>+++ b/libavcodec/ituh263dec.c
> >>>@@ -234,6 +234,8 @@ int ff_h263_resync(MpegEncContext *s){
> >>> skip_bits1(&s->gb);
> >>> align_get_bits(&s->gb);
> >>> }
> >>>+ if (get_bits_left(&s->gb) < 16)
> >>>+ return -1;
> >>>
> >>> if(show_bits(&s->gb, 16)==0){
> >>> pos= get_bits_count(&s->gb);
> >>
> >>Yes, this patch works, no more "marker does not match f_code" spam
> >>in the console numerous times per second, thank you. Verified by a
> >>comparison with a MPlayer build without it.
> >
> >It was pointed out to me that this breaks error concealment for software
> >decoding.
> >Could you remove above previous attempt and test if the following also fixes it?
> >--- a/libavcodec/ituh263dec.c
> >+++ b/libavcodec/ituh263dec.c
> >@@ -235,7 +235,7 @@ int ff_h263_resync(MpegEncContext *s){
> > align_get_bits(&s->gb);
> > }
> >
> >- if(show_bits(&s->gb, 16)==0){
> >+ if(get_bits_left(&s->gb) >= 16 && show_bits(&s->gb, 16)==0){
> > pos= get_bits_count(&s->gb);
> > if(CONFIG_MPEG4_DECODER && s->codec_id==AV_CODEC_ID_MPEG4)
> > ret= ff_mpeg4_decode_video_packet_header(s);
> >
>
> No, this patch doesn't work.
Ok, something completely different then:
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -168,7 +168,10 @@ static int decode_slice(MpegEncContext *s){
const uint8_t *start= s->gb.buffer + get_bits_count(&s->gb)/8;
const uint8_t *end = ff_h263_find_resync_marker(s, start + 1, s->gb.buffer_end);
skip_bits_long(&s->gb, 8*(end - start));
- return s->avctx->hwaccel->decode_slice(s->avctx, start, end - start);
+ ret = s->avctx->hwaccel->decode_slice(s->avctx, start, end - start);
+ // ensure we exit decode loop
+ if (get_bits_left(&s->gb) <= 0) s->mb_y = s->mb_height;
+ return ret;
}
if(s->partitioned_frame){
More information about the MPlayer-users
mailing list