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
da2a49ac
Commit
da2a49ac
authored
Mar 02, 2015
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/proresenc_kostya: fix coded_frame handling
parent
bf691e1d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
proresenc_kostya.c
libavcodec/proresenc_kostya.c
+5
-7
No files found.
libavcodec/proresenc_kostya.c
View file @
da2a49ac
...
...
@@ -914,7 +914,7 @@ static int find_quant_thread(AVCodecContext *avctx, void *arg,
for
(
x
=
mb
=
0
;
x
<
ctx
->
mb_width
;
x
+=
mbs_per_slice
,
mb
++
)
{
while
(
ctx
->
mb_width
-
x
<
mbs_per_slice
)
mbs_per_slice
>>=
1
;
q
=
find_slice_quant
(
avctx
,
a
vctx
->
coded_frame
,
q
=
find_slice_quant
(
avctx
,
a
rg
,
(
mb
+
1
)
*
TRELLIS_WIDTH
,
x
,
y
,
mbs_per_slice
,
td
);
}
...
...
@@ -942,10 +942,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
int
max_slice_size
=
(
ctx
->
frame_size_upper_bound
-
200
)
/
(
ctx
->
pictures_per_frame
*
ctx
->
slices_per_picture
+
1
);
uint8_t
frame_flags
;
*
avctx
->
coded_frame
=
*
pic
;
avctx
->
coded_frame
->
pict_type
=
AV_PICTURE_TYPE_I
;
avctx
->
coded_frame
->
key_frame
=
1
;
pkt_size
=
ctx
->
frame_size_upper_bound
;
if
((
ret
=
ff_alloc_packet2
(
avctx
,
pkt
,
pkt_size
+
FF_MIN_BUFFER_SIZE
))
<
0
)
...
...
@@ -1006,7 +1002,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
// slices
if
(
!
ctx
->
force_quant
)
{
ret
=
avctx
->
execute2
(
avctx
,
find_quant_thread
,
NULL
,
NULL
,
ret
=
avctx
->
execute2
(
avctx
,
find_quant_thread
,
(
void
*
)
pic
,
NULL
,
ctx
->
mb_height
);
if
(
ret
)
return
ret
;
...
...
@@ -1096,7 +1092,7 @@ static av_cold int encode_close(AVCodecContext *avctx)
ProresContext
*
ctx
=
avctx
->
priv_data
;
int
i
;
av_fr
eep
(
&
avctx
->
coded_frame
);
av_fr
ame_free
(
&
avctx
->
coded_frame
);
if
(
ctx
->
tdata
)
{
for
(
i
=
0
;
i
<
avctx
->
thread_count
;
i
++
)
...
...
@@ -1134,6 +1130,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
avctx
->
coded_frame
=
av_frame_alloc
();
if
(
!
avctx
->
coded_frame
)
return
AVERROR
(
ENOMEM
);
avctx
->
coded_frame
->
pict_type
=
AV_PICTURE_TYPE_I
;
avctx
->
coded_frame
->
key_frame
=
1
;
ctx
->
fdct
=
prores_fdct
;
ctx
->
scantable
=
interlaced
?
ff_prores_interlaced_scan
...
...
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