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
66dc3ba3
Commit
66dc3ba3
authored
Dec 09, 2012
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Flip zerocodec output.
Fixes ticket #1218
parent
e8ca7cfa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
42 deletions
+45
-42
version.h
libavcodec/version.h
+1
-1
zerocodec.c
libavcodec/zerocodec.c
+6
-3
zerocodec
tests/ref/fate/zerocodec
+38
-38
No files found.
libavcodec/version.h
View file @
66dc3ba3
...
...
@@ -30,7 +30,7 @@
#define LIBAVCODEC_VERSION_MAJOR 54
#define LIBAVCODEC_VERSION_MINOR 79
#define LIBAVCODEC_VERSION_MICRO 10
0
#define LIBAVCODEC_VERSION_MICRO 10
1
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
...
...
libavcodec/zerocodec.c
View file @
66dc3ba3
...
...
@@ -49,6 +49,9 @@ static int zerocodec_decode_frame(AVCodecContext *avctx, void *data,
av_log
(
avctx
,
AV_LOG_ERROR
,
"Missing reference frame.
\n
"
);
return
AVERROR_INVALIDDATA
;
}
prev
+=
(
avctx
->
height
-
1
)
*
prev_pic
->
linesize
[
0
];
pic
->
key_frame
=
0
;
pic
->
pict_type
=
AV_PICTURE_TYPE_P
;
}
...
...
@@ -67,7 +70,7 @@ static int zerocodec_decode_frame(AVCodecContext *avctx, void *data,
zstream
->
next_in
=
avpkt
->
data
;
zstream
->
avail_in
=
avpkt
->
size
;
dst
=
pic
->
data
[
0
];
dst
=
pic
->
data
[
0
]
+
(
avctx
->
height
-
1
)
*
pic
->
linesize
[
0
]
;
/**
* ZeroCodec has very simple interframe compression. If a value
...
...
@@ -90,8 +93,8 @@ static int zerocodec_decode_frame(AVCodecContext *avctx, void *data,
for
(
j
=
0
;
j
<
avctx
->
width
<<
1
;
j
++
)
dst
[
j
]
+=
prev
[
j
]
&
-!
dst
[
j
];
prev
+
=
prev_pic
->
linesize
[
0
];
dst
+
=
pic
->
linesize
[
0
];
prev
-
=
prev_pic
->
linesize
[
0
];
dst
-
=
pic
->
linesize
[
0
];
}
/* Release the previous buffer if need be */
...
...
tests/ref/fate/zerocodec
View file @
66dc3ba3
#tb 0: 417083/10000000
0, 0, 0, 1, 1843200, 0x0
9f2
4bd5
0, 1, 1, 1, 1843200, 0x
8c93
2d04
0, 2, 2, 1, 1843200, 0x
e049
04a0
0, 3, 3, 1, 1843200, 0x
1969
f383
0, 4, 4, 1, 1843200, 0x
7078
1331
0, 5, 5, 1, 1843200, 0x
f494
496b
0, 6, 6, 1, 1843200, 0x
f622
6da2
0, 7, 7, 1, 1843200, 0x
5d65
7925
0, 8, 8, 1, 1843200, 0x
de15
820d
0, 9, 9, 1, 1843200, 0x
b676
8df1
0, 10, 10, 1, 1843200, 0x
c431
8e08
0, 11, 11, 1, 1843200, 0x
8530
a7d5
0, 12, 12, 1, 1843200, 0x
0ee2
9f10
0, 13, 13, 1, 1843200, 0x
cbb6
b185
0, 14, 14, 1, 1843200, 0x
085a
ac47
0, 15, 15, 1, 1843200, 0x
b42e
7b1b
0, 16, 16, 1, 1843200, 0x
ea3a
2cd6
0, 17, 17, 1, 1843200, 0x
7600
ee09
0, 18, 18, 1, 1843200, 0x
e39f
c9d4
0, 19, 19, 1, 1843200, 0x
c122
cd4c
0, 20, 20, 1, 1843200, 0x
5fb4
c1cb
0, 21, 21, 1, 1843200, 0x
1552
cb6c
0, 22, 22, 1, 1843200, 0x
5b66
ce2f
0, 23, 23, 1, 1843200, 0x7
0a8
c318
0, 24, 24, 1, 1843200, 0x
8b86
af2d
0, 25, 25, 1, 1843200, 0x
9488
6a49
0, 26, 26, 1, 1843200, 0x
da05
684f
0, 27, 27, 1, 1843200, 0x
e57
c8f33
0, 28, 28, 1, 1843200, 0x
39ef
9c7e
0, 29, 29, 1, 1843200, 0x
e7a0
cab8
0, 30, 30, 1, 1843200, 0x
43f0
d766
0, 31, 31, 1, 1843200, 0x
733d
3c7b
0, 32, 32, 1, 1843200, 0x
4271
3cea
0, 33, 33, 1, 1843200, 0x
dd84
4e53
0, 34, 34, 1, 1843200, 0x
a087
5ba8
0, 35, 35, 1, 1843200, 0x
318b
6114
0, 36, 36, 1, 1843200, 0x
cc98
6275
0, 37, 37, 1, 1843200, 0x
14eb
6704
0, 0, 0, 1, 1843200, 0x0
415
4bd5
0, 1, 1, 1, 1843200, 0x
3a87
2d04
0, 2, 2, 1, 1843200, 0x
3b13
04a0
0, 3, 3, 1, 1843200, 0x
7474
f383
0, 4, 4, 1, 1843200, 0x
ce7d
1331
0, 5, 5, 1, 1843200, 0x
3cdf
496b
0, 6, 6, 1, 1843200, 0x
e909
6da2
0, 7, 7, 1, 1843200, 0x
30be
7925
0, 8, 8, 1, 1843200, 0x
600b
820d
0, 9, 9, 1, 1843200, 0x
e7bb
8df1
0, 10, 10, 1, 1843200, 0x
6284
8e08
0, 11, 11, 1, 1843200, 0x
9a71
a7d5
0, 12, 12, 1, 1843200, 0x
743a
9f10
0, 13, 13, 1, 1843200, 0x
62b0
b185
0, 14, 14, 1, 1843200, 0x
d94e
ac47
0, 15, 15, 1, 1843200, 0x
a100
7b1b
0, 16, 16, 1, 1843200, 0x
11d7
2cd6
0, 17, 17, 1, 1843200, 0x
141a
ee09
0, 18, 18, 1, 1843200, 0x
9a90
c9d4
0, 19, 19, 1, 1843200, 0x
6bd5
cd4c
0, 20, 20, 1, 1843200, 0x
df2e
c1cb
0, 21, 21, 1, 1843200, 0x
eecb
cb6c
0, 22, 22, 1, 1843200, 0x
9eca
ce2f
0, 23, 23, 1, 1843200, 0x7
b59
c318
0, 24, 24, 1, 1843200, 0x
050b
af2d
0, 25, 25, 1, 1843200, 0x
ada3
6a49
0, 26, 26, 1, 1843200, 0x
4f4d
684f
0, 27, 27, 1, 1843200, 0x
9dd
c8f33
0, 28, 28, 1, 1843200, 0x
914d
9c7e
0, 29, 29, 1, 1843200, 0x
0dc3
cab8
0, 30, 30, 1, 1843200, 0x
98f8
d766
0, 31, 31, 1, 1843200, 0x
872e
3c7b
0, 32, 32, 1, 1843200, 0x
df7b
3cea
0, 33, 33, 1, 1843200, 0x
f786
4e53
0, 34, 34, 1, 1843200, 0x
1331
5ba8
0, 35, 35, 1, 1843200, 0x
c458
6114
0, 36, 36, 1, 1843200, 0x
57a9
6275
0, 37, 37, 1, 1843200, 0x
6e75
6704
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