[FFmpeg-devel] RFC] FFmpeg libavcodec/crystalhd.c: Optimize for reduced latency

thomas schorpp thomas.schorpp at gmail.com
Mon Feb 11 08:05:45 CET 2013


On 06.02.2013 18:17, Carl Eugen Hoyos wrote:
> thomas schorpp <thomas.schorpp <at> gmail.com> writes:
>
>> Patch v0.6 against debian ffmpeg-dmo-1.0.1 attached,
>> sorry git HEAD breaks to many apps on debian stable/testing(?),
>
> Could you point us to the trac ticket numbers so these
> blockers can be fixed?
>
> (Committing new features / improvements to release branches
> is normally not done, I don't know if there is a good reason
> to do it in this case.)
>
>> I cannot submit untested patches.
>
> I am not sure I understand: Why can't you test current git
> head (even without touching your installed libraries)?
>
> Thank you, Carl Eugen
>

Testing reports: Success for MPlayer2, Failure for MPlayer(1), keep Philip's version for it.

1. Works with MPlayer(2) with setting Correct PTS = off in SMPlayer 0.6.9 (SVN r3447)

MPlayer2 2.0-712-gd3c5801 (C) 2000-2012 MPlayer Team
Terminal type `unknown' is not defined.

Playing /mnt/vdr1-aux/test.mp4.
Detected file format: QuickTime / MOV (libavformat)
ID_VIDEO_ID=0
[lavf] stream 0: video (h264), -vid 0
ID_AUDIO_ID=0
ID_AID_0_LANG=eng
[lavf] stream 1: audio (aac), -aid 0, -alang eng
Clip info:
  major_brand: isom
ID_CLIP_INFO_NAME0=major_brand
ID_CLIP_INFO_VALUE0=isom
  minor_version: 1
ID_CLIP_INFO_NAME1=minor_version
ID_CLIP_INFO_VALUE1=1
  compatible_brands: isomavc1
ID_CLIP_INFO_NAME2=compatible_brands
ID_CLIP_INFO_VALUE2=isomavc1
  creation_time: 2013-01-12 09:15:34
ID_CLIP_INFO_NAME3=creation_time
ID_CLIP_INFO_VALUE3=2013-01-12 09:15:34
ID_CLIP_INFO_N=4
Load subtitles in /mnt/vdr1-aux/
ID_FILENAME=/mnt/vdr1-aux/test.mp4
ID_DEMUXER=lavfpref
ID_VIDEO_FORMAT=H264
ID_VIDEO_BITRATE=830576
ID_VIDEO_WIDTH=1280
ID_VIDEO_HEIGHT=720
ID_VIDEO_FPS=23.976
ID_VIDEO_ASPECT=1.7778
ID_AUDIO_FORMAT=MP4A
ID_AUDIO_BITRATE=96000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
ID_START_TIME=0.00
ID_LENGTH=6312.26
ID_SEEKABLE=1
ID_CHAPTERS=0
X11 error: BadMatch (invalid parameter attributes)
[gl] using extended formats. Use -vo gl:nomanyfmts if playback fails.
Opening video filter: [screenshot]
Forced video codec: ffh264crystalhd
[h264_crystalhd @ 0x7fe944f32460]CrystalHD Init for h264_crystalhd
[h264_crystalhd @ 0x7fe944f32460]CrystalHD: starting up
Running DIL (3.22.0) Version
DtsDeviceOpen: Opening HW in mode 0
Clock set to 180
Enable single threaded mode
Setting Color Mode to 1
[h264_crystalhd @ 0x7fe944f32460]CrystalHD: Init complete.
Selected video codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (CrystalHD acceleration) [libavcodec]
ID_VIDEO_CODEC=ffh264crystalhd
Trying to force audio codec driver family hwac3...
Selected audio codec: AAC (Advanced Audio Coding) [libavcodec]
AUDIO: 48000 Hz, 2 ch, s16le, 96.0 kbit/6.25% (ratio: 12000->192000)
ID_AUDIO_BITRATE=96000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
ID_AUDIO_CODEC=ffaac
Starting playback...
[h264_crystalhd @ 0x7fe944f32460]No frames ready. Current delay: 16050 us  FreeListCount 16 ReadyListCount: 0
[h264_crystalhd @ 0x7fe944f32460]No frames ready. Current delay: 16100 us  FreeListCount 16 ReadyListCount: 0
[h264_crystalhd @ 0x7fe944f32460]No frames ready. Current delay: 16150 us  FreeListCount 16 ReadyListCount: 0
[h264_crystalhd @ 0x7fe944f32460]No frames ready. Current delay: 16200 us  FreeListCount 16 ReadyListCount: 0
[h264_crystalhd @ 0x7fe944f32460]No frames ready. Current delay: 16250 us  FreeListCount 16 ReadyListCount: 0
[h264_crystalhd @ 0x7fe944f32460]No frames ready. Current delay: 16300 us  FreeListCount 16 ReadyListCount: 0
[h264_crystalhd @ 0x7fe944f32460]No frames ready. Current delay: 16350 us  FreeListCount 16 ReadyListCount: 0
[h264_crystalhd @ 0x7fe944f32460]No frames ready. Current delay: 16400 us  FreeListCount 16 ReadyListCount: 0
[h264_crystalhd @ 0x7fe944f32460]No frames ready. Current delay: 16450 us  FreeListCount 16 ReadyListCount: 0
VIDEO:  1280x720  23.976 fps  830.6 kbps (103.8 kB/s)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
ID_VIDEO_ASPECT=1.7778
[swscaler @ 0x7fe944214700]using unscaled yuyv422 -> yuv422p special converter
VO: [gl] 1280x720 => 1280x720 Planar 422P
X11 error: BadMatch (invalid parameter attributes)

[h264_crystalhd @ 0x7fe944f32460]No frames ready. Current delay: 16500 us  FreeListCount 14 ReadyListCount: 0
[h264_crystalhd @ 0x7fe944f32460]No frames ready. Current delay: 16550 us  FreeListCount 14 ReadyListCount: 0

[h264_crystalhd @ 0x7fe944f32460]No frames ready. Current delay: 16600 us  FreeListCount 14 ReadyListCount: 0

[h264_crystalhd @ 0x7fe944f32460]No frames ready. Current delay: 16650 us  FreeListCount 14 ReadyListCount: 0
[h264_crystalhd @ 0x7fe944f32460]No frames ready. Current delay: 16700 us  FreeListCount 14 ReadyListCount: 0

   =====  PAUSE  =====

2. Does not work with MPlayer(1) with any settings:

On:

MPlayer SVN-r35910-4.4.5 (C) 2000-2013 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Terminal type `unknown' is not defined.

Playing /mnt/vdr1-aux/test.mp4.
libavformat version 54.62.100 (internal)
libavformat file format detected.
ID_VIDEO_ID=0
[lavf] stream 0: video (h264), -vid 0
ID_AUDIO_ID=0
ID_AID_0_LANG=eng
[lavf] stream 1: audio (aac), -aid 0, -alang eng
VIDEO:  [H264]  1280x720  24bpp  23.976 fps  830.6 kbps (101.4 kbyte/s)
Clip info:
  major_brand: isom
ID_CLIP_INFO_NAME0=major_brand
ID_CLIP_INFO_VALUE0=isom
  minor_version: 1
ID_CLIP_INFO_NAME1=minor_version
ID_CLIP_INFO_VALUE1=1
  compatible_brands: isomavc1
ID_CLIP_INFO_NAME2=compatible_brands
ID_CLIP_INFO_VALUE2=isomavc1
  creation_time: 2013-01-12 09:15:34
ID_CLIP_INFO_NAME3=creation_time
ID_CLIP_INFO_VALUE3=2013-01-12 09:15:34
ID_CLIP_INFO_N=4
Load subtitles in /mnt/vdr1-aux/
ID_FILENAME=/mnt/vdr1-aux/test.mp4
ID_DEMUXER=lavfpref
ID_VIDEO_FORMAT=H264
ID_VIDEO_BITRATE=830576
ID_VIDEO_WIDTH=1280
ID_VIDEO_HEIGHT=720
ID_VIDEO_FPS=23.976
ID_VIDEO_ASPECT=1.7778
ID_AUDIO_FORMAT=MP4A
ID_AUDIO_BITRATE=96000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
ID_START_TIME=0.00
ID_LENGTH=6312.26
ID_SEEKABLE=1
ID_CHAPTERS=0
X11 error: BadMatch (invalid parameter attributes)
[gl] using extended formats. Use -vo gl:nomanyfmts if playback fails.
Opening video filter: [screenshot]
==========================================================================
Forced video codec: ffh264crystalhd
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 54.91.102 (internal)
[h264_crystalhd @ 0xf963e0]CrystalHD Init for h264_crystalhd
[h264_crystalhd @ 0xf963e0]CrystalHD: starting up
Running DIL (3.22.0) Version
DtsCreateShMem:deleted shmem segment and creating a new one ...
DtsDeviceOpen: Opening HW in mode 0
Clock set to 180
Enable single threaded mode
Setting Color Mode to 1
[h264_crystalhd @ 0xf963e0]CrystalHD: Init complete.
Selected video codec: [ffh264crystalhd] vfm: ffmpeg (FFmpeg H.264 (CrystalHD))
==========================================================================
ID_VIDEO_CODEC=ffh264crystalhd
==========================================================================
Trying to force audio codec driver family hwac3...
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, floatle, 96.0 kbit/3.12% (ratio: 12000->384000)
ID_AUDIO_BITRATE=96000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
[AO_ALSA] Format floatle is not supported by hardware, trying default.
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
ID_AUDIO_CODEC=ffaac
[AO_ALSA] Unable to find simple control 'PCM',0.
[Mixer] No hardware mixing, inserting volume filter.
Starting playback...
[h264_crystalhd @ 0xf963e0]No frames ready. Current delay: 16050 us  FreeListCount 16 ReadyListCount: 0
[h264_crystalhd @ 0xf963e0]No frames ready. Current delay: 16100 us  FreeListCount 16 ReadyListCount: 0
[h264_crystalhd @ 0xf963e0]No frames ready. Current delay: 16150 us  FreeListCount 16 ReadyListCount: 0
[h264_crystalhd @ 0xf963e0]No frames ready. Current delay: 16200 us  FreeListCount 16 ReadyListCount: 0
[h264_crystalhd @ 0xf963e0]No frames ready. Current delay: 16250 us  FreeListCount 16 ReadyListCount: 0
[h264_crystalhd @ 0xf963e0]No frames ready. Current delay: 16300 us  FreeListCount 16 ReadyListCount: 0
[h264_crystalhd @ 0xf963e0]No frames ready. Current delay: 16350 us  FreeListCount 16 ReadyListCount: 0
[h264_crystalhd @ 0xf963e0]No frames ready. Current delay: 16400 us  FreeListCount 16 ReadyListCount: 0
[h264_crystalhd @ 0xf963e0]No frames ready. Current delay: 16450 us  FreeListCount 16 ReadyListCount: 0
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
ID_VIDEO_ASPECT=1.7778
[swscaler @ 0x1070100]BICUBIC scaler, from yuyv422 to rgb24 using MMXEXT
VO: [gl] 640x720 => 1280x720 RGB 24-bit
X11 error: BadMatch (invalid parameter attributes)
Dropping frame with size not matching configured size
Dropping frame with size not matching configured size
Dropping frame with size not matching configured size
[h264_crystalhd @ 0xf963e0]No frames ready. Current delay: 16500 us  FreeListCount 14 ReadyListCount: 0
Dropping frame with size not matching configured size
[h264_crystalhd @ 0xf963e0]No frames ready. Current delay: 16550 us  FreeListCount 14 ReadyListCount: 0
Dropping frame with size not matching configured size
[h264_crystalhd @ 0xf963e0]No frames ready. Current delay: 16600 us  FreeListCount 14 ReadyListCount: 0
...

[h264_crystalhd @ 0xf963e0]No frames ready. Current delay: 17850 us  FreeListCount 14 ReadyListCount: 0
Too many buffered pts
Dropping frame with size not matching configured size
Too many buffered pts

Off:

[h264_crystalhd @ 0xf963e0]No frames ready. Current delay: 19050 us  FreeListCount 14 ReadyListCount: 0
[h264_crystalhd @ 0xf963e0]No frames ready. Current delay: 19100 us  FreeListCount 14 ReadyListCount: 0
Dropping frame with size not matching configured size

Dropping frame with size not matching configured size
...

[wmv3_crystalhd @ 0xf963e0]CrystalHD: Input buffer full. Current delay: 50000 us  FreeListCount 16 ReadyListCount: 0
[wmv3_crystalhd @ 0xf963e0]No frames ready. Current delay: 50000 us  FreeListCount 16 ReadyListCount: 0

[wmv3_crystalhd @ 0xf963e0]CrystalHD: Input buffer full. Current delay: 50000 us  FreeListCount 16 ReadyListCount: 0
[wmv3_crystalhd @ 0xf963e0]No frames ready. Current delay: 50000 us  FreeListCount 16 ReadyListCount: 0
Clearing 246 PendMdata entries
DtsAllocIoctlData Error

y
tom



More information about the ffmpeg-devel mailing list