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
bf5d0505
Commit
bf5d0505
authored
Sep 01, 2003
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some fixes (still buggy though)
Originally committed as revision 2191 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
3f16d933
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
23 deletions
+4
-23
mdec.c
libavcodec/mdec.c
+4
-23
No files found.
libavcodec/mdec.c
View file @
bf5d0505
...
...
@@ -65,7 +65,7 @@ static inline int mdec_decode_block_intra(MDECContext *a, DCTELEM *block, int n)
/* DC coef */
if
(
a
->
version
==
2
){
block
[
0
]
=
get_sbits
(
&
a
->
gb
,
1
1
);
block
[
0
]
=
get_sbits
(
&
a
->
gb
,
1
0
);
}
else
{
component
=
(
n
<=
3
?
0
:
n
-
4
+
1
);
diff
=
decode_dc
(
&
a
->
gb
,
component
);
...
...
@@ -96,12 +96,7 @@ static inline int mdec_decode_block_intra(MDECContext *a, DCTELEM *block, int n)
/* escape */
run
=
SHOW_UBITS
(
re
,
&
a
->
gb
,
6
)
+
1
;
LAST_SKIP_BITS
(
re
,
&
a
->
gb
,
6
);
UPDATE_CACHE
(
re
,
&
a
->
gb
);
level
=
SHOW_SBITS
(
re
,
&
a
->
gb
,
8
);
SKIP_BITS
(
re
,
&
a
->
gb
,
8
);
if
(
level
==
-
128
)
{
level
=
SHOW_UBITS
(
re
,
&
a
->
gb
,
8
)
-
256
;
LAST_SKIP_BITS
(
re
,
&
a
->
gb
,
8
);
}
else
if
(
level
==
0
)
{
level
=
SHOW_UBITS
(
re
,
&
a
->
gb
,
8
)
;
LAST_SKIP_BITS
(
re
,
&
a
->
gb
,
8
);
}
level
=
SHOW_SBITS
(
re
,
&
a
->
gb
,
10
);
SKIP_BITS
(
re
,
&
a
->
gb
,
10
);
i
+=
run
;
j
=
scantable
[
i
];
/* if(level<0){
...
...
@@ -193,7 +188,6 @@ static int decode_frame(AVCodecContext *avctx,
a
->
bitstream_buffer
[
i
]
=
buf
[
i
+
1
];
a
->
bitstream_buffer
[
i
+
1
]
=
buf
[
i
];
}
// a->dsp.bswap_buf((uint32_t*)a->bitstream_buffer, (uint32_t*)buf, buf_size/4);
init_get_bits
(
&
a
->
gb
,
a
->
bitstream_buffer
,
buf_size
*
8
);
/* skip over 4 preamble bytes in stream (typically 0xXX 0xXX 0x00 0x38) */
...
...
@@ -201,12 +195,11 @@ static int decode_frame(AVCodecContext *avctx,
a
->
qscale
=
get_bits
(
&
a
->
gb
,
16
);
a
->
version
=
get_bits
(
&
a
->
gb
,
16
);
skip_bits
(
&
a
->
gb
,
8
*
8
);
printf
(
"qscale:%d (0x%X), version:%d (0x%X)
\n
"
,
a
->
qscale
,
a
->
qscale
,
a
->
version
,
a
->
version
);
for
(
a
->
mb_
y
=
0
;
a
->
mb_y
<
a
->
mb_height
;
a
->
mb_y
++
){
for
(
a
->
mb_
x
=
0
;
a
->
mb_x
<
a
->
mb_width
;
a
->
mb_x
++
){
for
(
a
->
mb_
x
=
0
;
a
->
mb_x
<
a
->
mb_width
;
a
->
mb_x
++
){
for
(
a
->
mb_
y
=
0
;
a
->
mb_y
<
a
->
mb_height
;
a
->
mb_y
++
){
if
(
decode_mb
(
a
,
a
->
block
)
<
0
)
return
-
1
;
...
...
@@ -214,18 +207,6 @@ static int decode_frame(AVCodecContext *avctx,
}
}
#if 0
int i;
printf("%d %d\n", 8*buf_size, get_bits_count(&a->gb));
for(i=get_bits_count(&a->gb); i<8*buf_size; i++){
printf("%d", get_bits1(&a->gb));
}
for(i=0; i<s->avctx->extradata_size; i++){
printf("%c\n", ((uint8_t*)s->avctx->extradata)[i]);
}
#endif
// p->quality= (32 + a->inv_qscale/2)/a->inv_qscale;
// memset(p->qscale_table, p->quality, p->qstride*a->mb_height);
...
...
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