Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
16e7b189
Commit
16e7b189
authored
Nov 13, 2013
by
Kostya Shishkov
Committed by
Diego Biurrun
Nov 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpegvideo: Fix swapping of UV planes for VCR2
parent
69d4dbfd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
mpegvideo.c
libavcodec/mpegvideo.c
+13
-0
No files found.
libavcodec/mpegvideo.c
View file @
16e7b189
...
@@ -518,6 +518,15 @@ fail:
...
@@ -518,6 +518,15 @@ fail:
return
ret
;
return
ret
;
}
}
static
void
exchange_uv
(
MpegEncContext
*
s
)
{
int16_t
(
*
tmp
)[
64
];
tmp
=
s
->
pblocks
[
4
];
s
->
pblocks
[
4
]
=
s
->
pblocks
[
5
];
s
->
pblocks
[
5
]
=
tmp
;
}
static
int
init_duplicate_context
(
MpegEncContext
*
s
)
static
int
init_duplicate_context
(
MpegEncContext
*
s
)
{
{
int
y_size
=
s
->
b8_stride
*
(
2
*
s
->
mb_height
+
1
);
int
y_size
=
s
->
b8_stride
*
(
2
*
s
->
mb_height
+
1
);
...
@@ -548,6 +557,8 @@ static int init_duplicate_context(MpegEncContext *s)
...
@@ -548,6 +557,8 @@ static int init_duplicate_context(MpegEncContext *s)
for
(
i
=
0
;
i
<
12
;
i
++
)
{
for
(
i
=
0
;
i
<
12
;
i
++
)
{
s
->
pblocks
[
i
]
=
&
s
->
block
[
i
];
s
->
pblocks
[
i
]
=
&
s
->
block
[
i
];
}
}
if
(
s
->
avctx
->
codec_tag
==
AV_RL32
(
"VCR2"
))
exchange_uv
(
s
);
if
(
s
->
out_format
==
FMT_H263
)
{
if
(
s
->
out_format
==
FMT_H263
)
{
/* ac values */
/* ac values */
...
@@ -622,6 +633,8 @@ int ff_update_duplicate_context(MpegEncContext *dst, MpegEncContext *src)
...
@@ -622,6 +633,8 @@ int ff_update_duplicate_context(MpegEncContext *dst, MpegEncContext *src)
for
(
i
=
0
;
i
<
12
;
i
++
)
{
for
(
i
=
0
;
i
<
12
;
i
++
)
{
dst
->
pblocks
[
i
]
=
&
dst
->
block
[
i
];
dst
->
pblocks
[
i
]
=
&
dst
->
block
[
i
];
}
}
if
(
dst
->
avctx
->
codec_tag
==
AV_RL32
(
"VCR2"
))
exchange_uv
(
dst
);
if
(
!
dst
->
edge_emu_buffer
&&
if
(
!
dst
->
edge_emu_buffer
&&
(
ret
=
ff_mpv_frame_size_alloc
(
dst
,
dst
->
linesize
))
<
0
)
{
(
ret
=
ff_mpv_frame_size_alloc
(
dst
,
dst
->
linesize
))
<
0
)
{
av_log
(
dst
->
avctx
,
AV_LOG_ERROR
,
"failed to allocate context "
av_log
(
dst
->
avctx
,
AV_LOG_ERROR
,
"failed to allocate context "
...
...
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