[FFmpeg-cvslog] lavc/dpx: Reset n_datum for every new line when decoding 12bit.
Carl Eugen Hoyos
git at videolan.org
Fri Jun 15 02:23:04 EEST 2018
ffmpeg | branch: master | Carl Eugen Hoyos <ceffmpeg at gmail.com> | Wed Jun 13 14:19:45 2018 +0200| [78298bce70edda705ebfc61ee1d0b8a3b3dad772] | committer: Carl Eugen Hoyos
lavc/dpx: Reset n_datum for every new line when decoding 12bit.
Fixes odd unpacked 12bit decoding.
Reported-by: Piotr Bandurski
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=78298bce70edda705ebfc61ee1d0b8a3b3dad772
---
libavcodec/dpx.c | 5 +++--
libavcodec/version.h | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c
index fb388b6e52..e9f0e05ecd 100644
--- a/libavcodec/dpx.c
+++ b/libavcodec/dpx.c
@@ -234,10 +234,10 @@ static int decode_frame(AVCodecContext *avctx,
case 12:
if (!packing) {
int tested = 0;
- if (descriptor == 50 && endian && (avctx->width%8) == 0) { // Little endian and widths not a multiple of 8 need tests
+ if (descriptor == 50 && endian) { // Little endian needs tests
tested = 1;
}
- if (descriptor == 51 && endian && (avctx->width%2) == 0) { // Little endian and widths not a multiple of 2 need tests
+ if (descriptor == 51 && endian) { // Little endian needs tests
tested = 1;
}
if (!tested) {
@@ -422,6 +422,7 @@ static int decode_frame(AVCodecContext *avctx,
&n_datum, endian);
}
}
+ n_datum = 0;
for (i = 0; i < elements; i++)
ptr[i] += p->linesize[i];
// Jump to next aligned position
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 5e71b48816..219f56c37d 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
#define LIBAVCODEC_VERSION_MAJOR 58
#define LIBAVCODEC_VERSION_MINOR 20
-#define LIBAVCODEC_VERSION_MICRO 101
+#define LIBAVCODEC_VERSION_MICRO 102
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
More information about the ffmpeg-cvslog
mailing list