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
ce7f1c76
Commit
ce7f1c76
authored
Nov 02, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/hevc: more whitespaces to reduce difference to
064698d3
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
641358ad
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
33 additions
and
27 deletions
+33
-27
hevc.c
libavcodec/hevc.c
+1
-0
hevc.h
libavcodec/hevc.h
+2
-1
hevc_cabac.c
libavcodec/hevc_cabac.c
+1
-2
hevc_filter.c
libavcodec/hevc_filter.c
+1
-0
hevc_parser.c
libavcodec/hevc_parser.c
+1
-1
hevc_ps.c
libavcodec/hevc_ps.c
+22
-21
hevcdsp.c
libavcodec/hevcdsp.c
+2
-2
hevcpred.c
libavcodec/hevcpred.c
+1
-0
hevcpred_template.c
libavcodec/hevcpred_template.c
+2
-0
No files found.
libavcodec/hevc.c
View file @
ce7f1c76
...
...
@@ -29,6 +29,7 @@
#include "libavutil/internal.h"
#include "libavutil/md5.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "bytestream.h"
...
...
libavcodec/hevc.h
View file @
ce7f1c76
...
...
@@ -33,6 +33,7 @@
#include "hevcpred.h"
#include "hevcdsp.h"
#include "internal.h"
#include "thread.h"
#include "videodsp.h"
...
...
@@ -951,7 +952,6 @@ int ff_hevc_transform_skip_flag_decode(HEVCContext *s, int c_idx);
* Get the number of candidate references for the current frame.
*/
int
ff_hevc_frame_nb_refs
(
HEVCContext
*
s
);
int
ff_hevc_set_new_ref
(
HEVCContext
*
s
,
AVFrame
**
frame
,
int
poc
);
/**
...
...
@@ -981,6 +981,7 @@ int ff_hevc_cu_qp_delta_sign_flag(HEVCContext *s);
int
ff_hevc_cu_qp_delta_abs
(
HEVCContext
*
s
);
void
ff_hevc_hls_filter
(
HEVCContext
*
s
,
int
x
,
int
y
);
void
ff_hevc_hls_filters
(
HEVCContext
*
s
,
int
x_ctb
,
int
y_ctb
,
int
ctb_size
);
void
ff_hevc_hls_residual_coding
(
HEVCContext
*
s
,
int
x0
,
int
y0
,
int
log2_trafo_size
,
enum
ScanType
scan_idx
,
int
c_idx
);
...
...
libavcodec/hevc_cabac.c
View file @
ce7f1c76
...
...
@@ -320,8 +320,7 @@ static const uint8_t init_values[3][HEVC_CONTEXTS] = {
154
,
196
,
167
,
167
,
154
,
152
,
167
,
182
,
182
,
134
,
149
,
136
,
153
,
121
,
136
,
122
,
169
,
208
,
166
,
167
,
154
,
152
,
167
,
182
,
// coeff_abs_level_greater2_flag
107
,
167
,
91
,
107
,
107
,
167
,
},
107
,
167
,
91
,
107
,
107
,
167
,
},
};
static
const
uint8_t
scan_1x1
[
1
]
=
{
...
...
libavcodec/hevc_filter.c
View file @
ce7f1c76
...
...
@@ -28,6 +28,7 @@
#include "cabac_functions.h"
#include "golomb.h"
#include "hevc.h"
#include "bit_depth_template.c"
#define LUMA 0
...
...
libavcodec/hevc_parser.c
View file @
ce7f1c76
...
...
@@ -300,9 +300,9 @@ static int hevc_split(AVCodecContext *avctx, const uint8_t *buf, int buf_size)
return
i
-
3
;
}
else
{
// no parameter set at the beginning of the stream
return
0
;
}
}
}
}
return
0
;
}
...
...
libavcodec/hevc_ps.c
View file @
ce7f1c76
...
...
@@ -822,12 +822,12 @@ int ff_hevc_decode_nal_sps(HEVCContext *s)
sps
->
nb_st_rps
=
get_ue_golomb_long
(
gb
);
if
(
sps
->
nb_st_rps
>
MAX_SHORT_TERM_RPS_COUNT
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Too many short term RPS: %d.
\n
"
,
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Too many short term RPS: %d.
\n
"
,
sps
->
nb_st_rps
);
ret
=
AVERROR_INVALIDDATA
;
goto
err
;
}
goto
err
;
}
for
(
i
=
0
;
i
<
sps
->
nb_st_rps
;
i
++
)
{
if
((
ret
=
ff_hevc_decode_short_term_rps
(
s
,
&
sps
->
st_rps
[
i
],
sps
,
0
))
<
0
)
...
...
@@ -873,9 +873,10 @@ int ff_hevc_decode_nal_sps(HEVCContext *s)
sps
->
output_width
,
sps
->
output_height
);
if
(
s
->
avctx
->
err_recognition
&
AV_EF_EXPLODE
)
{
ret
=
AVERROR_INVALIDDATA
;
goto
err
;
}
av_log
(
s
->
avctx
,
AV_LOG_WARNING
,
"Displaying the whole video surface.
\n
"
);
goto
err
;
}
av_log
(
s
->
avctx
,
AV_LOG_WARNING
,
"Displaying the whole video surface.
\n
"
);
sps
->
pic_conf_win
.
left_offset
=
sps
->
pic_conf_win
.
right_offset
=
sps
->
pic_conf_win
.
top_offset
=
...
...
@@ -1018,8 +1019,8 @@ int ff_hevc_decode_nal_pps(HEVCContext *s)
if
(
pps_id
>=
MAX_PPS_COUNT
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"PPS id out of range: %d
\n
"
,
pps_id
);
ret
=
AVERROR_INVALIDDATA
;
goto
err
;
}
goto
err
;
}
pps
->
sps_id
=
get_ue_golomb_long
(
gb
);
if
(
pps
->
sps_id
>=
MAX_SPS_COUNT
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"SPS id out of range: %d
\n
"
,
pps
->
sps_id
);
...
...
@@ -1082,11 +1083,11 @@ int ff_hevc_decode_nal_pps(HEVCContext *s)
pps
->
num_tile_rows
=
get_ue_golomb_long
(
gb
)
+
1
;
if
(
pps
->
num_tile_columns
==
0
||
pps
->
num_tile_columns
>=
sps
->
width
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"num_tile_columns_minus1 out of range: %d
\n
"
,
pps
->
num_tile_columns
-
1
);
ret
=
AVERROR_INVALIDDATA
;
goto
err
;
}
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"num_tile_columns_minus1 out of range: %d
\n
"
,
pps
->
num_tile_columns
-
1
);
ret
=
AVERROR_INVALIDDATA
;
goto
err
;
}
if
(
pps
->
num_tile_rows
==
0
||
pps
->
num_tile_rows
>=
sps
->
height
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"num_tile_rows_minus1 out of range: %d
\n
"
,
...
...
@@ -1112,8 +1113,8 @@ int ff_hevc_decode_nal_pps(HEVCContext *s)
if
(
sum
>=
sps
->
ctb_width
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Invalid tile widths.
\n
"
);
ret
=
AVERROR_INVALIDDATA
;
goto
err
;
}
goto
err
;
}
pps
->
column_width
[
pps
->
num_tile_columns
-
1
]
=
sps
->
ctb_width
-
sum
;
sum
=
0
;
...
...
@@ -1168,8 +1169,8 @@ int ff_hevc_decode_nal_pps(HEVCContext *s)
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"log2_parallel_merge_level_minus2 out of range: %d
\n
"
,
pps
->
log2_parallel_merge_level
-
2
);
ret
=
AVERROR_INVALIDDATA
;
goto
err
;
}
goto
err
;
}
pps
->
slice_header_extension_present_flag
=
get_bits1
(
gb
);
pps
->
pps_extension_flag
=
get_bits1
(
gb
);
...
...
@@ -1189,9 +1190,9 @@ int ff_hevc_decode_nal_pps(HEVCContext *s)
pps
->
row_height
=
av_malloc_array
(
pps
->
num_tile_rows
,
sizeof
(
*
pps
->
row_height
));
}
if
(
!
pps
->
column_width
||
!
pps
->
row_height
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
err
;
}
ret
=
AVERROR
(
ENOMEM
);
goto
err
;
}
for
(
i
=
0
;
i
<
pps
->
num_tile_columns
;
i
++
)
{
pps
->
column_width
[
i
]
=
((
i
+
1
)
*
sps
->
ctb_width
)
/
pps
->
num_tile_columns
-
...
...
libavcodec/hevcdsp.c
View file @
ce7f1c76
...
...
@@ -161,13 +161,13 @@ void ff_hevc_dsp_init(HEVCDSPContext *hevcdsp, int bit_depth)
hevcdsp->put_hevc_epel[0][1] = FUNC(put_hevc_epel_h, depth); \
hevcdsp->put_hevc_epel[1][0] = FUNC(put_hevc_epel_v, depth); \
hevcdsp->put_hevc_epel[1][1] = FUNC(put_hevc_epel_hv, depth); \
\
\
\
hevcdsp->put_unweighted_pred = FUNC(put_unweighted_pred, depth); \
hevcdsp->put_weighted_pred_avg = FUNC(put_weighted_pred_avg, depth); \
\
hevcdsp->weighted_pred = FUNC(weighted_pred, depth); \
hevcdsp->weighted_pred_avg = FUNC(weighted_pred_avg, depth);
\
hevcdsp->weighted_pred_avg = FUNC(weighted_pred_avg, depth); \
hevcdsp->hevc_h_loop_filter_luma = FUNC(hevc_h_loop_filter_luma, depth); \
hevcdsp->hevc_v_loop_filter_luma = FUNC(hevc_v_loop_filter_luma, depth); \
hevcdsp->hevc_h_loop_filter_chroma = FUNC(hevc_h_loop_filter_chroma, depth); \
...
...
libavcodec/hevcpred.c
View file @
ce7f1c76
...
...
@@ -21,6 +21,7 @@
*/
#include "hevc.h"
#include "hevcpred.h"
#define BIT_DEPTH 8
...
...
libavcodec/hevcpred_template.c
View file @
ce7f1c76
...
...
@@ -21,6 +21,7 @@
*/
#include "libavutil/pixdesc.h"
#include "bit_depth_template.c"
#include "hevcpred.h"
...
...
@@ -557,4 +558,5 @@ static void FUNC(pred_angular_3)(uint8_t *src, const uint8_t *top,
{
FUNC
(
pred_angular
)(
src
,
top
,
left
,
stride
,
c_idx
,
mode
,
1
<<
5
);
}
#undef POS
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