Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
ffmpeg
Commits
e9feea59
Commit
e9feea59
authored
Oct 07, 2002
by
Arpi
Browse files
DV ntsc support, 411P colorspace added
Originally committed as revision 1010 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
acd2e05c
Changes
2
Hide whitespace changes
Inline
Side-by-side
libavcodec/avcodec.h
View file @
e9feea59
...
...
@@ -64,7 +64,8 @@ enum PixelFormat {
PIX_FMT_YUV444P
,
PIX_FMT_RGBA32
,
PIX_FMT_BGRA32
,
PIX_FMT_YUV410P
PIX_FMT_YUV410P
,
PIX_FMT_YUV411P
};
/* currently unused, may be used if 24/32 bits samples ever supported */
...
...
libavcodec/dv.c
View file @
e9feea59
...
...
@@ -521,6 +521,14 @@ static int dvvideo_decode_frame(AVCodecContext *avctx,
nb_dif_segs
=
10
;
}
/* XXX: is it correct to assume that 420 is always used in PAL
mode ? */
s
->
sampling_411
=
!
dsf
;
if
(
s
->
sampling_411
)
mb_pos_ptr
=
dv_place_411
;
else
mb_pos_ptr
=
dv_place_420
;
/* (re)alloc picture if needed */
if
(
s
->
width
!=
width
||
s
->
height
!=
height
)
{
for
(
i
=
0
;
i
<
3
;
i
++
)
...
...
@@ -530,7 +538,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx,
s
->
linesize
[
i
]
=
width
;
if
(
i
>=
1
)
{
size
>>=
2
;
s
->
linesize
[
i
]
>>=
1
;
s
->
linesize
[
i
]
>>=
s
->
sampling_411
?
2
:
1
;
}
s
->
current_picture
[
i
]
=
av_malloc
(
size
);
if
(
!
s
->
current_picture
[
i
])
...
...
@@ -540,14 +548,6 @@ static int dvvideo_decode_frame(AVCodecContext *avctx,
s
->
height
=
height
;
}
/* XXX: is it correct to assume that 420 is always used in PAL
mode ? */
s
->
sampling_411
=
!
dsf
;
if
(
s
->
sampling_411
)
mb_pos_ptr
=
dv_place_411
;
else
mb_pos_ptr
=
dv_place_420
;
/* for each DIF segment */
buf_ptr
=
buf
;
for
(
ds
=
0
;
ds
<
nb_dif_segs
;
ds
++
)
{
...
...
@@ -568,7 +568,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx,
avctx
->
width
=
width
;
avctx
->
height
=
height
;
if
(
s
->
sampling_411
)
avctx
->
pix_fmt
=
PIX_FMT_YUV4
20P
;
/* XXX: incorrect, add PIX_FMT_YUV411P */
avctx
->
pix_fmt
=
PIX_FMT_YUV4
11P
;
else
avctx
->
pix_fmt
=
PIX_FMT_YUV420P
;
if
(
dsf
)
...
...
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