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
ae017c26
Commit
ae017c26
authored
Mar 01, 2014
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libzvbi-teletextdec: use av_dlog where possible
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
b28c3715
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
12 deletions
+5
-12
libzvbi-teletextdec.c
libavcodec/libzvbi-teletextdec.c
+5
-12
No files found.
libavcodec/libzvbi-teletextdec.c
View file @
ae017c26
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#include "libavutil/opt.h"
#include "libavutil/opt.h"
#include "libavutil/bprint.h"
#include "libavutil/bprint.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/log.h"
#include <libzvbi.h>
#include <libzvbi.h>
...
@@ -272,10 +273,7 @@ static int gen_sub_bitmap(TeletextContext *ctx, AVSubtitleRect *sub_rect, vbi_pa
...
@@ -272,10 +273,7 @@ static int gen_sub_bitmap(TeletextContext *ctx, AVSubtitleRect *sub_rect, vbi_pa
b
=
VBI_B
(
page
->
color_map
[
ci
]);
b
=
VBI_B
(
page
->
color_map
[
ci
]);
a
=
VBI_A
(
page
->
color_map
[
ci
]);
a
=
VBI_A
(
page
->
color_map
[
ci
]);
((
uint32_t
*
)
sub_rect
->
pict
.
data
[
1
])[
ci
]
=
RGBA
(
r
,
g
,
b
,
a
);
((
uint32_t
*
)
sub_rect
->
pict
.
data
[
1
])[
ci
]
=
RGBA
(
r
,
g
,
b
,
a
);
#ifdef DEBUG
av_dlog
(
ctx
,
"palette %0x
\n
"
,
((
uint32_t
*
)
sub_rect
->
pict
.
data
[
1
])[
ci
]);
av_log
(
ctx
,
AV_LOG_DEBUG
,
"palette %0x
\n
"
,
((
uint32_t
*
)
sub_rect
->
pict
.
data
[
1
])[
ci
]);
#endif
}
}
((
uint32_t
*
)
sub_rect
->
pict
.
data
[
1
])[
cmax
]
=
RGBA
(
0
,
0
,
0
,
0
);
((
uint32_t
*
)
sub_rect
->
pict
.
data
[
1
])[
cmax
]
=
RGBA
(
0
,
0
,
0
,
0
);
sub_rect
->
type
=
SUBTITLE_BITMAP
;
sub_rect
->
type
=
SUBTITLE_BITMAP
;
...
@@ -404,11 +402,8 @@ static int teletext_decode_frame(AVCodecContext *avctx, void *data, int *data_si
...
@@ -404,11 +402,8 @@ static int teletext_decode_frame(AVCodecContext *avctx, void *data, int *data_si
while
(
left
>
0
)
{
while
(
left
>
0
)
{
int64_t
pts
=
0
;
int64_t
pts
=
0
;
unsigned
int
lines
=
vbi_dvb_demux_cor
(
ctx
->
dx
,
ctx
->
sliced
,
64
,
&
pts
,
&
buf
,
&
left
);
unsigned
int
lines
=
vbi_dvb_demux_cor
(
ctx
->
dx
,
ctx
->
sliced
,
64
,
&
pts
,
&
buf
,
&
left
);
#ifdef DEBUG
av_dlog
(
avctx
,
"ctx=%p buf_size=%d left=%u lines=%u pts=%f pkt_pts=%f
\n
"
,
av_log
(
avctx
,
AV_LOG_DEBUG
,
ctx
,
pkt
->
size
,
left
,
lines
,
(
double
)
pts
/
90000
.
0
,
(
double
)
pkt
->
pts
/
90000
.
0
);
"ctx=%p buf_size=%d left=%u lines=%u pts=%f pkt_pts=%f
\n
"
,
ctx
,
pkt
->
size
,
left
,
lines
,
(
double
)
pts
/
90000
.
0
,
(
double
)
pkt
->
pts
/
90000
.
0
);
#endif
if
(
lines
>
0
)
{
if
(
lines
>
0
)
{
#ifdef DEBUGx
#ifdef DEBUGx
int
i
;
int
i
;
...
@@ -497,9 +492,7 @@ static int teletext_close_decoder(AVCodecContext *avctx)
...
@@ -497,9 +492,7 @@ static int teletext_close_decoder(AVCodecContext *avctx)
{
{
TeletextContext
*
ctx
=
avctx
->
priv_data
;
TeletextContext
*
ctx
=
avctx
->
priv_data
;
#ifdef DEBUG
av_dlog
(
avctx
,
"lines_total=%u
\n
"
,
ctx
->
lines_processed
);
av_log
(
avctx
,
AV_LOG_DEBUG
,
"lines_total=%u
\n
"
,
ctx
->
lines_processed
);
#endif
while
(
ctx
->
nb_pages
)
while
(
ctx
->
nb_pages
)
subtitle_rect_free
(
&
ctx
->
pages
[
--
ctx
->
nb_pages
].
sub_rect
);
subtitle_rect_free
(
&
ctx
->
pages
[
--
ctx
->
nb_pages
].
sub_rect
);
av_freep
(
&
ctx
->
pages
);
av_freep
(
&
ctx
->
pages
);
...
...
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