Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
1fe45903
Commit
1fe45903
authored
12 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
msvideo1enc: fix interframe encoding
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
ba31e59e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
libavcodec/msvideo1enc.c
+4
-4
4 additions, 4 deletions
libavcodec/msvideo1enc.c
tests/ref/fate/vsynth1-msvideo1
+4
-4
4 additions, 4 deletions
tests/ref/fate/vsynth1-msvideo1
tests/ref/fate/vsynth2-msvideo1
+4
-4
4 additions, 4 deletions
tests/ref/fate/vsynth2-msvideo1
with
12 additions
and
12 deletions
libavcodec/msvideo1enc.c
+
4
−
4
View file @
1fe45903
...
...
@@ -110,7 +110,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
bestscore
=
0
;
for
(
j
=
0
;
j
<
4
;
j
++
){
for
(
i
=
0
;
i
<
4
*
3
;
i
++
){
int
t
=
prevptr
[
x
*
3
+
i
+
j
*
p
->
linesize
[
0
]
]
-
c
->
block
[
i
+
j
*
4
*
3
];
int
t
=
prevptr
[
x
*
3
+
i
-
j
*
3
*
avctx
->
width
]
-
c
->
block
[
i
+
j
*
4
*
3
];
bestscore
+=
t
*
t
;
}
}
...
...
@@ -204,14 +204,14 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
for
(
j
=
0
;
j
<
4
;
j
++
)
for
(
i
=
0
;
i
<
4
;
i
++
)
for
(
k
=
0
;
k
<
3
;
k
++
)
prevptr
[
i
*
3
+
k
-
j
*
3
*
avctx
->
width
]
=
c
->
avg
[
k
];
prevptr
[
x
*
3
+
i
*
3
+
k
-
j
*
3
*
avctx
->
width
]
=
c
->
avg
[
k
];
break
;
case
MODE_2COL
:
for
(
j
=
0
;
j
<
4
;
j
++
){
for
(
i
=
0
;
i
<
4
;
i
++
){
flags
|=
(
c
->
output
[
i
+
j
*
4
]
^
1
)
<<
(
i
+
j
*
4
);
for
(
k
=
0
;
k
<
3
;
k
++
)
prevptr
[
i
*
3
+
k
-
j
*
3
*
avctx
->
width
]
=
c
->
codebook
[
c
->
output
[
i
+
j
*
4
]
*
3
+
k
];
prevptr
[
x
*
3
+
i
*
3
+
k
-
j
*
3
*
avctx
->
width
]
=
c
->
codebook
[
c
->
output
[
i
+
j
*
4
]
*
3
+
k
];
}
}
bytestream_put_le16
(
&
dst
,
flags
);
...
...
@@ -223,7 +223,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
for
(
i
=
0
;
i
<
4
;
i
++
){
flags
|=
(
c
->
output2
[
remap
[
i
+
j
*
4
]]
^
1
)
<<
(
i
+
j
*
4
);
for
(
k
=
0
;
k
<
3
;
k
++
)
prevptr
[
i
*
3
+
k
-
j
*
3
*
avctx
->
width
]
=
c
->
codebook2
[(
c
->
output2
[
remap
[
i
+
j
*
4
]]
+
(
i
&
2
)
+
(
j
&
2
)
*
2
)
*
3
+
k
];
prevptr
[
x
*
3
+
i
*
3
+
k
-
j
*
3
*
avctx
->
width
]
=
c
->
codebook2
[(
c
->
output2
[
remap
[
i
+
j
*
4
]]
+
(
i
&
2
)
+
(
j
&
2
)
*
2
)
*
3
+
k
];
}
}
bytestream_put_le16
(
&
dst
,
flags
);
...
...
This diff is collapsed.
Click to expand it.
tests/ref/fate/vsynth1-msvideo1
+
4
−
4
View file @
1fe45903
afe516f762a598f3f9c7ae8a9f288d3e
*tests/data/fate/vsynth1-msvideo1.avi
2
16226
4 tests/data/fate/vsynth1-msvideo1.avi
ef76473f7be587dac7676a69835e43ce
*tests/data/fate/vsynth1-msvideo1.out.rawvideo
stddev: 11.8
0
PSNR: 26.6
9
MAXDIFF: 15
1
bytes: 7603200/ 7603200
75a0f6680e23a50477826caec1a41bb9
*tests/data/fate/vsynth1-msvideo1.avi
2
05190
4 tests/data/fate/vsynth1-msvideo1.avi
f4605ac6df556a3ca7053c49aaac04d8
*tests/data/fate/vsynth1-msvideo1.out.rawvideo
stddev: 11.8
9
PSNR: 26.6
2
MAXDIFF: 15
9
bytes: 7603200/ 7603200
This diff is collapsed.
Click to expand it.
tests/ref/fate/vsynth2-msvideo1
+
4
−
4
View file @
1fe45903
e70658b8b97eb4c7e63b2081c3a602de
*tests/data/fate/vsynth2-msvideo1.avi
1259308
tests/data/fate/vsynth2-msvideo1.avi
cd83ffcbc73573044e3aead3094229e5
*tests/data/fate/vsynth2-msvideo1.out.rawvideo
stddev: 7.
42
PSNR: 30.
72
MAXDIFF: 123 bytes: 7603200/ 7603200
8d7e8eb05771d0341d88c30892908960
*tests/data/fate/vsynth2-msvideo1.avi
914572
tests/data/fate/vsynth2-msvideo1.avi
9a6ac7c0171286f009d159b59fdc1154
*tests/data/fate/vsynth2-msvideo1.out.rawvideo
stddev: 7.
97
PSNR: 30.
10
MAXDIFF: 123 bytes: 7603200/ 7603200
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment