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
ecb0edd9
Commit
ecb0edd9
authored
Sep 20, 2011
by
Jonne Ahner
Committed by
Michael Niedermayer
Sep 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prores: simplify 4444 handling
parent
d673972d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
39 deletions
+30
-39
proresdec.c
libavcodec/proresdec.c
+30
-39
No files found.
libavcodec/proresdec.c
View file @
ecb0edd9
...
...
@@ -391,10 +391,10 @@ static av_always_inline void decode_ac_coeffs(AVCodecContext *avctx, GetBitConte
CLOSE_READER
(
re
,
gb
);
}
static
void
decode_slice_
full
(
AVCodecContext
*
avctx
,
SliceContext
*
slice
,
static
void
decode_slice_
luma
(
AVCodecContext
*
avctx
,
SliceContext
*
slice
,
uint8_t
*
dst
,
int
dst_stride
,
const
uint8_t
*
buf
,
unsigned
buf_size
,
const
int
*
qmat
,
int
rotate
)
const
int
*
qmat
)
{
ProresContext
*
ctx
=
avctx
->
priv_data
;
LOCAL_ALIGNED_16
(
DCTELEM
,
blocks
,
[
8
*
4
*
64
]);
...
...
@@ -412,38 +412,27 @@ static void decode_slice_full(AVCodecContext *avctx, SliceContext *slice,
block
=
blocks
;
if
(
rotate
)
{
for
(
i
=
0
;
i
<
slice
->
mb_count
;
i
++
)
{
ctx
->
idct_put
(
block
+
(
0
<<
6
),
dst
,
dst_stride
);
ctx
->
idct_put
(
block
+
(
2
<<
6
),
dst
+
16
,
dst_stride
);
ctx
->
idct_put
(
block
+
(
1
<<
6
),
dst
+
8
*
dst_stride
,
dst_stride
);
ctx
->
idct_put
(
block
+
(
3
<<
6
),
dst
+
8
*
dst_stride
+
16
,
dst_stride
);
block
+=
4
*
64
;
dst
+=
32
;
}
}
else
{
for
(
i
=
0
;
i
<
slice
->
mb_count
;
i
++
)
{
ctx
->
idct_put
(
block
+
(
0
<<
6
),
dst
,
dst_stride
);
ctx
->
idct_put
(
block
+
(
1
<<
6
),
dst
+
16
,
dst_stride
);
ctx
->
idct_put
(
block
+
(
2
<<
6
),
dst
+
8
*
dst_stride
,
dst_stride
);
ctx
->
idct_put
(
block
+
(
3
<<
6
),
dst
+
8
*
dst_stride
+
16
,
dst_stride
);
block
+=
4
*
64
;
dst
+=
32
;
}
for
(
i
=
0
;
i
<
slice
->
mb_count
;
i
++
)
{
ctx
->
idct_put
(
block
+
(
0
<<
6
),
dst
,
dst_stride
);
ctx
->
idct_put
(
block
+
(
1
<<
6
),
dst
+
16
,
dst_stride
);
ctx
->
idct_put
(
block
+
(
2
<<
6
),
dst
+
8
*
dst_stride
,
dst_stride
);
ctx
->
idct_put
(
block
+
(
3
<<
6
),
dst
+
8
*
dst_stride
+
16
,
dst_stride
);
block
+=
4
*
64
;
dst
+=
32
;
}
}
static
void
decode_slice_
half
(
AVCodecContext
*
avctx
,
SliceContext
*
slice
,
static
void
decode_slice_
chroma
(
AVCodecContext
*
avctx
,
SliceContext
*
slice
,
uint8_t
*
dst
,
int
dst_stride
,
const
uint8_t
*
buf
,
unsigned
buf_size
,
const
int
*
qmat
)
const
int
*
qmat
,
int
log2_blocks_per_mb
)
{
ProresContext
*
ctx
=
avctx
->
priv_data
;
LOCAL_ALIGNED_16
(
DCTELEM
,
blocks
,
[
8
*
4
*
64
]);
DCTELEM
*
block
;
GetBitContext
gb
;
int
i
,
blocks_per_slice
=
slice
->
mb_count
<<
1
;
int
i
,
j
,
blocks_per_slice
=
slice
->
mb_count
<<
log2_blocks_per_mb
;
for
(
i
=
0
;
i
<
blocks_per_slice
;
i
++
)
ctx
->
dsp
.
clear_block
(
blocks
+
(
i
<<
6
));
...
...
@@ -455,10 +444,12 @@ static void decode_slice_half(AVCodecContext *avctx, SliceContext *slice,
block
=
blocks
;
for
(
i
=
0
;
i
<
slice
->
mb_count
;
i
++
)
{
ctx
->
idct_put
(
block
+
(
0
<<
6
),
dst
,
dst_stride
);
ctx
->
idct_put
(
block
+
(
1
<<
6
),
dst
+
8
*
dst_stride
,
dst_stride
);
block
+=
2
*
64
;
dst
+=
16
;
for
(
j
=
0
;
j
<
log2_blocks_per_mb
;
j
++
)
{
ctx
->
idct_put
(
block
+
(
0
<<
6
),
dst
,
dst_stride
);
ctx
->
idct_put
(
block
+
(
1
<<
6
),
dst
+
8
*
dst_stride
,
dst_stride
);
block
+=
2
*
64
;
dst
+=
16
;
}
}
}
...
...
@@ -518,24 +509,24 @@ static int decode_slice_thread(AVCodecContext *avctx, void *arg, int jobnr, int
dest_v
+=
pic
->
linesize
[
2
];
}
decode_slice_
full
(
avctx
,
slice
,
dest_y
,
luma_stride
,
buf
,
y_data_size
,
qmat_luma_scaled
,
0
);
decode_slice_
luma
(
avctx
,
slice
,
dest_y
,
luma_stride
,
buf
,
y_data_size
,
qmat_luma_scaled
);
if
(
avctx
->
flags
&
CODEC_FLAG_GRAY
)
{
}
else
if
(
avctx
->
pix_fmt
==
PIX_FMT_YUV444P10
)
{
decode_slice_
full
(
avctx
,
slice
,
dest_u
,
chroma_stride
,
if
(
(
avctx
->
flags
&
CODEC_FLAG_GRAY
)
)
{
}
else
if
(
avctx
->
pix_fmt
==
PIX_FMT_YUV444P10
)
{
decode_slice_
chroma
(
avctx
,
slice
,
dest_u
,
chroma_stride
,
buf
+
y_data_size
,
u_data_size
,
qmat_chroma_scaled
,
1
);
decode_slice_
full
(
avctx
,
slice
,
dest_v
,
chroma_stride
,
qmat_chroma_scaled
,
2
);
decode_slice_
chroma
(
avctx
,
slice
,
dest_v
,
chroma_stride
,
buf
+
y_data_size
+
u_data_size
,
v_data_size
,
qmat_chroma_scaled
,
1
);
qmat_chroma_scaled
,
2
);
}
else
{
decode_slice_
half
(
avctx
,
slice
,
dest_u
,
chroma_stride
,
decode_slice_
chroma
(
avctx
,
slice
,
dest_u
,
chroma_stride
,
buf
+
y_data_size
,
u_data_size
,
qmat_chroma_scaled
);
decode_slice_
half
(
avctx
,
slice
,
dest_v
,
chroma_stride
,
qmat_chroma_scaled
,
1
);
decode_slice_
chroma
(
avctx
,
slice
,
dest_v
,
chroma_stride
,
buf
+
y_data_size
+
u_data_size
,
v_data_size
,
qmat_chroma_scaled
);
qmat_chroma_scaled
,
1
);
}
return
0
;
...
...
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