22 May 2010 19:23
[PATCH 1/1] Flip h.263 video stream for GEOX fourcc.
Jai Menon <jmenon86 <at> gmail.com>
2010-05-22 17:23:06 GMT
2010-05-22 17:23:06 GMT
---
libavcodec/h263dec.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index f5df556..da79cdc 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
<at> <at> -36,10 +36,22 <at> <at>
#include "vdpau_internal.h"
#include "flv.h"
#include "mpeg4video.h"
+#include "libavutil/pixdesc.h"
//#define DEBUG
//#define PRINT_FRAME_TIME
+static void flip(AVCodecContext *avctx, AVFrame *picture)
+{
+ int h = -((-avctx-≥height) >> av_pix_fmt_descriptors[avctx->pix_fmt].log2_chroma_h);
+ picture->data[0] += picture->linesize[0] * (avctx->height-1);
+ picture->data[1] += picture->linesize[1] * (h-1);
+ picture->data[2] += picture->linesize[2] * (h-1);
+ picture->linesize[0] *= -1;
+ picture->linesize[1] *= -1;
+ picture->linesize[2] *= -1;
+}
+
av_cold int ff_h263_decode_init(AVCodecContext *avctx)
{
(Continue reading)
RSS Feed