1) Reduced all openmp to use /2 the available CPUs (for performance reasons)

2) Improved detection of pixel format (enabled GIF support.. although it is still flawed a bit)
3) Improved error reporting when video encoding issues happen
This commit is contained in:
Jonathan Thomas
2014-03-29 15:39:43 -05:00
parent a77de842e4
commit bc4e58c601
4 changed files with 64 additions and 21 deletions

View File

@@ -159,7 +159,7 @@ void FFmpegReader::Open() throw(InvalidFile, NoStreamsFound, InvalidCodec)
pCodecCtx = pFormatCtx->streams[videoStream]->codec;
// Set number of threads equal to number of processors + 1
pCodecCtx->thread_count = omp_get_num_procs();
pCodecCtx->thread_count = omp_get_num_procs() / 2;
// Find the decoder for the video stream
AVCodec *pCodec = avcodec_find_decoder(pCodecCtx->codec_id);
@@ -188,7 +188,7 @@ void FFmpegReader::Open() throw(InvalidFile, NoStreamsFound, InvalidCodec)
aCodecCtx = pFormatCtx->streams[audioStream]->codec;
// Set number of threads equal to number of processors + 1
aCodecCtx->thread_count = omp_get_num_procs();
aCodecCtx->thread_count = omp_get_num_procs() / 2;
// Find the decoder for the audio stream
AVCodec *aCodec = avcodec_find_decoder(aCodecCtx->codec_id);