Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
7c6d2406
Commit
7c6d2406
authored
May 14, 2012
by
Mans Rullgard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mtv: do not byteswap raw video in demuxer
Signed-off-by:
Mans Rullgard
<
mans@mansr.com
>
parent
31f2c023
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
15 deletions
+1
-15
mtv.c
libavformat/mtv.c
+1
-15
mtv
tests/ref/fate/mtv
+0
-0
No files found.
libavformat/mtv.c
View file @
7c6d2406
...
...
@@ -130,7 +130,7 @@ static int mtv_read_header(AVFormatContext *s)
avpriv_set_pts_info
(
st
,
64
,
1
,
mtv
->
video_fps
);
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_VIDEO
;
st
->
codec
->
codec_id
=
CODEC_ID_RAWVIDEO
;
st
->
codec
->
pix_fmt
=
PIX_FMT_RGB565
;
st
->
codec
->
pix_fmt
=
PIX_FMT_RGB565
BE
;
st
->
codec
->
width
=
mtv
->
img_width
;
st
->
codec
->
height
=
mtv
->
img_height
;
st
->
codec
->
sample_rate
=
mtv
->
video_fps
;
...
...
@@ -163,9 +163,6 @@ static int mtv_read_packet(AVFormatContext *s, AVPacket *pkt)
MTVDemuxContext
*
mtv
=
s
->
priv_data
;
AVIOContext
*
pb
=
s
->
pb
;
int
ret
;
#if !HAVE_BIGENDIAN
int
i
;
#endif
if
((
avio_tell
(
pb
)
-
s
->
data_offset
+
mtv
->
img_segment_size
)
%
mtv
->
full_segment_size
)
{
...
...
@@ -184,17 +181,6 @@ static int mtv_read_packet(AVFormatContext *s, AVPacket *pkt)
if
(
ret
<
0
)
return
ret
;
#if !HAVE_BIGENDIAN
/* pkt->data is GGGRRRR BBBBBGGG
* and we need RRRRRGGG GGGBBBBB
* for PIX_FMT_RGB565 so here we
* just swap bytes as they come
*/
for
(
i
=
0
;
i
<
mtv
->
img_segment_size
/
2
;
i
++
)
*
((
uint16_t
*
)
pkt
->
data
+
i
)
=
av_bswap16
(
*
((
uint16_t
*
)
pkt
->
data
+
i
));
#endif
pkt
->
stream_index
=
0
;
}
...
...
tests/ref/fate/mtv
View file @
7c6d2406
This diff is collapsed.
Click to expand it.
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