[FFmpeg-cvslog] fraps: frame threading support.
Reimar Döffinger
git at videolan.org
Sun Jan 29 21:53:28 CET 2012
ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Sun Jan 29 14:59:32 2012 +0100| [cd3ced1bb9e1ca72b0bb328f3b6e7e2bccfa2938] | committer: Reimar Döffinger
fraps: frame threading support.
Codec is too simple to gain much from it at lower resolutions,
but should help at very high resolutions, particularly for
v3 and v5 where a not too optimized pseudo-YUV to RGB
is done in the codec.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cd3ced1bb9e1ca72b0bb328f3b6e7e2bccfa2938
---
libavcodec/fraps.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c
index 1046407..bbabfd9 100644
--- a/libavcodec/fraps.c
+++ b/libavcodec/fraps.c
@@ -36,6 +36,7 @@
#include "huffman.h"
#include "bytestream.h"
#include "dsputil.h"
+#include "thread.h"
#define FPS_TAG MKTAG('F', 'P', 'S', 'x')
@@ -199,12 +200,12 @@ static int decode_frame(AVCodecContext *avctx,
}
if (f->data[0])
- avctx->release_buffer(avctx, f);
+ ff_thread_release_buffer(avctx, f);
f->pict_type = AV_PICTURE_TYPE_I;
f->key_frame = 1;
f->reference = 0;
f->buffer_hints = FF_BUFFER_HINTS_VALID;
- if (avctx->get_buffer(avctx, f)) {
+ if (ff_thread_get_buffer(avctx, f)) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
@@ -315,6 +316,6 @@ AVCodec ff_fraps_decoder = {
.init = decode_init,
.close = decode_end,
.decode = decode_frame,
- .capabilities = CODEC_CAP_DR1,
+ .capabilities = CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS,
.long_name = NULL_IF_CONFIG_SMALL("Fraps"),
};
More information about the ffmpeg-cvslog
mailing list