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
3e002747
Commit
3e002747
authored
May 08, 2011
by
Baptiste Coudurier
Committed by
Michael Niedermayer
May 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v210enc: switch to PIX_FMT_422P10
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
807a058e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
v210enc.c
libavcodec/v210enc.c
+9
-11
No files found.
libavcodec/v210enc.c
View file @
3e002747
...
...
@@ -31,8 +31,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
return
-
1
;
}
if
(
avctx
->
pix_fmt
!=
PIX_FMT_YUV422P1
6
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"v210 needs YUV422P1
6
\n
"
);
if
(
avctx
->
pix_fmt
!=
PIX_FMT_YUV422P1
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"v210 needs YUV422P1
0
\n
"
);
return
-
1
;
}
...
...
@@ -68,9 +68,9 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf,
#define WRITE_PIXELS(a, b, c) \
do { \
val =
(*a++ >> 6) |
\
((*b++ & 0xFFC0) << 4);
\
val|= (*c++ & 0xFFC0) << 14;
\
val =
*a++;
\
val |= (*b++ << 10) |
\
(*c++ << 20);
\
bytestream_put_le32(&p, val); \
} while (0)
...
...
@@ -85,17 +85,15 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf,
if
(
w
<
avctx
->
width
-
1
)
{
WRITE_PIXELS
(
u
,
y
,
v
);
val
=
*
y
++
>>
6
;
val
=
*
y
++
;
if
(
w
==
avctx
->
width
-
2
)
bytestream_put_le32
(
&
p
,
val
);
}
if
(
w
<
avctx
->
width
-
3
)
{
val
|=
((
*
u
++
&
0xFFC0
)
<<
4
)
|
((
*
y
++
&
0xFFC0
)
<<
14
);
val
|=
(
*
u
++
<<
10
)
|
(
*
y
++
<<
20
);
bytestream_put_le32
(
&
p
,
val
);
val
=
(
*
v
++
>>
6
)
|
(
*
y
++
&
0xFFC0
)
<<
4
;
val
=
*
v
++
|
(
*
y
++
<<
10
);
bytestream_put_le32
(
&
p
,
val
);
}
...
...
@@ -125,6 +123,6 @@ AVCodec ff_v210_encoder = {
encode_init
,
encode_frame
,
encode_close
,
.
pix_fmts
=
(
const
enum
PixelFormat
[]){
PIX_FMT_YUV422P1
6
,
PIX_FMT_NONE
},
.
pix_fmts
=
(
const
enum
PixelFormat
[]){
PIX_FMT_YUV422P1
0
,
PIX_FMT_NONE
},
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"Uncompressed 4:2:2 10-bit"
),
};
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