Commit b23692b3 authored by Michael Niedermayer's avatar Michael Niedermayer

libavcodec/hevc: reduce whitespace differences to 064698d3

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1a6948fa
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include "libavutil/internal.h" #include "libavutil/internal.h"
#include "libavutil/md5.h" #include "libavutil/md5.h"
#include "libavutil/opt.h" #include "libavutil/opt.h"
#include "libavutil/pixdesc.h" #include "libavutil/pixdesc.h"
#include "bytestream.h" #include "bytestream.h"
...@@ -1705,6 +1704,7 @@ static int hls_coding_quadtree(HEVCContext *s, int x0, int y0, ...@@ -1705,6 +1704,7 @@ static int hls_coding_quadtree(HEVCContext *s, int x0, int y0,
const int cb_size_split = cb_size >> 1; const int cb_size_split = cb_size >> 1;
const int x1 = x0 + cb_size_split; const int x1 = x0 + cb_size_split;
const int y1 = y0 + cb_size_split; const int y1 = y0 + cb_size_split;
int more_data = 0; int more_data = 0;
more_data = hls_coding_quadtree(s, x0, y0, log2_cb_size - 1, cb_depth + 1); more_data = hls_coding_quadtree(s, x0, y0, log2_cb_size - 1, cb_depth + 1);
...@@ -2056,7 +2056,7 @@ static void restore_tqb_pixels(HEVCContext *s) ...@@ -2056,7 +2056,7 @@ static void restore_tqb_pixels(HEVCContext *s)
static int hevc_frame_start(HEVCContext *s) static int hevc_frame_start(HEVCContext *s)
{ {
HEVCLocalContext *lc = s->HEVClc; HEVCLocalContext *lc = s->HEVClc;
int ret; int ret;
memset(s->horizontal_bs, 0, 2 * s->bs_width * (s->bs_height + 1)); memset(s->horizontal_bs, 0, 2 * s->bs_width * (s->bs_height + 1));
...@@ -2209,7 +2209,6 @@ static int decode_nal_unit(HEVCContext *s, const uint8_t *nal, int length) ...@@ -2209,7 +2209,6 @@ static int decode_nal_unit(HEVCContext *s, const uint8_t *nal, int length)
ctb_addr_ts = hls_slice_data_wpp(s, nal, length); ctb_addr_ts = hls_slice_data_wpp(s, nal, length);
else else
ctb_addr_ts = hls_slice_data(s); ctb_addr_ts = hls_slice_data(s);
if (ctb_addr_ts >= (s->sps->ctb_width * s->sps->ctb_height)) { if (ctb_addr_ts >= (s->sps->ctb_width * s->sps->ctb_height)) {
s->is_decoded = 1; s->is_decoded = 1;
if ((s->pps->transquant_bypass_enable_flag || if ((s->pps->transquant_bypass_enable_flag ||
...@@ -2380,12 +2379,12 @@ static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length) ...@@ -2380,12 +2379,12 @@ static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length)
if (length < 4) { if (length < 4) {
av_log(s->avctx, AV_LOG_ERROR, "No start code is found.\n"); av_log(s->avctx, AV_LOG_ERROR, "No start code is found.\n");
ret = AVERROR_INVALIDDATA; ret = AVERROR_INVALIDDATA;
goto fail; goto fail;
} }
} }
buf += 3; buf += 3;
length -= 3; length -= 3;
} }
if (!s->is_nalff) if (!s->is_nalff)
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include "hevcpred.h" #include "hevcpred.h"
#include "hevcdsp.h" #include "hevcdsp.h"
#include "internal.h" #include "internal.h"
#include "thread.h" #include "thread.h"
#include "videodsp.h" #include "videodsp.h"
...@@ -780,6 +779,7 @@ typedef struct HEVCContext { ...@@ -780,6 +779,7 @@ typedef struct HEVCContext {
AVFrame *sao_frame; AVFrame *sao_frame;
AVFrame *tmp_frame; AVFrame *tmp_frame;
AVFrame *output_frame; AVFrame *output_frame;
HEVCVPS *vps; HEVCVPS *vps;
const HEVCSPS *sps; const HEVCSPS *sps;
HEVCPPS *pps; HEVCPPS *pps;
...@@ -952,6 +952,7 @@ int ff_hevc_transform_skip_flag_decode(HEVCContext *s, int c_idx); ...@@ -952,6 +952,7 @@ int ff_hevc_transform_skip_flag_decode(HEVCContext *s, int c_idx);
* Get the number of candidate references for the current frame. * Get the number of candidate references for the current frame.
*/ */
int ff_hevc_frame_nb_refs(HEVCContext *s); int ff_hevc_frame_nb_refs(HEVCContext *s);
int ff_hevc_set_new_ref(HEVCContext *s, AVFrame **frame, int poc); int ff_hevc_set_new_ref(HEVCContext *s, AVFrame **frame, int poc);
/** /**
......
...@@ -278,7 +278,7 @@ static int hevc_parse(AVCodecParserContext *s, ...@@ -278,7 +278,7 @@ static int hevc_parse(AVCodecParserContext *s,
parse_nal_units(s, avctx, buf, buf_size); parse_nal_units(s, avctx, buf, buf_size);
*poutbuf = buf; *poutbuf = buf;
*poutbuf_size = buf_size; *poutbuf_size = buf_size;
return next; return next;
} }
......
...@@ -822,8 +822,7 @@ int ff_hevc_decode_nal_sps(HEVCContext *s) ...@@ -822,8 +822,7 @@ int ff_hevc_decode_nal_sps(HEVCContext *s)
sps->nb_st_rps = get_ue_golomb_long(gb); sps->nb_st_rps = get_ue_golomb_long(gb);
if (sps->nb_st_rps > MAX_SHORT_TERM_RPS_COUNT) { if (sps->nb_st_rps > MAX_SHORT_TERM_RPS_COUNT) {
av_log(s->avctx, AV_LOG_ERROR, av_log(s->avctx, AV_LOG_ERROR, "Too many short term RPS: %d.\n",
"Too many short term RPS: %d.\n",
sps->nb_st_rps); sps->nb_st_rps);
ret = AVERROR_INVALIDDATA; ret = AVERROR_INVALIDDATA;
goto err; goto err;
...@@ -1084,8 +1083,8 @@ int ff_hevc_decode_nal_pps(HEVCContext *s) ...@@ -1084,8 +1083,8 @@ int ff_hevc_decode_nal_pps(HEVCContext *s)
if (pps->num_tile_columns == 0 || if (pps->num_tile_columns == 0 ||
pps->num_tile_columns >= sps->width) { pps->num_tile_columns >= sps->width) {
av_log(s->avctx, AV_LOG_ERROR, "num_tile_columns_minus1 out of range: %d\n", av_log(s->avctx, AV_LOG_ERROR, "num_tile_columns_minus1 out of range: %d\n",
pps->num_tile_columns - 1); pps->num_tile_columns - 1);
ret = AVERROR_INVALIDDATA; ret = AVERROR_INVALIDDATA;
goto err; goto err;
} }
if (pps->num_tile_rows == 0 || if (pps->num_tile_rows == 0 ||
...@@ -1233,9 +1232,9 @@ int ff_hevc_decode_nal_pps(HEVCContext *s) ...@@ -1233,9 +1232,9 @@ int ff_hevc_decode_nal_pps(HEVCContext *s)
pps->min_tb_addr_zs = av_malloc_array(pic_area_in_min_tbs, sizeof(*pps->min_tb_addr_zs)); pps->min_tb_addr_zs = av_malloc_array(pic_area_in_min_tbs, sizeof(*pps->min_tb_addr_zs));
if (!pps->ctb_addr_rs_to_ts || !pps->ctb_addr_ts_to_rs || if (!pps->ctb_addr_rs_to_ts || !pps->ctb_addr_ts_to_rs ||
!pps->tile_id || !pps->min_cb_addr_zs || !pps->min_tb_addr_zs) { !pps->tile_id || !pps->min_cb_addr_zs || !pps->min_tb_addr_zs) {
ret = AVERROR(ENOMEM); ret = AVERROR(ENOMEM);
goto err; goto err;
} }
for (ctb_addr_rs = 0; ctb_addr_rs < pic_area_in_ctbs; ctb_addr_rs++) { for (ctb_addr_rs = 0; ctb_addr_rs < pic_area_in_ctbs; ctb_addr_rs++) {
int tb_x = ctb_addr_rs % sps->ctb_width; int tb_x = ctb_addr_rs % sps->ctb_width;
......
...@@ -55,9 +55,9 @@ static void decode_nal_sei_frame_packing_arrangement(HEVCContext *s) ...@@ -55,9 +55,9 @@ static void decode_nal_sei_frame_packing_arrangement(HEVCContext *s)
GetBitContext *gb = &s->HEVClc->gb; GetBitContext *gb = &s->HEVClc->gb;
int cancel, type, quincunx; int cancel, type, quincunx;
get_ue_golomb(gb); // frame_packing_arrangement_id get_ue_golomb(gb); // frame_packing_arrangement_id
cancel = get_bits1(gb); // frame_packing_cancel_flag cancel = get_bits1(gb); // frame_packing_cancel_flag
if ( cancel == 0 ) if (cancel == 0 )
{ {
type = get_bits(gb, 7); // frame_packing_arrangement_type type = get_bits(gb, 7); // frame_packing_arrangement_type
quincunx = get_bits1(gb); // quincunx_sampling_flag quincunx = get_bits1(gb); // quincunx_sampling_flag
...@@ -68,12 +68,12 @@ static void decode_nal_sei_frame_packing_arrangement(HEVCContext *s) ...@@ -68,12 +68,12 @@ static void decode_nal_sei_frame_packing_arrangement(HEVCContext *s)
// frame0_self_contained_flag frame1_self_contained_flag // frame0_self_contained_flag frame1_self_contained_flag
skip_bits(gb, 6); skip_bits(gb, 6);
if ( quincunx == 0 && type != 5 ) if (quincunx == 0 && type != 5)
skip_bits(gb, 16); // frame[01]_grid_position_[xy] skip_bits(gb, 16); // frame[01]_grid_position_[xy]
skip_bits(gb, 8); // frame_packing_arrangement_reserved_byte skip_bits(gb, 8); // frame_packing_arrangement_reserved_byte
skip_bits1(gb); // frame_packing_arrangement_persistance_flag skip_bits1(gb); // frame_packing_arrangement_persistance_flag
} }
skip_bits1(gb); // upsampled_aspect_ratio_flag skip_bits1(gb); // upsampled_aspect_ratio_flag
} }
static int decode_pic_timing(HEVCContext *s) static int decode_pic_timing(HEVCContext *s)
...@@ -127,12 +127,12 @@ static int decode_nal_sei_message(HEVCContext *s) ...@@ -127,12 +127,12 @@ static int decode_nal_sei_message(HEVCContext *s)
av_log(s->avctx, AV_LOG_DEBUG, "Decoding SEI\n"); av_log(s->avctx, AV_LOG_DEBUG, "Decoding SEI\n");
while (byte == 0xFF) { while (byte == 0xFF) {
byte = get_bits(gb, 8); byte = get_bits(gb, 8);
payload_type += byte; payload_type += byte;
} }
byte = 0xFF; byte = 0xFF;
while (byte == 0xFF) { while (byte == 0xFF) {
byte = get_bits(gb, 8); byte = get_bits(gb, 8);
payload_size += byte; payload_size += byte;
} }
if (s->nal_unit_type == NAL_SEI_PREFIX) { if (s->nal_unit_type == NAL_SEI_PREFIX) {
...@@ -145,7 +145,7 @@ static int decode_nal_sei_message(HEVCContext *s) ...@@ -145,7 +145,7 @@ static int decode_nal_sei_message(HEVCContext *s)
} else if (payload_type == 1){ } else if (payload_type == 1){
int ret = decode_pic_timing(s); int ret = decode_pic_timing(s);
av_log(s->avctx, AV_LOG_DEBUG, "Skipped PREFIX SEI %d\n", payload_type); av_log(s->avctx, AV_LOG_DEBUG, "Skipped PREFIX SEI %d\n", payload_type);
skip_bits(gb, 8*payload_size); skip_bits(gb, 8 * payload_size);
return ret; return ret;
} else if (payload_type == 129){ } else if (payload_type == 129){
active_parameter_sets(s); active_parameter_sets(s);
...@@ -161,7 +161,7 @@ static int decode_nal_sei_message(HEVCContext *s) ...@@ -161,7 +161,7 @@ static int decode_nal_sei_message(HEVCContext *s)
decode_nal_sei_decoded_picture_hash(s, payload_size); decode_nal_sei_decoded_picture_hash(s, payload_size);
else { else {
av_log(s->avctx, AV_LOG_DEBUG, "Skipped SUFFIX SEI %d\n", payload_type); av_log(s->avctx, AV_LOG_DEBUG, "Skipped SUFFIX SEI %d\n", payload_type);
skip_bits(gb, 8*payload_size); skip_bits(gb, 8 * payload_size);
} }
return 1; return 1;
} }
......
This diff is collapsed.
...@@ -310,7 +310,7 @@ static void FUNC(intra_pred)(HEVCContext *s, int x0, int y0, int log2_size, int ...@@ -310,7 +310,7 @@ static void FUNC(intra_pred)(HEVCContext *s, int x0, int y0, int log2_size, int
if (c_idx == 0 && mode != INTRA_DC && size != 4) { if (c_idx == 0 && mode != INTRA_DC && size != 4) {
int intra_hor_ver_dist_thresh[] = { 7, 1, 0 }; int intra_hor_ver_dist_thresh[] = { 7, 1, 0 };
int min_dist_vert_hor = FFMIN(FFABS((int)(mode - 26U)), int min_dist_vert_hor = FFMIN(FFABS((int)(mode - 26U)),
FFABS((int)(mode - 10U))); FFABS((int)(mode - 10U)));
if (min_dist_vert_hor > intra_hor_ver_dist_thresh[log2_size - 3]) { if (min_dist_vert_hor > intra_hor_ver_dist_thresh[log2_size - 3]) {
int threshold = 1 << (BIT_DEPTH - 5); int threshold = 1 << (BIT_DEPTH - 5);
if (s->sps->sps_strong_intra_smoothing_enable_flag && if (s->sps->sps_strong_intra_smoothing_enable_flag &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment