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
f75baa6c
Commit
f75baa6c
authored
Aug 25, 2014
by
Christophe Gisquet
Committed by
Michael Niedermayer
Aug 25, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huffyuvdec: decode the last odd sample
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
6ee76817
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
8 deletions
+26
-8
huffyuvdec.c
libavcodec/huffyuvdec.c
+22
-4
vsynth3-ffvhuff420p12
tests/ref/vsynth/vsynth3-ffvhuff420p12
+2
-2
vsynth3-ffvhuff422p10left
tests/ref/vsynth/vsynth3-ffvhuff422p10left
+2
-2
No files found.
libavcodec/huffyuvdec.c
View file @
f75baa6c
...
...
@@ -660,11 +660,9 @@ static void decode_422_bitstream(HYuvContext *s, int count)
dst1 = get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)<<2;\
dst1 += get_bits(&s->gb, 2);\
}
static
void
decode_plane_bitstream
(
HYuvContext
*
s
,
int
count
,
int
plane
)
static
void
decode_plane_bitstream
(
HYuvContext
*
s
,
int
width
,
int
plane
)
{
int
i
;
count
/=
2
;
int
i
,
count
=
width
/
2
;
if
(
s
->
bps
<=
8
)
{
OPEN_READER
(
re
,
&
s
->
gb
);
...
...
@@ -677,6 +675,14 @@ static void decode_plane_bitstream(HYuvContext *s, int count, int plane)
READ_2PIX_PLANE
(
s
->
temp
[
0
][
2
*
i
],
s
->
temp
[
0
][
2
*
i
+
1
],
plane
,
OP8bits
);
}
}
if
(
width
&
1
&&
BITS_LEFT
(
re
,
&
s
->
gb
)
>
0
)
{
unsigned
int
index
;
int
nb_bits
,
code
,
n
;
UPDATE_CACHE
(
re
,
&
s
->
gb
);
index
=
SHOW_UBITS
(
re
,
&
s
->
gb
,
VLC_BITS
);
VLC_INTERN
(
s
->
temp
[
0
][
width
-
1
],
s
->
vlc
[
plane
].
table
,
&
s
->
gb
,
re
,
VLC_BITS
,
3
);
}
CLOSE_READER
(
re
,
&
s
->
gb
);
}
else
if
(
s
->
bps
<=
14
)
{
OPEN_READER
(
re
,
&
s
->
gb
);
...
...
@@ -689,6 +695,14 @@ static void decode_plane_bitstream(HYuvContext *s, int count, int plane)
READ_2PIX_PLANE
(
s
->
temp16
[
0
][
2
*
i
],
s
->
temp16
[
0
][
2
*
i
+
1
],
plane
,
OP14bits
);
}
}
if
(
width
&
1
&&
BITS_LEFT
(
re
,
&
s
->
gb
)
>
0
)
{
unsigned
int
index
;
int
nb_bits
,
code
,
n
;
UPDATE_CACHE
(
re
,
&
s
->
gb
);
index
=
SHOW_UBITS
(
re
,
&
s
->
gb
,
VLC_BITS
);
VLC_INTERN
(
s
->
temp16
[
0
][
width
-
1
],
s
->
vlc
[
plane
].
table
,
&
s
->
gb
,
re
,
VLC_BITS
,
3
);
}
CLOSE_READER
(
re
,
&
s
->
gb
);
}
else
{
if
(
count
>=
(
get_bits_left
(
&
s
->
gb
))
/
(
32
*
2
))
{
...
...
@@ -700,6 +714,10 @@ static void decode_plane_bitstream(HYuvContext *s, int count, int plane)
READ_2PIX_PLANE16
(
s
->
temp16
[
0
][
2
*
i
],
s
->
temp16
[
0
][
2
*
i
+
1
],
plane
);
}
}
if
(
width
&
1
&&
get_bits_left
(
&
s
->
gb
)
>
0
)
{
int
dst
=
get_vlc2
(
&
s
->
gb
,
s
->
vlc
[
plane
].
table
,
VLC_BITS
,
3
)
<<
2
;
s
->
temp16
[
0
][
width
-
1
]
=
dst
+
get_bits
(
&
s
->
gb
,
2
);
}
}
}
...
...
tests/ref/vsynth/vsynth3-ffvhuff420p12
View file @
f75baa6c
9b3e44ccdd28614f588804a0682db312 *tests/data/fate/vsynth3-ffvhuff420p12.avi
175256 tests/data/fate/vsynth3-ffvhuff420p12.avi
faf8b5ec29b12ac41b1bd1a6ebd8a757
*tests/data/fate/vsynth3-ffvhuff420p12.out.rawvideo
stddev:
47.95 PSNR: 14.51 MAXDIFF: 237
bytes: 86700/ 86700
ee95a44ccd612b5057860b43fe9775d6
*tests/data/fate/vsynth3-ffvhuff420p12.out.rawvideo
stddev:
0.69 PSNR: 51.35 MAXDIFF: 1
bytes: 86700/ 86700
tests/ref/vsynth/vsynth3-ffvhuff422p10left
View file @
f75baa6c
5afec2536440c892919a1569c7109858 *tests/data/fate/vsynth3-ffvhuff422p10left.avi
173548 tests/data/fate/vsynth3-ffvhuff422p10left.avi
7815024a7239be263c6bf910021df1a0
*tests/data/fate/vsynth3-ffvhuff422p10left.out.rawvideo
stddev:
38.41 PSNR: 16.44 MAXDIFF: 237
bytes: 86700/ 86700
0cf7cf68724fa5146b1667e4fa08b0e1
*tests/data/fate/vsynth3-ffvhuff422p10left.out.rawvideo
stddev:
2.12 PSNR: 41.58 MAXDIFF: 26
bytes: 86700/ 86700
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