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
e962bd08
Commit
e962bd08
authored
Mar 09, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264: add a parameter to the CHROMA422 macro.
This way it does not look like a constant.
parent
6d2b6f21
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
12 deletions
+12
-12
h264.c
libavcodec/h264.c
+4
-4
h264.h
libavcodec/h264.h
+1
-1
h264_cabac.c
libavcodec/h264_cabac.c
+1
-1
h264_cavlc.c
libavcodec/h264_cavlc.c
+1
-1
h264_loopfilter.c
libavcodec/h264_loopfilter.c
+3
-3
h264_mb_template.c
libavcodec/h264_mb_template.c
+1
-1
h264_mvpred.h
libavcodec/h264_mvpred.h
+1
-1
No files found.
libavcodec/h264.c
View file @
e962bd08
...
...
@@ -2042,7 +2042,7 @@ static av_always_inline void backup_mb_border(H264Context *h, uint8_t *src_y,
int
top_idx
=
1
;
const
int
pixel_shift
=
h
->
pixel_shift
;
int
chroma444
=
CHROMA444
;
int
chroma422
=
CHROMA422
;
int
chroma422
=
CHROMA422
(
h
)
;
src_y
-=
linesize
;
src_cb
-=
uvlinesize
;
...
...
@@ -2931,7 +2931,7 @@ static enum AVPixelFormat get_pixel_format(H264Context *h)
return
AV_PIX_FMT_GBRP9
;
}
else
return
AV_PIX_FMT_YUV444P9
;
}
else
if
(
CHROMA422
)
}
else
if
(
CHROMA422
(
h
)
)
return
AV_PIX_FMT_YUV422P9
;
else
return
AV_PIX_FMT_YUV420P9
;
...
...
@@ -2942,7 +2942,7 @@ static enum AVPixelFormat get_pixel_format(H264Context *h)
return
AV_PIX_FMT_GBRP10
;
}
else
return
AV_PIX_FMT_YUV444P10
;
}
else
if
(
CHROMA422
)
}
else
if
(
CHROMA422
(
h
)
)
return
AV_PIX_FMT_YUV422P10
;
else
return
AV_PIX_FMT_YUV420P10
;
...
...
@@ -2954,7 +2954,7 @@ static enum AVPixelFormat get_pixel_format(H264Context *h)
}
else
return
h
->
avctx
->
color_range
==
AVCOL_RANGE_JPEG
?
AV_PIX_FMT_YUVJ444P
:
AV_PIX_FMT_YUV444P
;
}
else
if
(
CHROMA422
)
{
}
else
if
(
CHROMA422
(
h
)
)
{
return
h
->
avctx
->
color_range
==
AVCOL_RANGE_JPEG
?
AV_PIX_FMT_YUVJ422P
:
AV_PIX_FMT_YUV422P
;
}
else
{
...
...
libavcodec/h264.h
View file @
e962bd08
...
...
@@ -85,7 +85,7 @@
#define CABAC(h) h->pps.cabac
#endif
#define CHROMA422 (h->sps.chroma_format_idc == 2)
#define CHROMA422
(h)
(h->sps.chroma_format_idc == 2)
#define CHROMA444 (h->sps.chroma_format_idc == 3)
#define EXTENDED_SAR 255
...
...
libavcodec/h264_cabac.c
View file @
e962bd08
...
...
@@ -2357,7 +2357,7 @@ decode_intra_mb:
if
(
CHROMA444
){
decode_cabac_luma_residual
(
h
,
scan
,
scan8x8
,
pixel_shift
,
mb_type
,
cbp
,
1
);
decode_cabac_luma_residual
(
h
,
scan
,
scan8x8
,
pixel_shift
,
mb_type
,
cbp
,
2
);
}
else
if
(
CHROMA422
)
{
}
else
if
(
CHROMA422
(
h
)
)
{
if
(
cbp
&
0x30
){
int
c
;
for
(
c
=
0
;
c
<
2
;
c
++
)
...
...
libavcodec/h264_cavlc.c
View file @
e962bd08
...
...
@@ -1113,7 +1113,7 @@ decode_intra_mb:
if
(
decode_luma_residual
(
h
,
gb
,
scan
,
scan8x8
,
pixel_shift
,
mb_type
,
cbp
,
2
)
<
0
){
return
-
1
;
}
}
else
if
(
CHROMA422
)
{
}
else
if
(
CHROMA422
(
h
)
)
{
if
(
cbp
&
0x30
){
for
(
chroma_idx
=
0
;
chroma_idx
<
2
;
chroma_idx
++
)
if
(
decode_residual
(
h
,
gb
,
h
->
mb
+
((
256
+
16
*
16
*
chroma_idx
)
<<
pixel_shift
),
...
...
libavcodec/h264_loopfilter.c
View file @
e962bd08
...
...
@@ -246,7 +246,7 @@ static av_always_inline void h264_filter_mb_fast_internal(H264Context *h,
{
int
chroma
=
!
(
CONFIG_GRAY
&&
(
h
->
flags
&
CODEC_FLAG_GRAY
));
int
chroma444
=
CHROMA444
;
int
chroma422
=
CHROMA422
;
int
chroma422
=
CHROMA422
(
h
)
;
int
mb_xy
=
h
->
mb_xy
;
int
left_type
=
h
->
left_type
[
LTOP
];
...
...
@@ -467,7 +467,7 @@ static av_always_inline void filter_mb_dir(H264Context *h, int mb_x, int mb_y, u
int
edge
;
int
chroma_qp_avg
[
2
];
int
chroma444
=
CHROMA444
;
int
chroma422
=
CHROMA422
;
int
chroma422
=
CHROMA422
(
h
)
;
const
int
mbm_xy
=
dir
==
0
?
mb_xy
-
1
:
h
->
top_mb_xy
;
const
int
mbm_type
=
dir
==
0
?
h
->
left_type
[
LTOP
]
:
h
->
top_type
;
...
...
@@ -784,7 +784,7 @@ void ff_h264_filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint
filter_mb_mbaff_edgev
(
h
,
img_cb
+
8
*
uvlinesize
,
uvlinesize
,
bS
+
4
,
1
,
bqp
[
1
],
a
,
b
,
1
);
filter_mb_mbaff_edgev
(
h
,
img_cr
,
uvlinesize
,
bS
,
1
,
rqp
[
0
],
a
,
b
,
1
);
filter_mb_mbaff_edgev
(
h
,
img_cr
+
8
*
uvlinesize
,
uvlinesize
,
bS
+
4
,
1
,
rqp
[
1
],
a
,
b
,
1
);
}
else
if
(
CHROMA422
)
{
}
else
if
(
CHROMA422
(
h
)
)
{
filter_mb_mbaff_edgecv
(
h
,
img_cb
,
uvlinesize
,
bS
,
1
,
bqp
[
0
],
a
,
b
,
1
);
filter_mb_mbaff_edgecv
(
h
,
img_cb
+
8
*
uvlinesize
,
uvlinesize
,
bS
+
4
,
1
,
bqp
[
1
],
a
,
b
,
1
);
filter_mb_mbaff_edgecv
(
h
,
img_cr
,
uvlinesize
,
bS
,
1
,
rqp
[
0
],
a
,
b
,
1
);
...
...
libavcodec/h264_mb_template.c
View file @
e962bd08
...
...
@@ -53,7 +53,7 @@ static av_noinline void FUNC(hl_decode_mb)(H264Context *h)
const
int
is_h264
=
!
CONFIG_SVQ3_DECODER
||
SIMPLE
||
h
->
avctx
->
codec_id
==
AV_CODEC_ID_H264
;
void
(
*
idct_add
)(
uint8_t
*
dst
,
int16_t
*
block
,
int
stride
);
const
int
block_h
=
16
>>
h
->
chroma_y_shift
;
const
int
chroma422
=
CHROMA422
;
const
int
chroma422
=
CHROMA422
(
h
)
;
dest_y
=
h
->
cur_pic
.
f
.
data
[
0
]
+
((
mb_x
<<
PIXEL_SHIFT
)
+
mb_y
*
h
->
linesize
)
*
16
;
dest_cb
=
h
->
cur_pic
.
f
.
data
[
1
]
+
(
mb_x
<<
PIXEL_SHIFT
)
*
8
+
mb_y
*
h
->
uvlinesize
*
block_h
;
...
...
libavcodec/h264_mvpred.h
View file @
e962bd08
...
...
@@ -561,7 +561,7 @@ static void fill_decode_caches(H264Context *h, int mb_type)
nnz_cache
[
3
+
8
*
7
+
2
*
8
*
i
]
=
nnz
[
left_block
[
8
+
1
+
2
*
i
]
+
4
*
4
];
nnz_cache
[
3
+
8
*
11
+
2
*
8
*
i
]
=
nnz
[
left_block
[
8
+
0
+
2
*
i
]
+
8
*
4
];
nnz_cache
[
3
+
8
*
12
+
2
*
8
*
i
]
=
nnz
[
left_block
[
8
+
1
+
2
*
i
]
+
8
*
4
];
}
else
if
(
CHROMA422
)
{
}
else
if
(
CHROMA422
(
h
)
)
{
nnz_cache
[
3
+
8
*
6
+
2
*
8
*
i
]
=
nnz
[
left_block
[
8
+
0
+
2
*
i
]
-
2
+
4
*
4
];
nnz_cache
[
3
+
8
*
7
+
2
*
8
*
i
]
=
nnz
[
left_block
[
8
+
1
+
2
*
i
]
-
2
+
4
*
4
];
nnz_cache
[
3
+
8
*
11
+
2
*
8
*
i
]
=
nnz
[
left_block
[
8
+
0
+
2
*
i
]
-
2
+
8
*
4
];
...
...
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