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
1fe45903
Commit
1fe45903
authored
Oct 16, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvideo1enc: fix interframe encoding
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
ba31e59e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
msvideo1enc.c
libavcodec/msvideo1enc.c
+4
-4
vsynth1-msvideo1
tests/ref/fate/vsynth1-msvideo1
+4
-4
vsynth2-msvideo1
tests/ref/fate/vsynth2-msvideo1
+4
-4
No files found.
libavcodec/msvideo1enc.c
View file @
1fe45903
...
@@ -110,7 +110,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
...
@@ -110,7 +110,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
bestscore
=
0
;
bestscore
=
0
;
for
(
j
=
0
;
j
<
4
;
j
++
){
for
(
j
=
0
;
j
<
4
;
j
++
){
for
(
i
=
0
;
i
<
4
*
3
;
i
++
){
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
;
bestscore
+=
t
*
t
;
}
}
}
}
...
@@ -204,14 +204,14 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
...
@@ -204,14 +204,14 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
for
(
j
=
0
;
j
<
4
;
j
++
)
for
(
j
=
0
;
j
<
4
;
j
++
)
for
(
i
=
0
;
i
<
4
;
i
++
)
for
(
i
=
0
;
i
<
4
;
i
++
)
for
(
k
=
0
;
k
<
3
;
k
++
)
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
;
break
;
case
MODE_2COL
:
case
MODE_2COL
:
for
(
j
=
0
;
j
<
4
;
j
++
){
for
(
j
=
0
;
j
<
4
;
j
++
){
for
(
i
=
0
;
i
<
4
;
i
++
){
for
(
i
=
0
;
i
<
4
;
i
++
){
flags
|=
(
c
->
output
[
i
+
j
*
4
]
^
1
)
<<
(
i
+
j
*
4
);
flags
|=
(
c
->
output
[
i
+
j
*
4
]
^
1
)
<<
(
i
+
j
*
4
);
for
(
k
=
0
;
k
<
3
;
k
++
)
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
);
bytestream_put_le16
(
&
dst
,
flags
);
...
@@ -223,7 +223,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
...
@@ -223,7 +223,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
for
(
i
=
0
;
i
<
4
;
i
++
){
for
(
i
=
0
;
i
<
4
;
i
++
){
flags
|=
(
c
->
output2
[
remap
[
i
+
j
*
4
]]
^
1
)
<<
(
i
+
j
*
4
);
flags
|=
(
c
->
output2
[
remap
[
i
+
j
*
4
]]
^
1
)
<<
(
i
+
j
*
4
);
for
(
k
=
0
;
k
<
3
;
k
++
)
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
);
bytestream_put_le16
(
&
dst
,
flags
);
...
...
tests/ref/fate/vsynth1-msvideo1
View file @
1fe45903
afe516f762a598f3f9c7ae8a9f288d3e
*tests/data/fate/vsynth1-msvideo1.avi
75a0f6680e23a50477826caec1a41bb9
*tests/data/fate/vsynth1-msvideo1.avi
2
16226
4 tests/data/fate/vsynth1-msvideo1.avi
2
05190
4 tests/data/fate/vsynth1-msvideo1.avi
ef76473f7be587dac7676a69835e43ce
*tests/data/fate/vsynth1-msvideo1.out.rawvideo
f4605ac6df556a3ca7053c49aaac04d8
*tests/data/fate/vsynth1-msvideo1.out.rawvideo
stddev: 11.8
0 PSNR: 26.69 MAXDIFF: 151
bytes: 7603200/ 7603200
stddev: 11.8
9 PSNR: 26.62 MAXDIFF: 159
bytes: 7603200/ 7603200
tests/ref/fate/vsynth2-msvideo1
View file @
1fe45903
e70658b8b97eb4c7e63b2081c3a602de
*tests/data/fate/vsynth2-msvideo1.avi
8d7e8eb05771d0341d88c30892908960
*tests/data/fate/vsynth2-msvideo1.avi
1259308
tests/data/fate/vsynth2-msvideo1.avi
914572
tests/data/fate/vsynth2-msvideo1.avi
cd83ffcbc73573044e3aead3094229e5
*tests/data/fate/vsynth2-msvideo1.out.rawvideo
9a6ac7c0171286f009d159b59fdc1154
*tests/data/fate/vsynth2-msvideo1.out.rawvideo
stddev: 7.
42 PSNR: 30.72
MAXDIFF: 123 bytes: 7603200/ 7603200
stddev: 7.
97 PSNR: 30.10
MAXDIFF: 123 bytes: 7603200/ 7603200
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