Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
62977ca4
Commit
62977ca4
authored
Mar 05, 2008
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix BGR <-> RGB endianess problem with PNG's loading/converting/copying on big-endian machines.
parent
5b2c2711
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
modules/codec/ffmpeg/ffmpeg.c
modules/codec/ffmpeg/ffmpeg.c
+2
-0
modules/codec/ffmpeg/video.c
modules/codec/ffmpeg/video.c
+18
-1
No files found.
modules/codec/ffmpeg/ffmpeg.c
View file @
62977ca4
...
...
@@ -493,10 +493,12 @@ static struct
/* Packed RGB formats */
#if defined(WORDS_BIGENDIAN)
{
VLC_FOURCC
(
'R'
,
'G'
,
'B'
,
'8'
),
PIX_FMT_BGR8
},
{
VLC_FOURCC
(
'R'
,
'V'
,
'1'
,
'5'
),
PIX_FMT_BGR555
},
{
VLC_FOURCC
(
'R'
,
'V'
,
'1'
,
'6'
),
PIX_FMT_BGR565
},
{
VLC_FOURCC
(
'R'
,
'V'
,
'2'
,
'4'
),
PIX_FMT_BGR24
},
#else
{
VLC_FOURCC
(
'R'
,
'G'
,
'B'
,
'8'
),
PIX_FMT_RGB8
},
{
VLC_FOURCC
(
'R'
,
'V'
,
'1'
,
'5'
),
PIX_FMT_RGB555
},
{
VLC_FOURCC
(
'R'
,
'V'
,
'1'
,
'6'
),
PIX_FMT_RGB565
},
{
VLC_FOURCC
(
'R'
,
'V'
,
'2'
,
'4'
),
PIX_FMT_RGB24
},
...
...
modules/codec/ffmpeg/video.c
View file @
62977ca4
...
...
@@ -124,12 +124,25 @@ static uint32_t ffmpeg_PixFmtToChroma( int i_ff_chroma )
case
PIX_FMT_YUV422
:
return
VLC_FOURCC
(
'Y'
,
'U'
,
'Y'
,
'2'
);
#if defined(WORDS_BIGENDIAN)
case
PIX_FMT_BGR8
:
return
VLC_FOURCC
(
'R'
,
'G'
,
'B'
,
'8'
);
case
PIX_FMT_BGR555
:
return
VLC_FOURCC
(
'R'
,
'V'
,
'1'
,
'5'
);
case
PIX_FMT_BGR565
:
return
VLC_FOURCC
(
'R'
,
'V'
,
'1'
,
'6'
);
case
PIX_FMT_BGR24
:
return
VLC_FOURCC
(
'R'
,
'V'
,
'2'
,
'4'
);
#else
case
PIX_FMT_RGB8
:
return
VLC_FOURCC
(
'R'
,
'G'
,
'B'
,
'8'
);
case
PIX_FMT_RGB555
:
return
VLC_FOURCC
(
'R'
,
'V'
,
'1'
,
'5'
);
case
PIX_FMT_RGB565
:
return
VLC_FOURCC
(
'R'
,
'V'
,
'1'
,
'6'
);
case
PIX_FMT_RGB24
:
return
VLC_FOURCC
(
'R'
,
'V'
,
'2'
,
'4'
);
#endif
case
PIX_FMT_RGBA32
:
return
VLC_FOURCC
(
'R'
,
'V'
,
'3'
,
'2'
);
#ifdef PIX_FMT_RGBA
...
...
@@ -141,7 +154,6 @@ static uint32_t ffmpeg_PixFmtToChroma( int i_ff_chroma )
case
PIX_FMT_YUV410P
:
case
PIX_FMT_YUV411P
:
case
PIX_FMT_BGR24
:
default:
return
0
;
}
...
...
@@ -838,7 +850,12 @@ static void ffmpeg_CopyPicture( decoder_t *p_dec,
{
case
PIX_FMT_YUV410P
:
case
PIX_FMT_YUV411P
:
case
PIX_FMT_RGB32
:
case
PIX_FMT_RGB24
:
case
PIX_FMT_RGB8
:
case
PIX_FMT_BGR32
:
case
PIX_FMT_BGR24
:
case
PIX_FMT_BGR8
:
case
PIX_FMT_PAL8
:
for
(
i
=
0
;
i
<
p_pic
->
i_planes
;
i
++
)
{
...
...
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