Commit 9014b460 authored by Sam Hocevar's avatar Sam Hocevar

   Commited BeOS changes by Richard Shepherd and Tony Castley.

   include/video_output.h
    * Added boolean_t b_YCbr to vout_thread_s structure to flag YUV-YCbCr
      decoding needed instead of YUV-RGB
    * Will be removed later when video_output.c rewritten

   src/video_output.c
    * vout_CreateThread() initialises b_YCbr to zero

   plugins/beos/*
    * New BeOS video plugin that supports hardware overlays and new
      MediaPlayer compatible interface

   plugins/*
    * Added YUV-YCbCr transforms
parent 3fab36dc
......@@ -22,3 +22,6 @@
Renaud Dartus <reno@via.ecp.fr>
Henri Fallon <henri@via.ecp.fr>
Richard Shepherd <richard@rshepherd.demon.co.uk>
Tony Castley <tcastley@mail.powerup.com.au>
......@@ -288,7 +288,9 @@ PLUGIN_ALSA = plugins/alsa/alsa.o \
PLUGIN_BEOS = plugins/beos/beos.o \
plugins/beos/aout_beos.o \
plugins/beos/intf_beos.o \
plugins/beos/vout_beos.o
plugins/beos/vout_beos.o \
plugins/beos/DrawingTidbits.o \
plugins/beos/TransportButton.o
PLUGIN_DSP = plugins/dsp/dsp.o \
plugins/dsp/aout_dsp.o
......
......@@ -56,9 +56,9 @@ typedef void (yuv_end_t) ( p_vout_thread_t p_vout );
typedef struct vout_yuv_s
{
/* conversion functions */
vout_yuv_convert_t * p_Convert420; /* YUV 4:2:0 converter */
vout_yuv_convert_t * p_Convert422; /* YUV 4:2:2 converter */
vout_yuv_convert_t * p_Convert444; /* YUV 4:4:4 converter */
vout_yuv_convert_t *pf_yuv420; /* YUV 4:2:0 converter */
vout_yuv_convert_t *pf_yuv422; /* YUV 4:2:2 converter */
vout_yuv_convert_t *pf_yuv444; /* YUV 4:4:4 converter */
/* Pre-calculated conversion tables */
void * p_base; /* base for all conversion tables */
......@@ -166,6 +166,7 @@ typedef struct vout_thread_s
/* Pictures and rendering properties */
boolean_t b_grayscale; /* color or grayscale display */
boolean_t b_YCbr; /* use YUV to YCbr instead of RGB */
boolean_t b_info; /* print additional information */
boolean_t b_interface; /* render interface */
boolean_t b_scale; /* allow picture scaling */
......@@ -197,7 +198,9 @@ typedef struct vout_thread_s
p_vout_font_t p_default_font; /* default font */
p_vout_font_t p_large_font; /* large font */
#ifdef STATS
count_t c_loops;
#endif
} vout_thread_t;
/* Flags for changes - these flags are set in the i_changes field when another
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/*****************************************************************************
* DrawingTidbits.cpp
*****************************************************************************
* Copyright (C) 2001 VideoLAN
*
* Authors:
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include <Bitmap.h>
#include <Debug.h>
#include <Screen.h>
#include "DrawingTidbits.h"
inline uchar
ShiftComponent(uchar component, float percent)
{
// change the color by <percent>, make sure we aren't rounding
// off significant bits
if (percent >= 1)
return (uchar)(component * (2 - percent));
else
return (uchar)(255 - percent * (255 - component));
}
rgb_color
ShiftColor(rgb_color color, float percent)
{
rgb_color result = {
ShiftComponent(color.red, percent),
ShiftComponent(color.green, percent),
ShiftComponent(color.blue, percent),
0
};
return result;
}
static bool
CompareColors(const rgb_color a, const rgb_color b)
{
return a.red == b.red
&& a.green == b.green
&& a.blue == b.blue
&& a.alpha == b.alpha;
}
bool
operator==(const rgb_color &a, const rgb_color &b)
{
return CompareColors(a, b);
}
bool
operator!=(const rgb_color &a, const rgb_color &b)
{
return !CompareColors(a, b);
}
void
ReplaceColor(BBitmap *bitmap, rgb_color from, rgb_color to)
{
ASSERT(bitmap->ColorSpace() == B_COLOR_8_BIT); // other color spaces not implemented yet
BScreen screen(B_MAIN_SCREEN_ID);
uint32 fromIndex = screen.IndexForColor(from);
uint32 toIndex = screen.IndexForColor(to);
uchar *bits = (uchar *)bitmap->Bits();
int32 bitsLength = bitmap->BitsLength();
for (int32 index = 0; index < bitsLength; index++)
if (bits[index] == fromIndex)
bits[index] = toIndex;
}
void
ReplaceTransparentColor(BBitmap *bitmap, rgb_color with)
{
ASSERT(bitmap->ColorSpace() == B_COLOR_8_BIT); // other color spaces not implemented yet
BScreen screen(B_MAIN_SCREEN_ID);
uint32 withIndex = screen.IndexForColor(with);
uchar *bits = (uchar *)bitmap->Bits();
int32 bitsLength = bitmap->BitsLength();
for (int32 index = 0; index < bitsLength; index++)
if (bits[index] == B_TRANSPARENT_8_BIT)
bits[index] = withIndex;
}
/*****************************************************************************
* DrawingTidbits.h
*****************************************************************************
* Copyright (C) 2001 VideoLAN
*
* Authors:
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef __DRAWING_TIBITS__
#define __DRAWING_TIBITS__
#include <GraphicsDefs.h>
rgb_color ShiftColor(rgb_color , float );
bool operator==(const rgb_color &, const rgb_color &);
bool operator!=(const rgb_color &, const rgb_color &);
inline rgb_color
Color(int32 r, int32 g, int32 b, int32 alpha = 255)
{
rgb_color result;
result.red = r;
result.green = g;
result.blue = b;
result.alpha = alpha;
return result;
}
const rgb_color kWhite = { 255, 255, 255, 255};
const rgb_color kBlack = { 0, 0, 0, 255};
const float kDarkness = 1.06;
const float kDimLevel = 0.6;
void ReplaceColor(BBitmap *bitmap, rgb_color from, rgb_color to);
void ReplaceTransparentColor(BBitmap *bitmap, rgb_color with);
#endif
/*****************************************************************************
* window.h: BeOS window class prototype
* InterfaceWindow.h: BeOS interface window class prototype
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* Copyright (C) 1999, 2000, 2001 VideoLAN
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
*
......@@ -20,26 +20,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
class VideoWindow : public BWindow
{
public:
// standard constructor and destructor
VideoWindow( BRect frame, const char *name,
struct vout_thread_s *p_video_output);
~VideoWindow();
// standard window member
virtual bool QuitRequested();
virtual void FrameResized(float width, float height);
virtual void MessageReceived(BMessage *message);
struct vout_thread_s *p_vout;
BView * p_view;
// additional events
bool b_resized;
};
class InterfaceWindow : public BWindow
{
public:
......@@ -51,6 +31,11 @@ public:
virtual void MessageReceived(BMessage *message);
intf_thread_t *p_intf;
BSlider * p_vol;
BSlider * p_seek;
BCheckBox * p_mute;
sem_id fScrubSem;
bool fSeeking;
};
class InterfaceView : public BView
......@@ -60,5 +45,24 @@ public:
~InterfaceView();
virtual void MessageReceived(BMessage *message);
};
class SeekSlider : public BSlider
{
public:
SeekSlider(BRect frame,
InterfaceWindow *owner,
int32 minValue,
int32 maxValue,
thumb_style thumbType = B_TRIANGLE_THUMB);
~SeekSlider();
virtual void MouseDown(BPoint);
virtual void MouseUp(BPoint pt);
virtual void MouseMoved(BPoint pt, uint32 c, const BMessage *m);
private:
InterfaceWindow* fOwner;
bool fMouseDown;
};
/*****************************************************************************
* MsgVals.h
*****************************************************************************
* Copyright (C) 2001 VideoLAN
*
* Authors:
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/* MsgVals.h */
#define PLAYING 0
#define PAUSED 1
const uint32 OPEN_DVD = 'OPDV';
const uint32 STOP_PLAYBACK = 'STPL';
const uint32 START_PLAYBACK = 'PLAY';
const uint32 PAUSE_PLAYBACK = 'PAPL';
const uint32 FASTER_PLAY = 'FAPL';
const uint32 SLOWER_PLAY = 'SLPL';
const uint32 SEEK_PLAYBACK = 'SEEK';
const uint32 VOLUME_CHG = 'VOCH';
const uint32 VOLUME_MUTE = 'MUTE';
const uint32 SELECT_CHANNEL = 'CHAN';
This diff is collapsed.
/*****************************************************************************
* TransportButton.h
*****************************************************************************
* Copyright (C) 2001 VideoLAN
*
* Authors:
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#ifndef __MEDIA_BUTTON__
#define __MEDIA_BUTTON__
#include <Control.h>
class BMessage;
class BBitmap;
class PeriodicMessageSender;
class BitmapStash;
// TransportButton must be installed into a window with B_ASYNCHRONOUS_CONTROLS on
// currently no button focus drawing
class TransportButton : public BControl {
public:
TransportButton(BRect frame, const char *name,
const unsigned char *normalBits,
const unsigned char *pressedBits,
const unsigned char *disabledBits,
BMessage *invokeMessage, // done pressing over button
BMessage *startPressingMessage = 0, // just clicked button
BMessage *pressingMessage = 0, // periodical still pressing
BMessage *donePressing = 0, // tracked out of button/didn't invoke
bigtime_t period = 0, // pressing message period
uint32 key = 0, // optional shortcut key
uint32 modifiers = 0, // optional shortcut key modifier
uint32 resizeFlags = B_FOLLOW_LEFT | B_FOLLOW_TOP);
virtual ~TransportButton();
void SetStartPressingMessage(BMessage *);
void SetPressingMessage(BMessage *);
void SetDonePressingMessage(BMessage *);
void SetPressingPeriod(bigtime_t);
virtual void SetEnabled(bool);
protected:
enum {
kDisabledMask = 0x1,
kPressedMask = 0x2
};
virtual void AttachedToWindow();
virtual void DetachedFromWindow();
virtual void Draw(BRect);
virtual void MouseDown(BPoint);
virtual void MouseMoved(BPoint, uint32 code, const BMessage *);
virtual void MouseUp(BPoint);
virtual void WindowActivated(bool);
virtual BBitmap *MakeBitmap(uint32);
// lazy bitmap builder
virtual uint32 ModeMask() const;
// mode mask corresponding to the current button state
// - determines which bitmap will be used
virtual const unsigned char *BitsForMask(uint32) const;
// pick the right bits based on a mode mask
// overriding class can add swapping between two pairs of bitmaps, etc.
virtual void StartPressing();
virtual void MouseCancelPressing();
virtual void DonePressing();
private:
void ShortcutKeyDown();
void ShortcutKeyUp();
void MouseStartPressing();
void MouseDonePressing();
BitmapStash *bitmaps;
// using BitmapStash * here instead of a direct member so that the class can be private in
// the .cpp file
// bitmap bits used to build bitmaps for the different states
const unsigned char *normalBits;
const unsigned char *pressedBits;
const unsigned char *disabledBits;
BMessage *startPressingMessage;
BMessage *pressingMessage;
BMessage *donePressingMessage;
bigtime_t pressingPeriod;
bool mouseDown;
bool keyDown;
PeriodicMessageSender *messageSender;
BMessageFilter *keyPressFilter;
typedef BControl _inherited;
friend class SkipButtonKeypressFilter;
friend class BitmapStash;
};
class PlayPauseButton : public TransportButton {
// Knows about playing and paused states, blinks
// the pause LED during paused state
public:
PlayPauseButton(BRect frame, const char *name,
const unsigned char *normalBits,
const unsigned char *pressedBits,
const unsigned char *disabledBits,
const unsigned char *normalPlayingBits,
const unsigned char *pressedPlayingBits,
const unsigned char *normalPausedBits,
const unsigned char *pressedPausedBits,
BMessage *invokeMessage, // done pressing over button
uint32 key = 0, // optional shortcut key
uint32 modifiers = 0, // optional shortcut key modifier
uint32 resizeFlags = B_FOLLOW_LEFT | B_FOLLOW_TOP);
// These need get called periodically to update the button state
// OK to call them over and over - once the state is correct, the call
// is very low overhead
void SetStopped();
void SetPlaying();
void SetPaused();
protected:
virtual uint32 ModeMask() const;
virtual const unsigned char *BitsForMask(uint32) const;
virtual void StartPressing();
virtual void MouseCancelPressing();
virtual void DonePressing();
private:
const unsigned char *normalPlayingBits;
const unsigned char *pressedPlayingBits;
const unsigned char *normalPausedBits;
const unsigned char *pressedPausedBits;
enum PlayState {
kStopped,
kAboutToPlay,
kPlaying,
kAboutToPause,
kPausedLedOn,
kPausedLedOff
};
enum {
kPlayingMask = 0x4,
kPausedMask = 0x8
};
PlayState state;
bigtime_t lastPauseBlinkTime;
uint32 lastModeMask;
typedef TransportButton _inherited;
};
#endif
/*****************************************************************************
* VideoWindow.h: BeOS video window class prototype
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include <Slider.h>
#include <Accelerant.h>
#include <Bitmap.h>
class VLCView : public BView
{
public:
VLCView( BRect bounds);
~VLCView();
virtual void MouseDown(BPoint point);
};
class VideoWindow : public BWindow
{
public:
// standard constructor and destructor
VideoWindow( BRect frame, const char *name,
struct vout_thread_s *p_video_output);
~VideoWindow();
// standard window member
virtual bool QuitRequested();
virtual void FrameResized(float width, float height);
virtual void MessageReceived(BMessage *message);
virtual void Zoom(BPoint origin, float width, float height);
// this is the hook controling direct screen connection
int32 i_bytes_per_pixel;
int32 i_screen_depth;
struct vout_thread_s *p_vout;
int32 fRowBytes;
uint32 fNumClipRects;
int i_buffer_index;
bool fDirty;
thread_id fDrawThreadID;
BBitmap *bitmap[2];
VLCView *view;
bool teardownwindow;
bool is_zoomed;
bool fUsingOverlay;
private:
display_mode old_mode;
BRect rect;
};
This diff is collapsed.
This diff is collapsed.
/*****************************************************************************
* transforms_yuv.c: C YUV transformation functions
* Provides functions to perform the YUV conversion. The functions provided here
* are a complete and portable C implementation, and may be replaced in certain
* case by optimized functions.
* Provides functions to perform the YUV conversion. The functions provided
* here are a complete and portable C implementation, and may be replaced in
* certain cases by optimized functions.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* Copyright (C) 1999, 2000, 2001 VideoLAN
*
* Authors:
* Authors: Vincent Seguin <ptyx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
* Richard Shepherd <richard@rshepherd.demon.co.uk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -134,7 +136,7 @@ void ConvertYUV420RGB8( YUV_ARGS_8BPP )
static int dither22[4] = { 0x6, 0x16, 0x2, 0x12 };
static int dither23[4] = { 0x1e, 0xe, 0x1a, 0xa };
/*
/*
* Initialize some values - i_pic_line_width will store the line skip
*/
i_pic_line_width -= i_pic_width;
......@@ -691,3 +693,102 @@ void ConvertYUV444RGB32( YUV_ARGS_32BPP )
}
}
static __inline__ void yuv2YCbCr422_inner( u8 *p_y, u8 *p_u, u8 *p_v,
u8 *p_out, int i_width_by_4 )
{
int i_x;
for( i_x = 0 ; i_x < 4 * i_width_by_4 ; ++i_x )
{
*p_out++ = p_y[ 2 * i_x ];
*p_out++ = p_u[ i_x ];
*p_out++ = p_y[ 2 * i_x + 1 ];
*p_out++ = p_v[ i_x ];
}
}
void ConvertYUV420YCbr8 ( YUV_ARGS_8BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 420, YCbr = 8" );
}
void ConvertYUV422YCbr8 ( YUV_ARGS_8BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 422, YCbr = 8" );
}
void ConvertYUV444YCbr8 ( YUV_ARGS_8BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 444, YCbr = 8" );
}
/*****************************************************************************
* yuv2YCbCr422: color YUV 4:2:0 to color YCbCr 16bpp
*****************************************************************************/
void ConvertYUV420YCbr16 ( YUV_ARGS_16BPP )
{
int i_y;
for( i_y = 0 ; i_y < i_height ; ++i_y )
{
yuv2YCbCr422_inner( p_y, p_u, p_v, (u8 *)p_pic, i_width / 8 );
p_pic += i_width * 2;
p_y += i_width;
if( i_y & 0x1 )
{
p_u += i_width / 2;
p_v += i_width / 2;
}
}
}
void ConvertYUV422YCbr16 ( YUV_ARGS_16BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 422, YCbr = 16" );
}
void ConvertYUV444YCbr16 ( YUV_ARGS_16BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 444, YCbr = 16" );
}
void ConvertYUV420YCbr24 ( YUV_ARGS_24BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 420, YCbr = 24" );
}
void ConvertYUV422YCbr24 ( YUV_ARGS_24BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 422, YCbr = 24" );
}
void ConvertYUV444YCbr24 ( YUV_ARGS_24BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 444, YCbr = 24" );
}
void ConvertYUV420YCbr32 ( YUV_ARGS_32BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 420, YCbr = 32" );
}
void ConvertYUV422YCbr32 ( YUV_ARGS_32BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 422, YCbr = 32" );
}
void ConvertYUV444YCbr32 ( YUV_ARGS_32BPP )
{
intf_ErrMsg( "yuv error: unhandled function, chroma = 444, YCbr = 32" );
}
......@@ -168,8 +168,6 @@ void ConvertYUV420RGB16( YUV_ARGS_16BPP )
i_scale_count = ( i_vertical_scaling == 1 ) ? i_pic_height : i_height;
for( i_y = 0; i_y < i_height; i_y++ )
{
/* Mark beginnning of line for possible later line copy, and initialize
* buffer */
p_pic_start = p_pic;
p_buffer = b_horizontal_scaling ? p_buffer_start : p_pic;
......@@ -189,12 +187,12 @@ void ConvertYUV420RGB16( YUV_ARGS_16BPP )
p_v += 4;
p_buffer += 8;
}
SCALE_WIDTH;
SCALE_HEIGHT( 420, 2 );
}
}
}
/*****************************************************************************
* ConvertYUV422RGB16: color YUV 4:2:2 to RGB 2 Bpp
*****************************************************************************/
......@@ -251,6 +249,7 @@ void ConvertY4Gray32( YUV_ARGS_32BPP )
intf_ErrMsg( "yuvmmx error: unhandled function, grayscale, bpp = 32" );
}
/*****************************************************************************
* ConvertYUV420RGB32: color YUV 4:2:0 to RGB 4 Bpp
*****************************************************************************/
......@@ -277,14 +276,9 @@ void ConvertYUV420RGB32( YUV_ARGS_32BPP )
SetOffset( i_width, i_height, i_pic_width, i_pic_height,
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
/*
* Perform conversion
*/
i_scale_count = ( i_vertical_scaling == 1 ) ? i_pic_height : i_height;
for( i_y = 0; i_y < i_height; i_y++ )
{
/* Mark beginnning of line for possible later line copy, and initialize
* buffer */
p_pic_start = p_pic;
p_buffer = b_horizontal_scaling ? p_buffer_start : p_pic;
......@@ -309,6 +303,7 @@ void ConvertYUV420RGB32( YUV_ARGS_32BPP )
SCALE_WIDTH;
SCALE_HEIGHT( 420, 4 );
}
}
/*****************************************************************************
......@@ -327,3 +322,150 @@ void ConvertYUV444RGB32( YUV_ARGS_32BPP )
intf_ErrMsg( "yuv error: unhandled function, chroma = 444, bpp = 32" );
}
/*****************************************************************************
* ConvertYUV420YCbr8: color YUV 4:2:0 to YCbr 8 Bpp
*****************************************************************************/
void ConvertYUV420YCbr8 ( YUV_ARGS_8BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 420, YCbr = 8" );
}
/*****************************************************************************
* ConvertYUV422YCbr8: color YUV 4:2:2 to YCbr 8 Bpp
*****************************************************************************/
void ConvertYUV422YCbr8 ( YUV_ARGS_8BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 422, YCbr = 8" );
}
/*****************************************************************************
* ConvertYUV444YCbr8: color YUV 4:4:4 to YCbr 8 Bpp
*****************************************************************************/
void ConvertYUV444YCbr8 ( YUV_ARGS_8BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 444, YCbr = 8" );
}
/*****************************************************************************
* ConvertYUV420YCbr16: color YUV 4:2:0 to YCbr 16 Bpp
*****************************************************************************/
void ConvertYUV420YCbr16 ( YUV_ARGS_16BPP )
{
boolean_t b_horizontal_scaling; /* horizontal scaling type */
int i_vertical_scaling; /* vertical scaling type */
int i_x, i_y; /* horizontal and vertical indexes */
int i_scale_count; /* scale modulo counter */
int i_chroma_width; /* chroma width */
u16 * p_pic_start; /* beginning of the current line for copy */
u16 * p_buffer_start; /* conversion buffer start */
u16 * p_buffer; /* conversion buffer pointer */
int * p_offset_start; /* offset array start */
int * p_offset; /* offset array pointer */
i_pic_line_width -= i_pic_width;
i_chroma_width = i_width / 2;
p_buffer_start = p_vout->yuv.p_buffer;
p_offset_start = p_vout->yuv.p_offset;
SetOffset( i_width, i_height, i_pic_width, i_pic_height,
&b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
i_scale_count = ( i_vertical_scaling == 1 ) ? i_pic_height : i_height;
for( i_y = 0; i_y < i_height; i_y++ )
{
p_pic_start = p_pic;
p_buffer = b_horizontal_scaling ? p_buffer_start : p_pic;
for ( i_x = i_width / 8; i_x--; )
{
__asm__( MMX_INIT_16
: : "r" (p_y), "r" (p_u), "r" (p_v), "r" (p_buffer) );
__asm__( ".align 8"
MMX_YUV_YCBR_422
: : "r" (p_y), "r" (p_u), "r" (p_v), "r" (p_buffer) );
p_y += 8;
p_u += 4;
p_v += 4;
p_buffer += 8;
}
SCALE_WIDTH;
SCALE_HEIGHT( 420, 2 );
}
}
/*****************************************************************************
* ConvertYUV422YCbr8: color YUV 4:2:2 to YCbr 16 Bpp
*****************************************************************************/
void ConvertYUV422YCbr16 ( YUV_ARGS_16BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 422, YCbr = 16" );
}
/*****************************************************************************
* ConvertYUV424YCbr8: color YUV 4:4:4 to YCbr 16 Bpp
*****************************************************************************/
void ConvertYUV444YCbr16 ( YUV_ARGS_16BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 444, YCbr = 16" );
}
/*****************************************************************************
* ConvertYUV420YCbr24: color YUV 4:2:0 to YCbr 24 Bpp
*****************************************************************************/
void ConvertYUV420YCbr24 ( YUV_ARGS_24BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 420, YCbr = 24" );
}
/*****************************************************************************
* ConvertYUV422YCbr24: color YUV 4:2:2 to YCbr 24 Bpp
*****************************************************************************/
void ConvertYUV422YCbr24 ( YUV_ARGS_24BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 422, YCbr = 24" );
}
/*****************************************************************************
* ConvertYUV444YCbr24: color YUV 4:4:4 to YCbr 24 Bpp
*****************************************************************************/
void ConvertYUV444YCbr24 ( YUV_ARGS_24BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 444, YCbr = 24" );
}
/*****************************************************************************
* ConvertYUV420YCbr32: color YUV 4:2:0 to YCbr 32 Bpp
*****************************************************************************/
void ConvertYUV420YCbr32 ( YUV_ARGS_32BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 420, YCbr = 32" );
}
/*****************************************************************************
* ConvertYUV422YCbr32: color YUV 4:2:2 to YCbr 32 Bpp
*****************************************************************************/
void ConvertYUV422YCbr32 ( YUV_ARGS_32BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 422, YCbr = 32" );
}
/*****************************************************************************
* ConvertYUV444YCbr32: color YUV 4:4:4 to YCbr 32 Bpp
*****************************************************************************/
void ConvertYUV444YCbr32 ( YUV_ARGS_32BPP )
{
intf_ErrMsg( "yuvmmx error: unhandled function, chroma = 444, YCbr = 32" );
}
......@@ -105,6 +105,16 @@ pmulhw mmx_Y_coeff, %%mm6 # Mul 4 Y even 00 y6 00 y4 00 y2 00 y0 \n\
pmulhw mmx_Y_coeff, %%mm7 # Mul 4 Y odd 00 y7 00 y5 00 y3 00 y1 \n\
"
#define MMX_YUV_YCBR_422 " \n\
\n\
punpcklbw %%mm1, %%mm0 \n\
movq %%mm6, %%mm2 \n\
punpckhbw %%mm0, %%mm6 \n\
punpcklbw %%mm0, %%mm2 \n\
movq %%mm2, (%3) \n\
movq %%mm6, 8(%3) \n\
"
/*
* Do the addition part of the conversion for even and odd pixels,
* register usage:
......
......@@ -91,3 +91,20 @@ void ConvertYUV420RGB32 ( YUV_ARGS_32BPP );
void ConvertYUV422RGB32 ( YUV_ARGS_32BPP );
void ConvertYUV444RGB32 ( YUV_ARGS_32BPP );
void ConvertYUV420YCbr8 ( YUV_ARGS_8BPP );
void ConvertYUV422YCbr8 ( YUV_ARGS_8BPP );
void ConvertYUV444YCbr8 ( YUV_ARGS_8BPP );
void ConvertYUV420YCbr16 ( YUV_ARGS_16BPP );
void ConvertYUV422YCbr16 ( YUV_ARGS_16BPP );
void ConvertYUV444YCbr16 ( YUV_ARGS_16BPP );
void ConvertYUV420YCbr24 ( YUV_ARGS_24BPP );
void ConvertYUV422YCbr24 ( YUV_ARGS_24BPP );
void ConvertYUV444YCbr24 ( YUV_ARGS_24BPP );
void ConvertYUV420YCbr32 ( YUV_ARGS_32BPP );
void ConvertYUV422YCbr32 ( YUV_ARGS_32BPP );
void ConvertYUV444YCbr32 ( YUV_ARGS_32BPP );
......@@ -436,30 +436,59 @@ static void SetYUV( vout_thread_t *p_vout )
/*
* Set functions pointers
*/
if( p_vout->b_grayscale )
if( p_vout->b_YCbr)
{
switch( p_vout->i_bytes_per_pixel)
{
case 1:
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420YCbr8;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422YCbr8;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444YCbr8;
break;
case 2:
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420YCbr16;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422YCbr16;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444YCbr16;
break;
case 3:
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420YCbr24;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422YCbr24;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444YCbr24;
break;
case 4:
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420YCbr32;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422YCbr32;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444YCbr32;
break;
}
}
else if( p_vout->b_grayscale )
{
/* Grayscale */
switch( p_vout->i_bytes_per_pixel )
{
case 1:
p_vout->yuv.p_Convert420 = (vout_yuv_convert_t *) ConvertY4Gray8;
p_vout->yuv.p_Convert422 = (vout_yuv_convert_t *) ConvertY4Gray8;
p_vout->yuv.p_Convert444 = (vout_yuv_convert_t *) ConvertY4Gray8;
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertY4Gray8;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertY4Gray8;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertY4Gray8;
break;
case 2:
p_vout->yuv.p_Convert420 = (vout_yuv_convert_t *) ConvertY4Gray16;
p_vout->yuv.p_Convert422 = (vout_yuv_convert_t *) ConvertY4Gray16;
p_vout->yuv.p_Convert444 = (vout_yuv_convert_t *) ConvertY4Gray16;
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertY4Gray16;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertY4Gray16;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertY4Gray16;
break;
case 3:
p_vout->yuv.p_Convert420 = (vout_yuv_convert_t *) ConvertY4Gray24;
p_vout->yuv.p_Convert422 = (vout_yuv_convert_t *) ConvertY4Gray24;
p_vout->yuv.p_Convert444 = (vout_yuv_convert_t *) ConvertY4Gray24;
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertY4Gray24;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertY4Gray24;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertY4Gray24;
break;
case 4:
p_vout->yuv.p_Convert420 = (vout_yuv_convert_t *) ConvertY4Gray32;
p_vout->yuv.p_Convert422 = (vout_yuv_convert_t *) ConvertY4Gray32;
p_vout->yuv.p_Convert444 = (vout_yuv_convert_t *) ConvertY4Gray32;
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertY4Gray32;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertY4Gray32;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertY4Gray32;
break;
}
}
......@@ -469,26 +498,27 @@ static void SetYUV( vout_thread_t *p_vout )
switch( p_vout->i_bytes_per_pixel )
{
case 1:
p_vout->yuv.p_Convert420 = (vout_yuv_convert_t *) ConvertYUV420RGB8;
p_vout->yuv.p_Convert422 = (vout_yuv_convert_t *) ConvertYUV422RGB8;
p_vout->yuv.p_Convert444 = (vout_yuv_convert_t *) ConvertYUV444RGB8;
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420RGB8;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422RGB8;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444RGB8;
break;
case 2:
p_vout->yuv.p_Convert420 = (vout_yuv_convert_t *) ConvertYUV420RGB16;
p_vout->yuv.p_Convert422 = (vout_yuv_convert_t *) ConvertYUV422RGB16;
p_vout->yuv.p_Convert444 = (vout_yuv_convert_t *) ConvertYUV444RGB16;
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420RGB16;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422RGB16;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444RGB16;
break;
case 3:
p_vout->yuv.p_Convert420 = (vout_yuv_convert_t *) ConvertYUV420RGB24;
p_vout->yuv.p_Convert422 = (vout_yuv_convert_t *) ConvertYUV422RGB24;
p_vout->yuv.p_Convert444 = (vout_yuv_convert_t *) ConvertYUV444RGB24;
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420RGB24;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422RGB24;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444RGB24;
break;
case 4:
p_vout->yuv.p_Convert420 = (vout_yuv_convert_t *) ConvertYUV420RGB32;
p_vout->yuv.p_Convert422 = (vout_yuv_convert_t *) ConvertYUV422RGB32;
p_vout->yuv.p_Convert444 = (vout_yuv_convert_t *) ConvertYUV444RGB32;
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420RGB32;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422RGB32;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444RGB32;
break;
}
}
}
}
......
......@@ -324,30 +324,59 @@ static void SetYUV( vout_thread_t *p_vout )
/*
* Set functions pointers
*/
if( p_vout->b_grayscale )
if( p_vout->b_YCbr)
{
switch( p_vout->i_bytes_per_pixel)
{
case 1:
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420YCbr8;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422YCbr8;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444YCbr8;
break;
case 2:
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420YCbr16;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422YCbr16;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444YCbr16;
break;
case 3:
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420YCbr24;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422YCbr24;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444YCbr24;
break;
case 4:
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420YCbr32;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422YCbr32;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444YCbr32;
break;
}
}
else if( p_vout->b_grayscale )
{
/* Grayscale */
switch( p_vout->i_bytes_per_pixel )
{
case 1:
p_vout->yuv.p_Convert420 = (vout_yuv_convert_t *) ConvertY4Gray8;
p_vout->yuv.p_Convert422 = (vout_yuv_convert_t *) ConvertY4Gray8;
p_vout->yuv.p_Convert444 = (vout_yuv_convert_t *) ConvertY4Gray8;
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertY4Gray8;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertY4Gray8;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertY4Gray8;
break;
case 2:
p_vout->yuv.p_Convert420 = (vout_yuv_convert_t *) ConvertY4Gray16;
p_vout->yuv.p_Convert422 = (vout_yuv_convert_t *) ConvertY4Gray16;
p_vout->yuv.p_Convert444 = (vout_yuv_convert_t *) ConvertY4Gray16;
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertY4Gray16;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertY4Gray16;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertY4Gray16;
break;
case 3:
p_vout->yuv.p_Convert420 = (vout_yuv_convert_t *) ConvertYUV420RGB24;
p_vout->yuv.p_Convert422 = (vout_yuv_convert_t *) ConvertY4Gray24;
p_vout->yuv.p_Convert444 = (vout_yuv_convert_t *) ConvertY4Gray24;
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420RGB24;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertY4Gray24;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertY4Gray24;
break;
case 4:
p_vout->yuv.p_Convert420 = (vout_yuv_convert_t *) ConvertYUV420RGB32;
p_vout->yuv.p_Convert422 = (vout_yuv_convert_t *) ConvertY4Gray32;
p_vout->yuv.p_Convert444 = (vout_yuv_convert_t *) ConvertY4Gray32;
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420RGB32;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertY4Gray32;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertY4Gray32;
break;
}
}
......@@ -357,24 +386,24 @@ static void SetYUV( vout_thread_t *p_vout )
switch( p_vout->i_bytes_per_pixel )
{
case 1:
p_vout->yuv.p_Convert420 = (vout_yuv_convert_t *) ConvertYUV420RGB8;
p_vout->yuv.p_Convert422 = (vout_yuv_convert_t *) ConvertYUV422RGB8;
p_vout->yuv.p_Convert444 = (vout_yuv_convert_t *) ConvertYUV444RGB8;
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420RGB8;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422RGB8;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444RGB8;
break;
case 2:
p_vout->yuv.p_Convert420 = (vout_yuv_convert_t *) ConvertYUV420RGB16;
p_vout->yuv.p_Convert422 = (vout_yuv_convert_t *) ConvertYUV422RGB16;
p_vout->yuv.p_Convert444 = (vout_yuv_convert_t *) ConvertYUV444RGB16;
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420RGB16;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422RGB16;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444RGB16;
break;
case 3:
p_vout->yuv.p_Convert420 = (vout_yuv_convert_t *) ConvertYUV420RGB24;
p_vout->yuv.p_Convert422 = (vout_yuv_convert_t *) ConvertYUV422RGB24;
p_vout->yuv.p_Convert444 = (vout_yuv_convert_t *) ConvertYUV444RGB24;
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420RGB24;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422RGB24;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444RGB24;
break;
case 4:
p_vout->yuv.p_Convert420 = (vout_yuv_convert_t *) ConvertYUV420RGB32;
p_vout->yuv.p_Convert422 = (vout_yuv_convert_t *) ConvertYUV422RGB32;
p_vout->yuv.p_Convert444 = (vout_yuv_convert_t *) ConvertYUV444RGB32;
p_vout->yuv.pf_yuv420 = (vout_yuv_convert_t *) ConvertYUV420RGB32;
p_vout->yuv.pf_yuv422 = (vout_yuv_convert_t *) ConvertYUV422RGB32;
p_vout->yuv.pf_yuv444 = (vout_yuv_convert_t *) ConvertYUV444RGB32;
break;
}
}
......
......@@ -3,8 +3,7 @@
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
*
* Authors:
* Jean-Marc Dressler
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -6,7 +6,7 @@
*****************************************************************************
* Copyright (C) 2000 VideoLAN
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Authors:
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -154,7 +154,8 @@ vout_thread_t * vout_CreateThread ( int *pi_status )
p_vout->i_bytes_per_pixel = 2;
p_vout->f_gamma = VOUT_GAMMA;
p_vout->b_need_render = 1;
p_vout->b_YCbr = 0;
p_vout->b_grayscale = main_GetIntVariable( VOUT_GRAYSCALE_VAR,
VOUT_GRAYSCALE_DEFAULT );
p_vout->b_info = 0;
......@@ -979,27 +980,14 @@ static void RunThread( vout_thread_t *p_vout)
p_subpic = NULL;
display_date = 0;
current_date = mdate();
#ifdef STATS
p_vout->c_loops++;
if( !(p_vout->c_loops % VOUT_STATS_NB_LOOPS) )
{
#ifdef STATS
intf_Msg("vout stats: picture heap: %d/%d",
p_vout->i_pictures, VOUT_MAX_PICTURES);
#endif
if( p_vout->b_info )
{
long i_fps = VOUT_FPS_SAMPLES * 1000000 * 10 /
( p_vout->p_fps_sample[ (p_vout->c_fps_samples - 1)
% VOUT_FPS_SAMPLES ] -
p_vout->p_fps_sample[ p_vout->c_fps_samples
% VOUT_FPS_SAMPLES ] );
intf_Msg( "vout stats: %li.%i fps",
i_fps / 10, (int)i_fps % 10 );
}
}
#endif
/*
* Find the picture to display - this operation does not need lock,
......@@ -1487,7 +1475,7 @@ static void SetBufferArea( vout_thread_t *p_vout, int i_x, int i_y, int i_w, int
if( i_area_copy != i_area )
{
/* Merge with last possible areas */
p_buffer->pi_area_end[i_area] = MAX( i_h, p_buffer->pi_area_end[i_area_copy] );
//p_buffer->pi_area_end[i_area] = MAX( i_h, p_buffer->pi_area_end[i_area_copy] );
/* Shift lower areas upward */
i_area_shift = i_area_copy - i_area;
......@@ -1699,28 +1687,28 @@ static void RenderPicture( vout_thread_t *p_vout, picture_t *p_pic )
switch( p_pic->i_type )
{
case YUV_420_PICTURE:
p_vout->yuv.p_Convert420( p_vout, p_pic_data,
p_pic->p_y, p_pic->p_u, p_pic->p_v,
p_pic->i_width, p_pic->i_height,
p_buffer->i_pic_width, p_buffer->i_pic_height,
p_vout->i_bytes_per_line / p_vout->i_bytes_per_pixel,
p_pic->i_matrix_coefficients );
p_vout->yuv.pf_yuv420( p_vout, p_pic_data,
p_pic->p_y, p_pic->p_u, p_pic->p_v,
p_pic->i_width, p_pic->i_height,
p_buffer->i_pic_width, p_buffer->i_pic_height,
p_vout->i_bytes_per_line / p_vout->i_bytes_per_pixel,
p_pic->i_matrix_coefficients );
break;
case YUV_422_PICTURE:
p_vout->yuv.p_Convert422( p_vout, p_pic_data,
p_pic->p_y, p_pic->p_u, p_pic->p_v,
p_pic->i_width, p_pic->i_height,
p_buffer->i_pic_width, p_buffer->i_pic_height,
p_vout->i_bytes_per_line / p_vout->i_bytes_per_pixel,
p_pic->i_matrix_coefficients );
p_vout->yuv.pf_yuv422( p_vout, p_pic_data,
p_pic->p_y, p_pic->p_u, p_pic->p_v,
p_pic->i_width, p_pic->i_height,
p_buffer->i_pic_width, p_buffer->i_pic_height,
p_vout->i_bytes_per_line / p_vout->i_bytes_per_pixel,
p_pic->i_matrix_coefficients );
break;
case YUV_444_PICTURE:
p_vout->yuv.p_Convert444( p_vout, p_pic_data,
p_pic->p_y, p_pic->p_u, p_pic->p_v,
p_pic->i_width, p_pic->i_height,
p_buffer->i_pic_width, p_buffer->i_pic_height,
p_vout->i_bytes_per_line / p_vout->i_bytes_per_pixel,
p_pic->i_matrix_coefficients );
p_vout->yuv.pf_yuv444( p_vout, p_pic_data,
p_pic->p_y, p_pic->p_u, p_pic->p_v,
p_pic->i_width, p_pic->i_height,
p_buffer->i_pic_width, p_buffer->i_pic_height,
p_vout->i_bytes_per_line / p_vout->i_bytes_per_pixel,
p_pic->i_matrix_coefficients );
break;
#ifdef DEBUG
default:
......
......@@ -33,6 +33,10 @@
#include <fcntl.h> /* open() */
#include <unistd.h> /* read(), close() */
#ifdef SYS_BEOS
#include "beos_specific.h"
#endif
#include "config.h"
#include "common.h"
#include "video_text.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment