diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-31 10:32:11 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-31 14:48:54 +0100 |
commit | a3251b83e3fb49b5dc28dde8825f71d0e468f4bb (patch) | |
tree | e85ed4c859a898e374d011829be65546298f02a8 /avmedia | |
parent | 96ae2a3300811897c24cccb20f8c2faf382483df (diff) |
ofz: speed up bitmap image fuzzing
Change-Id: I73c9ee7aef7062e3cb025c6ae0f3bb6a91485330
Reviewed-on: https://gerrit.libreoffice.org/48983
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/source/gstreamer/gstframegrabber.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/avmedia/source/gstreamer/gstframegrabber.cxx b/avmedia/source/gstreamer/gstframegrabber.cxx index 45aedd45e375..550510979329 100644 --- a/avmedia/source/gstreamer/gstframegrabber.cxx +++ b/avmedia/source/gstreamer/gstframegrabber.cxx @@ -182,10 +182,11 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe for( int y = 0; y < nHeight; ++y ) { sal_uInt8 *p = pData + y * nStride; - for( int x = 0; x < nWidth; ++x ) + Scanline pScanline = pWrite->GetScanline(y); + for (int x = 0; x < nWidth; ++x) { - BitmapColor col( p[0], p[1], p[2] ); - pWrite->SetPixel( y, x, col ); + BitmapColor col(p[0], p[1], p[2]); + pWrite->SetPixelOnData(pScanline, x, col); p += 3; } } |