Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
cc44598d
Commit
cc44598d
authored
Jan 18, 2000
by
Vincent Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
YUV MMX, avec aspect ratio !!!
parent
db6d4f7d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
34 deletions
+60
-34
Makefile
Makefile
+1
-1
include/video_yuv.h
include/video_yuv.h
+22
-0
src/video_output/video_yuv.c
src/video_output/video_yuv.c
+34
-30
src/video_output/video_yuv_mmx.S
src/video_output/video_yuv_mmx.S
+3
-3
No files found.
Makefile
View file @
cc44598d
...
@@ -22,7 +22,7 @@ VIDEO=X11
...
@@ -22,7 +22,7 @@ VIDEO=X11
# Target architecture and optimization
# Target architecture and optimization
#ARCH=
#ARCH=
#
ARCH=MMX
ARCH
=
MMX
#ARCH=PPC
#ARCH=PPC
# Decoder choice - ?? old decoder will be removed soon
# Decoder choice - ?? old decoder will be removed soon
...
...
include/video_yuv.h
View file @
cc44598d
...
@@ -13,3 +13,25 @@ int vout_InitTables ( vout_thread_t *p_vout );
...
@@ -13,3 +13,25 @@ int vout_InitTables ( vout_thread_t *p_vout );
int
vout_ResetTables
(
vout_thread_t
*
p_vout
);
int
vout_ResetTables
(
vout_thread_t
*
p_vout
);
void
vout_EndTables
(
vout_thread_t
*
p_vout
);
void
vout_EndTables
(
vout_thread_t
*
p_vout
);
/*******************************************************************************
* External prototypes
*******************************************************************************/
#ifdef HAVE_MMX
/* YUV transformations for MMX - in video_yuv_mmx.S
* p_y, p_u, p_v: Y U and V planes
* i_width, i_height: frames dimensions (pixels)
* i_ypitch, i_vpitch: Y and V lines sizes (bytes)
* i_aspect: vertical aspect factor
* p_pic: RGB frame
* i_dci_offset: ?? x offset for left image border
* i_offset_to_line_0: ?? x offset for left image border
* i_pitch: RGB line size (bytes)
* i_colortype: 0 for 565, 1 for 555 */
void
ConvertYUV420RGB16MMX
(
u8
*
p_y
,
u8
*
p_u
,
u8
*
p_v
,
unsigned
int
i_width
,
unsigned
int
i_height
,
unsigned
int
i_ypitch
,
unsigned
int
i_vpitch
,
unsigned
int
i_aspect
,
u8
*
p_pic
,
u32
i_dci_offset
,
u32
i_offset_to_line_0
,
int
CCOPitch
,
int
i_colortype
);
#endif
src/video_output/video_yuv.c
View file @
cc44598d
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include "vlc_thread.h"
#include "vlc_thread.h"
#include "video.h"
#include "video.h"
#include "video_output.h"
#include "video_output.h"
#include "video_yuv.h"
#include "intf_msg.h"
#include "intf_msg.h"
/*******************************************************************************
/*******************************************************************************
...
@@ -276,8 +277,26 @@ int vout_InitTables( vout_thread_t *p_vout )
...
@@ -276,8 +277,26 @@ int vout_InitTables( vout_thread_t *p_vout )
size_t
tables_size
;
/* tables size, in bytes */
size_t
tables_size
;
/* tables size, in bytes */
/* Computes tables size */
/* Computes tables size */
//??
switch
(
p_vout
->
i_screen_depth
)
tables_size
=
4
*
4
*
1024
;
{
case
15
:
case
16
:
tables_size
=
sizeof
(
u16
)
*
1024
*
(
p_vout
->
b_grayscale
?
1
:
3
);
break
;
case
24
:
case
32
:
#ifndef DEBUG
default:
#endif
tables_size
=
sizeof
(
u32
)
*
1024
*
(
p_vout
->
b_grayscale
?
1
:
3
);
break
;
#ifdef DEBUG
default:
intf_DbgMsg
(
"error: invalid screen depth %d
\n
"
,
p_vout
->
i_screen_depth
);
tables_size
=
0
;
break
;
#endif
}
/* Allocate memory */
/* Allocate memory */
p_vout
->
tables
.
p_base
=
malloc
(
tables_size
);
p_vout
->
tables
.
p_base
=
malloc
(
tables_size
);
...
@@ -300,7 +319,7 @@ int vout_InitTables( vout_thread_t *p_vout )
...
@@ -300,7 +319,7 @@ int vout_InitTables( vout_thread_t *p_vout )
*******************************************************************************/
*******************************************************************************/
int
vout_ResetTables
(
vout_thread_t
*
p_vout
)
int
vout_ResetTables
(
vout_thread_t
*
p_vout
)
{
{
// ?? realloc
?
// ?? realloc
if b_grayscale or i_screen_depth changed
SetTables
(
p_vout
);
SetTables
(
p_vout
);
return
(
0
);
return
(
0
);
}
}
...
@@ -597,6 +616,17 @@ static void ConvertYUV420RGB16( p_vout_thread_t p_vout, u16 *p_pic,
...
@@ -597,6 +616,17 @@ static void ConvertYUV420RGB16( p_vout_thread_t p_vout, u16 *p_pic,
int
i_width
,
int
i_height
,
int
i_eol
,
int
i_pic_eol
,
int
i_width
,
int
i_height
,
int
i_eol
,
int
i_pic_eol
,
int
i_scale
,
int
i_matrix_coefficients
)
int
i_scale
,
int
i_matrix_coefficients
)
{
{
#ifdef HAVE_MMX
int
i_chroma_width
,
i_chroma_eol
;
/* width and eol for chroma */
i_chroma_width
=
i_width
/
2
;
i_chroma_eol
=
i_eol
/
2
;
ConvertYUV420RGB16MMX
(
p_y
,
p_u
,
p_v
,
i_width
,
i_height
,
(
i_width
+
i_eol
)
*
sizeof
(
yuv_data_t
),
(
i_chroma_width
+
i_chroma_eol
)
*
sizeof
(
yuv_data_t
),
i_scale
,
(
u8
*
)
p_pic
,
0
,
0
,
(
i_width
+
i_pic_eol
)
*
sizeof
(
u16
),
p_vout
->
i_screen_depth
==
15
);
#else
u16
*
p_pic_src
;
/* source pointer in case of copy */
u16
*
p_pic_src
;
/* source pointer in case of copy */
u16
*
p_red
;
/* red table */
u16
*
p_red
;
/* red table */
u16
*
p_green
;
/* green table */
u16
*
p_green
;
/* green table */
...
@@ -616,6 +646,7 @@ static void ConvertYUV420RGB16( p_vout_thread_t p_vout, u16 *p_pic,
...
@@ -616,6 +646,7 @@ static void ConvertYUV420RGB16( p_vout_thread_t p_vout, u16 *p_pic,
i_chroma_width
=
i_width
/
2
;
i_chroma_width
=
i_width
/
2
;
i_chroma_eol
=
i_eol
/
2
;
i_chroma_eol
=
i_eol
/
2
;
CONVERT_YUV_RGB
(
420
)
CONVERT_YUV_RGB
(
420
)
#endif
}
}
/*******************************************************************************
/*******************************************************************************
...
@@ -823,35 +854,8 @@ static void Scale32( p_vout_thread_t p_vout, void *p_pic, void *p_buffer,
...
@@ -823,35 +854,8 @@ static void Scale32( p_vout_thread_t p_vout, void *p_pic, void *p_buffer,
//???
//???
}
}
//-------------------------
/*******************************************************************************
* External prototypes
*******************************************************************************/
#ifdef HAVE_MMX
/* YUV transformations for MMX - in video_yuv_mmx.S
* p_y, p_u, p_v: Y U and V planes
* i_width, i_height: frames dimensions (pixels)
* i_ypitch, i_vpitch: Y and V lines sizes (bytes)
* i_aspect: vertical aspect factor
* p_pic: RGB frame
* i_dci_offset: ?? x offset for left image border
* i_offset_to_line_0: ?? x offset for left image border
* i_pitch: RGB line size (bytes)
* i_colortype: 0 for 565, 1 for 555 */
static
YUV420_16_MMX
(
u8
*
p_y
,
u8
*
p_u
,
u8
*
p_v
,
unsigned
int
i_width
,
unsigned
int
i_height
,
unsigned
int
i_ypitch
,
unsigned
int
i_vpitch
,
unsigned
int
i_aspect
,
u8
*
p_pic
,
u32
i_dci_offset
,
u32
i_offset_to_line_0
,
int
CCOPitch
,
int
i_colortype
);
#endif
//-------------------- walken code follow --------------------------------
//-------------------- walken code follow --------------------------------
/*
/*
* YUV to RGB routines.
* YUV to RGB routines.
*
*
...
...
src/video_output/video_yuv_mmx.S
View file @
cc44598d
...
@@ -90,7 +90,7 @@ sixbitu: .quad 0xc0c0c0c0c0c0c0c0
...
@@ -90,7 +90,7 @@ sixbitu: .quad 0xc0c0c0c0c0c0c0c0
#define BUpperLimit 148
#define BUpperLimit 148
/*
/*
*
extern
void
C
vout_YUV420_16_
MMX
(
*
extern
void
C
ConvertYUV420RGB16
MMX
(
*
U8
*
YPlane
,
*
U8
*
YPlane
,
*
U8
*
UPlane
,
*
U8
*
UPlane
,
*
U8
*
VPlane
,
*
U8
*
VPlane
,
...
@@ -116,8 +116,8 @@ sixbitu: .quad 0xc0c0c0c0c0c0c0c0
...
@@ -116,8 +116,8 @@ sixbitu: .quad 0xc0c0c0c0c0c0c0c0
*
RGB655
=
3
*
RGB655
=
3
*/
*/
.
globl
vout_YUV420_16_
MMX
.
globl
ConvertYUV420RGB16
MMX
vout_YUV420_16_
MMX
:
ConvertYUV420RGB16
MMX
:
pushl
%
esi
pushl
%
esi
pushl
%
edi
pushl
%
edi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment