[vlc-commits] nvdec: reindent after code addition
Steve Lhomme
git at videolan.org
Wed Sep 18 09:05:25 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Sep 11 16:56:23 2019 +0200| [f11f3846c44b24dd07c4ce8d702eb2a2527efc4c] | committer: Steve Lhomme
nvdec: reindent after code addition
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f11f3846c44b24dd07c4ce8d702eb2a2527efc4c
---
modules/hw/nvdec/nvdec.c | 68 ++++++++++++++++++++++++------------------------
1 file changed, 34 insertions(+), 34 deletions(-)
diff --git a/modules/hw/nvdec/nvdec.c b/modules/hw/nvdec/nvdec.c
index cf36bf539c..561967391f 100644
--- a/modules/hw/nvdec/nvdec.c
+++ b/modules/hw/nvdec/nvdec.c
@@ -417,45 +417,45 @@ static int CUDAAPI HandlePictureDisplay(void *p_opaque, CUVIDPARSERDISPINFO *p_d
}
else
{
- p_pic = decoder_NewPicture(p_dec);
- if (unlikely(p_pic == NULL))
- return 0;
-
- result = CALL_CUDA_DEC(cuCtxPushCurrent, p_sys->cuCtx);
- if (unlikely(result != VLC_SUCCESS))
- {
- picture_Release(p_pic);
- return 0;
- }
+ p_pic = decoder_NewPicture(p_dec);
+ if (unlikely(p_pic == NULL))
+ return 0;
- unsigned int i_pitch;
+ result = CALL_CUDA_DEC(cuCtxPushCurrent, p_sys->cuCtx);
+ if (unlikely(result != VLC_SUCCESS))
+ {
+ picture_Release(p_pic);
+ return 0;
+ }
- // Map decoded frame to a device pointer
- result = CALL_CUVID( cuvidMapVideoFrame, p_sys->cudecoder, p_dispinfo->picture_index,
- &frameDevicePtr, &i_pitch, ¶ms );
- if (result != VLC_SUCCESS)
- goto error;
+ unsigned int i_pitch;
- // Copy decoded frame into a new VLC picture
- size_t srcY = 0;
- for (int i_plane = 0; i_plane < p_pic->i_planes; i_plane++) {
- plane_t plane = p_pic->p[i_plane];
- CUDA_MEMCPY2D cu_cpy = {
- .srcMemoryType = CU_MEMORYTYPE_DEVICE,
- .srcDevice = frameDevicePtr,
- .srcY = srcY,
- .srcPitch = i_pitch,
- .dstMemoryType = CU_MEMORYTYPE_HOST,
- .dstHost = plane.p_pixels,
- .dstPitch = plane.i_pitch,
- .WidthInBytes = i_pitch,
- .Height = plane.i_visible_lines,
- };
- result = CALL_CUDA_DEC(cuMemcpy2D, &cu_cpy);
+ // Map decoded frame to a device pointer
+ result = CALL_CUVID( cuvidMapVideoFrame, p_sys->cudecoder, p_dispinfo->picture_index,
+ &frameDevicePtr, &i_pitch, ¶ms );
if (result != VLC_SUCCESS)
goto error;
- srcY += p_sys->decoderHeight;
- }
+
+ // Copy decoded frame into a new VLC picture
+ size_t srcY = 0;
+ for (int i_plane = 0; i_plane < p_pic->i_planes; i_plane++) {
+ plane_t plane = p_pic->p[i_plane];
+ CUDA_MEMCPY2D cu_cpy = {
+ .srcMemoryType = CU_MEMORYTYPE_DEVICE,
+ .srcDevice = frameDevicePtr,
+ .srcY = srcY,
+ .srcPitch = i_pitch,
+ .dstMemoryType = CU_MEMORYTYPE_HOST,
+ .dstHost = plane.p_pixels,
+ .dstPitch = plane.i_pitch,
+ .WidthInBytes = i_pitch,
+ .Height = plane.i_visible_lines,
+ };
+ result = CALL_CUDA_DEC(cuMemcpy2D, &cu_cpy);
+ if (result != VLC_SUCCESS)
+ goto error;
+ srcY += p_sys->decoderHeight;
+ }
}
// Release surface on GPU
More information about the vlc-commits
mailing list