va_trace: allow surface trace to dump part of surface content
authorAustin Yuan <shengquan.yuan@intel.com>
Wed, 8 Aug 2012 03:34:00 +0000 (11:34 +0800)
committerAustin Yuan <shengquan.yuan@intel.com>
Wed, 8 Aug 2012 03:34:00 +0000 (11:34 +0800)
commit5190a7465756a41808a562c8eccec521dbf77d8c
treef76032b23073848b4304acf2eb164fb73e1b21d5
parent0af365de4c03c12fc20183093a944f7513a1c7be
va_trace: allow surface trace to dump part of surface content

To debug/isolate video record quality issue (blocky/corruption, etc),
we always need to dump the YUV image from camera. LibVA has such
functionality, but due to storage bandwidth issue (~10M Byte/second),
it is hard to write 1080P 30fps YUV data to disk (~88M Byte/second).
Now refine the functionality to only dump part of the image, and
won't need to modify the code in the default build.

The method is:
edit /etc/libva.conf to include bellow (all export them):
LIBVA_TRACE_SURFACE=/data/enc-XXX.yuv
LIBVA_TRACE_GEOMETRY=320x240+20+20

It will only save 320x240 from (20,20) of the source surface to file
/data/enc-XXX.yuv.

Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
va/va_trace.c