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 @@
#include "libavutil/internal.h"
#include "libavutil/md5.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "bytestream.h"
......@@ -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 x1 = x0 + cb_size_split;
const int y1 = y0 + cb_size_split;
int more_data = 0;
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)
static int hevc_frame_start(HEVCContext *s)
{
HEVCLocalContext *lc = s->HEVClc;
HEVCLocalContext *lc = s->HEVClc;
int ret;
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)
ctb_addr_ts = hls_slice_data_wpp(s, nal, length);
else
ctb_addr_ts = hls_slice_data(s);
if (ctb_addr_ts >= (s->sps->ctb_width * s->sps->ctb_height)) {
s->is_decoded = 1;
if ((s->pps->transquant_bypass_enable_flag ||
......@@ -2380,12 +2379,12 @@ static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length)
if (length < 4) {
av_log(s->avctx, AV_LOG_ERROR, "No start code is found.\n");
ret = AVERROR_INVALIDDATA;
goto fail;
}
goto fail;
}
}
buf += 3;
length -= 3;
buf += 3;
length -= 3;
}
if (!s->is_nalff)
......
......@@ -33,7 +33,6 @@
#include "hevcpred.h"
#include "hevcdsp.h"
#include "internal.h"
#include "thread.h"
#include "videodsp.h"
......@@ -780,6 +779,7 @@ typedef struct HEVCContext {
AVFrame *sao_frame;
AVFrame *tmp_frame;
AVFrame *output_frame;
HEVCVPS *vps;
const HEVCSPS *sps;
HEVCPPS *pps;
......@@ -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.
*/
int ff_hevc_frame_nb_refs(HEVCContext *s);
int ff_hevc_set_new_ref(HEVCContext *s, AVFrame **frame, int poc);
/**
......
......@@ -278,7 +278,7 @@ static int hevc_parse(AVCodecParserContext *s,
parse_nal_units(s, avctx, buf, buf_size);
*poutbuf = buf;
*poutbuf = buf;
*poutbuf_size = buf_size;
return next;
}
......
......@@ -822,8 +822,7 @@ 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;
......@@ -1084,8 +1083,8 @@ int ff_hevc_decode_nal_pps(HEVCContext *s)
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;
pps->num_tile_columns - 1);
ret = AVERROR_INVALIDDATA;
goto err;
}
if (pps->num_tile_rows == 0 ||
......@@ -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));
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) {
ret = AVERROR(ENOMEM);
goto err;
}
ret = AVERROR(ENOMEM);
goto err;
}
for (ctb_addr_rs = 0; ctb_addr_rs < pic_area_in_ctbs; ctb_addr_rs++) {
int tb_x = ctb_addr_rs % sps->ctb_width;
......
......@@ -55,9 +55,9 @@ static void decode_nal_sei_frame_packing_arrangement(HEVCContext *s)
GetBitContext *gb = &s->HEVClc->gb;
int cancel, type, quincunx;
get_ue_golomb(gb); // frame_packing_arrangement_id
cancel = get_bits1(gb); // frame_packing_cancel_flag
if ( cancel == 0 )
get_ue_golomb(gb); // frame_packing_arrangement_id
cancel = get_bits1(gb); // frame_packing_cancel_flag
if (cancel == 0 )
{
type = get_bits(gb, 7); // frame_packing_arrangement_type
quincunx = get_bits1(gb); // quincunx_sampling_flag
......@@ -68,12 +68,12 @@ static void decode_nal_sei_frame_packing_arrangement(HEVCContext *s)
// frame0_self_contained_flag frame1_self_contained_flag
skip_bits(gb, 6);
if ( quincunx == 0 && type != 5 )
skip_bits(gb, 16); // frame[01]_grid_position_[xy]
skip_bits(gb, 8); // frame_packing_arrangement_reserved_byte
skip_bits1(gb); // frame_packing_arrangement_persistance_flag
if (quincunx == 0 && type != 5)
skip_bits(gb, 16); // frame[01]_grid_position_[xy]
skip_bits(gb, 8); // frame_packing_arrangement_reserved_byte
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)
......@@ -127,12 +127,12 @@ static int decode_nal_sei_message(HEVCContext *s)
av_log(s->avctx, AV_LOG_DEBUG, "Decoding SEI\n");
while (byte == 0xFF) {
byte = get_bits(gb, 8);
byte = get_bits(gb, 8);
payload_type += byte;
}
byte = 0xFF;
while (byte == 0xFF) {
byte = get_bits(gb, 8);
byte = get_bits(gb, 8);
payload_size += byte;
}
if (s->nal_unit_type == NAL_SEI_PREFIX) {
......@@ -145,7 +145,7 @@ static int decode_nal_sei_message(HEVCContext *s)
} else if (payload_type == 1){
int ret = decode_pic_timing(s);
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;
} else if (payload_type == 129){
active_parameter_sets(s);
......@@ -161,7 +161,7 @@ static int decode_nal_sei_message(HEVCContext *s)
decode_nal_sei_decoded_picture_hash(s, payload_size);
else {
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;
}
......
This diff is collapsed.
......@@ -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) {
int intra_hor_ver_dist_thresh[] = { 7, 1, 0 };
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]) {
int threshold = 1 << (BIT_DEPTH - 5);
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