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
ff862be5
Commit
ff862be5
authored
Jul 26, 2003
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ati vcr2 uv swap
Originally committed as revision 2084 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
0c938bd1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
mpeg12.c
libavcodec/mpeg12.c
+16
-0
No files found.
libavcodec/mpeg12.c
View file @
ff862be5
...
...
@@ -1791,6 +1791,12 @@ static void mpeg_decode_extension(AVCodecContext *avctx,
}
}
static
void
exchange_uv
(
AVFrame
*
f
){
uint8_t
*
t
=
f
->
data
[
1
];
f
->
data
[
1
]
=
f
->
data
[
2
];
f
->
data
[
2
]
=
t
;
}
#define DECODE_SLICE_FATAL_ERROR -2
#define DECODE_SLICE_ERROR -1
#define DECODE_SLICE_OK 0
...
...
@@ -1945,8 +1951,14 @@ static int mpeg_decode_slice(AVCodecContext *avctx,
MPV_decode_mb
(
s
,
s
->
block
);
if
(
++
s
->
mb_x
>=
s
->
mb_width
)
{
if
(
s
->
avctx
->
codec_tag
==
ff_get_fourcc
(
"VCR2"
))
exchange_uv
((
AVFrame
*
)
s
->
current_picture_ptr
);
ff_draw_horiz_band
(
s
,
16
*
s
->
mb_y
,
16
);
if
(
s
->
avctx
->
codec_tag
==
ff_get_fourcc
(
"VCR2"
))
exchange_uv
((
AVFrame
*
)
s
->
current_picture_ptr
);
s
->
mb_x
=
0
;
s
->
mb_y
++
;
...
...
@@ -2033,6 +2045,9 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict)
ff_print_debug_info
(
s
,
s
->
last_picture_ptr
);
}
}
if
(
s
->
avctx
->
codec_tag
==
ff_get_fourcc
(
"VCR2"
))
exchange_uv
(
pict
);
return
1
;
}
else
{
return
0
;
...
...
@@ -2164,6 +2179,7 @@ static int vcr2_init_sequence(AVCodecContext *avctx)
s
->
width
=
avctx
->
width
;
s
->
height
=
avctx
->
height
;
avctx
->
has_b_frames
=
0
;
//true?
s
->
low_delay
=
1
;
s
->
avctx
=
avctx
;
if
(
MPV_common_init
(
s
)
<
0
)
...
...
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