Jai Menon | 22 May 19:23 2010
Picon

[PATCH 1/1] Flip h.263 video stream for GEOX fourcc.

---
 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)

Michael Niedermayer | 22 May 21:41 2010
Picon
Picon

Re: [PATCH 1/1] Flip h.263 video stream for GEOX fourcc.

On Sat, May 22, 2010 at 10:53:06PM +0530, Jai Menon wrote:
> ---
>  libavcodec/h263dec.c |   15 +++++++++++++++
>  1 files changed, 15 insertions(+), 0 deletions(-)

this isnt correct, we need to draw it flipped not return a fliped pic.
the issue is with direct rendering, consider that the buffer we get by
get_buffer() is a buffer of some API (sdl or whatever) and we might
not be able to tell that api that we drawed it fliped in there

[...]

--

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel <at> mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel

Gmane