Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-12-01 21:32:00 +0300
committerAnton Khirnov <anton@khirnov.net>2020-12-10 12:07:09 +0300
commit19ce06423964627d553c7ee602fd5c73ca4b2135 (patch)
tree7f04a8f1b6952d4d9005e2b064989e83e701a2b6 /libavcodec/mjpegdec.h
parente9a2a8777317d91af658f774c68442ac4aa726ec (diff)
smvjpegdec: merge into mjpegdec
SMVJPEG stores frames as slices of a big JPEG image. The decoder is implemented as a wrapper that instantiates a full internal MJPEG decoder, then forwards the decoded frames with offset data pointers. This is unnecessarily complex and fragile, not supporting useful decoder capabilities like direct rendering. Re-implement the decoder inside the MJPEG decoder, which is accomplished by returning each decoded frame multiple times, setting cropping information appropriately on each instance. One peculiar aspect of the previous design is that since - the smvjpeg decoder returns one frame per input packet - there are multiple frames in each packets (the aformentioned slices) the demuxer needs to return each packet multiple times. This is now also eliminated - the demuxer now returns each packet exactly once, with the duration set to the number of frames it decodes to. This also removes one of the last remaining internal uses of the old video decoding API.
Diffstat (limited to 'libavcodec/mjpegdec.h')
-rw-r--r--libavcodec/mjpegdec.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mjpegdec.h b/libavcodec/mjpegdec.h
index 66fb0ddcba..d9844adf4e 100644
--- a/libavcodec/mjpegdec.h
+++ b/libavcodec/mjpegdec.h
@@ -142,6 +142,10 @@ typedef struct MJpegDecodeContext {
int iccnum;
int iccread;
+ AVFrame *smv_frame;
+ int smv_frames_per_jpeg;
+ int smv_next_frame;
+
// Raw stream data for hwaccel use.
const uint8_t *raw_image_buffer;
size_t raw_image_buffer_size;