[Sumover-dev] Re: Vic H264 compilation issues

Piers O'Hanlon p.ohanlon at cs.ucl.ac.uk
Thu Mar 19 17:47:13 GMT 2009


Hi Doug,

Glad to hear we've resolved that issue.

I forgot to mention that a patch (below) is required for ffmpeg to make it
work with the IOCOM streams. I've looked at various other techniques to
achieve the same end by they're too complex so the patch below is the
simplest.

FYI I looked at:
1. It's possible to access the sps struct within H264 but the include files
are designed not to be used outside ffmpeg so they seem to be impossible to
include without mods.
2. One could create an SPS H264 NAL packet but it's not clear how often one
needs to provide it to the decoder.
3. One could parse the IOCOM stream for the SPS NAL packet and modify it but
that is pretty complex.

Piers.

ffmpeg.patch
*** ffmpeg/libavcodec/h264.c    2009-03-19 17:37:37.000000000 +0000
--- ffmpeg/libavcodec/h264.c.orig    2009-03-19 17:36:08.000000000 +0000
***************
*** 3371,3378 ****
          }
      }

!     if ((h->long_ref_count + h->short_ref_count > 1) &&
!         (h->long_ref_count + h->short_ref_count >
h->sps.ref_frame_count)){

          /* We have too many reference frames, probably due to corrupted
           * stream. Need to discard one frame. Prevents overrun of the
--- 3371,3377 ----
          }
      }

!     if (h->long_ref_count + h->short_ref_count > h->sps.ref_frame_count){

          /* We have too many reference frames, probably due to corrupted
           * stream. Need to discard one frame. Prevents overrun of the

2009/3/19 Douglas Kosovic <douglask at itee.uq.edu.au>

> Hi Piers,
>
> > I think this is probably down to differences between different
> > versions of ffmpeg - it seems that the latest versions (which I was
> > using) of ffmpeg from svn (r17944 - r18038) no longer contain the
> > -enable-swscaler configure option (its isn't present in the configure
> > file) and swscaler is now built by default. However the ffmpeg-0.5
> > release does include the --enable-swscale configure option. Does that
> > help to explain the problem?
>
> I think that does explain it.
>
> > I think enable-swscale should probably be put back into configure as I
> > think the suggestion of using the 0.5 release is best as otherwise
> > we'll keep having to fix vic whenever ffmpeg changes.
>
> Sounds good to me.
>
> > It's shame that there's a problem with Xvideo and Xineramma - is there
> > any workaround? The performance without Xvideo on Linux is
> > dramatically worse above CIF resolutions - my dual CPU machine could
> > not keep up with a VGA resolution H264 stream when not using Xvideo,
> > however with it enabled it was able to comfortably decode up to
> > 960x720....
>
> The other issue was that Xvideo VIC used to crash with onboard Intel
> graphics, things might have changed with newer X.org drivers. I'll look
> into the Xvideo issue some more, it's been a while since I enabled it.
> I'm guessing the Xvideo detection might need to be made a bit more
> smarter would be the workaround.
>
>
>
> Cheers,
> Doug
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oakham.cs.ucl.ac.uk/pipermail/sumover-dev/attachments/20090319/63b7f094/attachment.html


More information about the Sumover-dev mailing list