[FFmpeg-cvslog] Fix r10k codec for widths that are not multiples of 64.
Carl Eugen Hoyos
git at videolan.org
Mon May 28 19:11:02 CEST 2012
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Mon May 28 19:05:15 2012 +0200| [5cd947d81b3b6dcfbb1f42e800270a4da5dbbcac] | committer: Carl Eugen Hoyos
Fix r10k codec for widths that are not multiples of 64.
Fixes ticket #1358
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5cd947d81b3b6dcfbb1f42e800270a4da5dbbcac
---
libavcodec/r210dec.c | 3 ++-
libavcodec/r210enc.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavcodec/r210dec.c b/libavcodec/r210dec.c
index b81a4f2..07dc588 100644
--- a/libavcodec/r210dec.c
+++ b/libavcodec/r210dec.c
@@ -41,7 +41,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
int h, w;
AVFrame *pic = avctx->coded_frame;
const uint32_t *src = (const uint32_t *)avpkt->data;
- int aligned_width = FFALIGN(avctx->width, 64);
+ int aligned_width = FFALIGN(avctx->width,
+ avctx->codec_id == CODEC_ID_R10K ? 1 : 64);
uint8_t *dst_line;
if (pic->data[0])
diff --git a/libavcodec/r210enc.c b/libavcodec/r210enc.c
index 92c9ce3..0a7dd33 100644
--- a/libavcodec/r210enc.c
+++ b/libavcodec/r210enc.c
@@ -38,7 +38,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *pic, int *got_packet)
{
int i, j, ret;
- int aligned_width = FFALIGN(avctx->width, 64);
+ int aligned_width = FFALIGN(avctx->width,
+ avctx->codec_id == CODEC_ID_R10K ? 1 : 64);
int pad = (aligned_width - avctx->width) * 4;
uint8_t *src_line;
uint8_t *dst;
More information about the ffmpeg-cvslog
mailing list