Browse Source

mjpeg: Mark decoder family as thread safe

No global variables are used and the VLC tables are allocated without
static elements. This will allow using a JPEG decoding context within
other decoders.
tags/n2.7
Vittorio Giovara 10 years ago
parent
commit
5a0e953c24
5 changed files with 10 additions and 0 deletions
  1. +2
    -0
      libavcodec/jpeglsdec.c
  2. +2
    -0
      libavcodec/mjpegbdec.c
  3. +2
    -0
      libavcodec/mjpegdec.c
  4. +1
    -0
      libavcodec/mxpegdec.c
  5. +3
    -0
      libavcodec/sp5xdec.c

+ 2
- 0
libavcodec/jpeglsdec.c View File

@@ -28,6 +28,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "golomb.h"
#include "internal.h"
#include "mathops.h"
#include "mjpeg.h"
#include "mjpegdec.h"
@@ -396,4 +397,5 @@ AVCodec ff_jpegls_decoder = {
.close = ff_mjpeg_decode_end,
.decode = ff_mjpeg_decode_frame,
.capabilities = CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};

+ 2
- 0
libavcodec/mjpegbdec.c View File

@@ -27,6 +27,7 @@
#include <inttypes.h>

#include "avcodec.h"
#include "internal.h"
#include "mjpeg.h"
#include "mjpegdec.h"

@@ -161,4 +162,5 @@ AVCodec ff_mjpegb_decoder = {
.close = ff_mjpeg_decode_end,
.decode = mjpegb_decode_frame,
.capabilities = CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};

+ 2
- 0
libavcodec/mjpegdec.c View File

@@ -1723,6 +1723,7 @@ AVCodec ff_mjpeg_decoder = {
.decode = ff_mjpeg_decode_frame,
.capabilities = CODEC_CAP_DR1,
.priv_class = &mjpegdec_class,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};

AVCodec ff_thp_decoder = {
@@ -1735,4 +1736,5 @@ AVCodec ff_thp_decoder = {
.close = ff_mjpeg_decode_end,
.decode = ff_mjpeg_decode_frame,
.capabilities = CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};

+ 1
- 0
libavcodec/mxpegdec.c View File

@@ -346,4 +346,5 @@ AVCodec ff_mxpeg_decoder = {
.close = mxpeg_decode_end,
.decode = mxpeg_decode_frame,
.capabilities = CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};

+ 3
- 0
libavcodec/sp5xdec.c View File

@@ -25,6 +25,7 @@
*/

#include "avcodec.h"
#include "internal.h"
#include "mjpeg.h"
#include "mjpegdec.h"
#include "sp5x.h"
@@ -103,6 +104,7 @@ AVCodec ff_sp5x_decoder = {
.close = ff_mjpeg_decode_end,
.decode = sp5x_decode_frame,
.capabilities = CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};

AVCodec ff_amv_decoder = {
@@ -114,4 +116,5 @@ AVCodec ff_amv_decoder = {
.init = ff_mjpeg_decode_init,
.close = ff_mjpeg_decode_end,
.decode = sp5x_decode_frame,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};

Loading…
Cancel
Save