Commit 61ec4486b56e4d5413e45508c32c8174c287c980
1 parent
28eadcc4
解码器linux版的BGR设置有缺陷,改回NV12
Showing
2 changed files
with
5 additions
and
4 deletions
vehicle_structure_platform.git0708-3080-trt-face/src/SfxDecoder/DxDecoderWrap.cpp
@@ -299,10 +299,11 @@ void DxDecoderWrap::DxCUDADecoderCallback( void * buf, unsigned int size, int wi | @@ -299,10 +299,11 @@ void DxDecoderWrap::DxCUDADecoderCallback( void * buf, unsigned int size, int wi | ||
299 | return ; | 299 | return ; |
300 | } | 300 | } |
301 | 301 | ||
302 | - // Nv12ToColor24<BGR24>((unsigned char*)buf, m_width, pHwData, 3 * m_width, m_width, m_height, 0); | 302 | + //Nv12ToColor24<BGR24>((unsigned char*)buf, m_width, pHwData, 3 * m_width, m_width, m_height, 0); |
303 | + Nv12ToColor24<BGR24>((unsigned char*)buf, m_width, pHwData, 3*m_width, m_width, m_height, 0); | ||
303 | 304 | ||
304 | 305 | ||
305 | - cudaStatus = cudaMemcpy(pHwData, buf, rgbSize * sizeof(unsigned char), cudaMemcpyDeviceToDevice); | 306 | + // cudaStatus = cudaMemcpy(pHwData, buf, rgbSize * sizeof(unsigned char), cudaMemcpyDeviceToDevice); |
306 | 307 | ||
307 | 308 | ||
308 | // int rgb_size = 3 * m_width * m_height; | 309 | // int rgb_size = 3 * m_width * m_height; |
vehicle_structure_platform.git0708-3080-trt-face/src/SfxDecoder/SfxDecoder.cpp
@@ -43,8 +43,8 @@ bool SfxDecoder::OpenDecoder(DxDecoderConfig& cfg) | @@ -43,8 +43,8 @@ bool SfxDecoder::OpenDecoder(DxDecoderConfig& cfg) | ||
43 | sfx_cfg->flags.useFastDecode = 0; | 43 | sfx_cfg->flags.useFastDecode = 0; |
44 | sfx_cfg->flags.accelId = m_cfg.devId; | 44 | sfx_cfg->flags.accelId = m_cfg.devId; |
45 | sfx_cfg->flags.frameNumber = 1; | 45 | sfx_cfg->flags.frameNumber = 1; |
46 | - // sfx_cfg->flags.fmt = SFX_VIDEO_FORMAT_NV12U8; | ||
47 | - sfx_cfg->flags.fmt = SFX_VIDEO_FORMAT_C3BGRU8; | 46 | + sfx_cfg->flags.fmt = SFX_VIDEO_FORMAT_NV12U8; |
47 | + // sfx_cfg->flags.fmt = SFX_VIDEO_FORMAT_C3BGRU8; | ||
48 | 48 | ||
49 | m_handler = SfxStreamHandlerInterface::SfxGetInstance(sfx_cfg); | 49 | m_handler = SfxStreamHandlerInterface::SfxGetInstance(sfx_cfg); |
50 | 50 |