Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
98484c4b
Commit
98484c4b
authored
Oct 25, 2000
by
Jean-Philippe Grimaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout_glide.c: donne une taille correcte a l'affichage (800x600)
yuvmmx: conv. Y4Gray16, les autres sont a venir
parent
d102c574
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
105 additions
and
6 deletions
+105
-6
plugins/glide/vout_glide.c
plugins/glide/vout_glide.c
+3
-3
plugins/yuvmmx/video_yuv.c
plugins/yuvmmx/video_yuv.c
+2
-2
plugins/yuvmmx/video_yuv16.c
plugins/yuvmmx/video_yuv16.c
+51
-1
plugins/yuvmmx/video_yuv_asm.h
plugins/yuvmmx/video_yuv_asm.h
+49
-0
No files found.
plugins/glide/vout_glide.c
View file @
98484c4b
...
...
@@ -46,8 +46,8 @@
#include "intf_msg.h"
#include "main.h"
#define WIDTH
64
0
#define HEIGHT
48
0
#define WIDTH
80
0
#define HEIGHT
60
0
#define BITS_PER_PLANE 16
#define BYTES_PER_PIXEL 2
...
...
@@ -168,7 +168,7 @@ static int GlideOpenDisplay( vout_thread_t *p_vout )
{
static
char
version
[
80
];
GrHwConfiguration
hwconfig
;
GrScreenResolution_t
resolution
=
GR_RESOLUTION_
640x48
0
;
GrScreenResolution_t
resolution
=
GR_RESOLUTION_
800x60
0
;
GrLfbInfo_t
p_front_buffer_info
;
/* front buffer info */
p_vout
->
i_width
=
WIDTH
;
...
...
plugins/yuvmmx/video_yuv.c
View file @
98484c4b
...
...
@@ -296,12 +296,12 @@ void SetYUV( vout_thread_t *p_vout )
p_vout
->
yuv
.
p_Convert444
=
(
vout_yuv_convert_t
*
)
ConvertY4Gray16
;
break
;
case
3
:
p_vout
->
yuv
.
p_Convert420
=
(
vout_yuv_convert_t
*
)
ConvertY
4Gray
24
;
p_vout
->
yuv
.
p_Convert420
=
(
vout_yuv_convert_t
*
)
ConvertY
UV420RGB
24
;
p_vout
->
yuv
.
p_Convert422
=
(
vout_yuv_convert_t
*
)
ConvertY4Gray24
;
p_vout
->
yuv
.
p_Convert444
=
(
vout_yuv_convert_t
*
)
ConvertY4Gray24
;
break
;
case
4
:
p_vout
->
yuv
.
p_Convert420
=
(
vout_yuv_convert_t
*
)
ConvertY
4Gray
32
;
p_vout
->
yuv
.
p_Convert420
=
(
vout_yuv_convert_t
*
)
ConvertY
UV420RGB
32
;
p_vout
->
yuv
.
p_Convert422
=
(
vout_yuv_convert_t
*
)
ConvertY4Gray32
;
p_vout
->
yuv
.
p_Convert444
=
(
vout_yuv_convert_t
*
)
ConvertY4Gray32
;
break
;
...
...
plugins/yuvmmx/video_yuv16.c
View file @
98484c4b
...
...
@@ -52,7 +52,57 @@
*****************************************************************************/
void
ConvertY4Gray16
(
YUV_ARGS_16BPP
)
{
intf_ErrMsg
(
"yuvmmx error: unhandled function, grayscale, bpp = 16
\n
"
);
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 */
/*
* Initialize some values - i_pic_line_width will store the line skip
*/
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
);
/*
* 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
;
for
(
i_x
=
i_width
/
8
;
i_x
--
;
)
{
__asm__
(
MMX_INIT_16_GRAY
:
:
"r"
(
p_y
),
"r"
(
p_u
),
"r"
(
p_v
),
"r"
(
p_buffer
)
);
__asm__
(
".align 8"
MMX_YUV_GRAY
MMX_UNPACK_16_GRAY
:
:
"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
);
}
}
/*****************************************************************************
...
...
plugins/yuvmmx/video_yuv_asm.h
View file @
98484c4b
...
...
@@ -51,6 +51,12 @@ movq (%0), %%mm6 # Load 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\
#movl $0, (%3) # cache preload for image \n\
"
#define MMX_INIT_16_GRAY " \n\
\n\
movq (%0), %%mm6 # Load 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 \n\
#movl $0, (%3) # cache preload for image \n\
"
#define MMX_INIT_32 " \n\
\n\
movd (%1), %%mm0 # Load 4 Cb 00 00 00 00 u3 u2 u1 u0 \n\
...
...
@@ -133,6 +139,49 @@ punpcklbw %%mm4, %%mm1 # R7 R6 R5 R4 R3 R2 R1 R0 \n\
punpcklbw %%mm5, %%mm2 # G7 G6 G5 G4 G3 G2 G1 G0 \n\
"
/*
* Grayscale case, only use Y
*/
#define MMX_YUV_GRAY " \n\
\n\
# convert the luma part \n\
psubusb mmx_10w, %%mm6 \n\
movq %%mm6, %%mm7 \n\
pand mmx_00ffw, %%mm6 \n\
psrlw $8, %%mm7 \n\
psllw $3, %%mm6 \n\
psllw $3, %%mm7 \n\
pmulhw mmx_Y_coeff, %%mm6 \n\
pmulhw mmx_Y_coeff, %%mm7 \n\
packuswb %%mm6, %%mm6 \n\
packuswb %%mm7, %%mm7 \n\
punpcklbw %%mm7, %%mm6 \n\
"
#define MMX_UNPACK_16_GRAY " \n\
movq %%mm6, %%mm5 \n\
pand mmx_redmask, %%mm6 \n\
pand mmx_grnmask, %%mm5 \n\
movq %%mm6, %%mm7 \n\
psrlw mmx_blueshift, %%mm7 \n\
pxor %%mm3, %%mm3 \n\
movq %%mm7, %%mm2 \n\
movq %%mm5, %%mm0 \n\
punpcklbw %%mm3, %%mm5 \n\
punpcklbw %%mm6, %%mm7 \n\
psllw mmx_blueshift, %%mm5 \n\
por %%mm5, %%mm7 \n\
movq %%mm7, (%3) \n\
punpckhbw %%mm3, %%mm0 \n\
punpckhbw %%mm6, %%mm2 \n\
psllw mmx_blueshift, %%mm0 \n\
movq 8(%0), %%mm6 \n\
por %%mm0, %%mm2 \n\
movq %%mm2, 8(%3) \n\
"
/*
* convert RGB plane to RGB 16 bits,
* mm0 -> B, mm1 -> R, mm2 -> G,
...
...
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