[FFmpeg-devel] [PATCH 5/7] hevc: reindent after previous commit
Hendrik Leppkes
h.leppkes at gmail.com
Sat Jan 24 15:26:19 CET 2015
---
libavcodec/hevc.c | 38 +++++++++++++++++++-------------------
libavcodec/hevc_refs.c | 24 ++++++++++++------------
2 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index 8e686c6..8bf9562 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -2703,18 +2703,18 @@ static int decode_nal_unit(HEVCContext *s, const HEVCNAL *nal)
if (ret < 0)
goto fail;
} else {
- if (s->threads_number > 1 && s->sh.num_entry_point_offsets > 0)
- ctb_addr_ts = hls_slice_data_wpp(s, nal->data, nal->size);
- 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->threads_number > 1 && s->sh.num_entry_point_offsets > 0)
+ ctb_addr_ts = hls_slice_data_wpp(s, nal->data, nal->size);
+ 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 (ctb_addr_ts < 0) {
- ret = ctb_addr_ts;
- goto fail;
- }
+ if (ctb_addr_ts < 0) {
+ ret = ctb_addr_ts;
+ goto fail;
+ }
}
break;
case NAL_EOS_NUT:
@@ -3072,16 +3072,16 @@ static int hevc_decode_frame(AVCodecContext *avctx, void *data, int *got_output,
av_log(avctx, AV_LOG_ERROR,
"hardware accelerator failed to decode picture\n");
} else {
- /* verify the SEI checksum */
- if (avctx->err_recognition & AV_EF_CRCCHECK && s->is_decoded &&
- s->is_md5) {
- ret = verify_md5(s, s->ref->frame);
- if (ret < 0 && avctx->err_recognition & AV_EF_EXPLODE) {
- ff_hevc_unref_frame(s, s->ref, ~0);
- return ret;
+ /* verify the SEI checksum */
+ if (avctx->err_recognition & AV_EF_CRCCHECK && s->is_decoded &&
+ s->is_md5) {
+ ret = verify_md5(s, s->ref->frame);
+ if (ret < 0 && avctx->err_recognition & AV_EF_EXPLODE) {
+ ff_hevc_unref_frame(s, s->ref, ~0);
+ return ret;
+ }
}
}
- }
s->is_md5 = 0;
if (s->is_decoded) {
diff --git a/libavcodec/hevc_refs.c b/libavcodec/hevc_refs.c
index 7c7798f..acf1d26 100644
--- a/libavcodec/hevc_refs.c
+++ b/libavcodec/hevc_refs.c
@@ -406,18 +406,18 @@ static HEVCFrame *generate_missing_ref(HEVCContext *s, int poc)
return NULL;
if (!s->avctx->hwaccel) {
- if (!s->sps->pixel_shift) {
- for (i = 0; frame->frame->buf[i]; i++)
- memset(frame->frame->buf[i]->data, 1 << (s->sps->bit_depth - 1),
- frame->frame->buf[i]->size);
- } else {
- for (i = 0; frame->frame->data[i]; i++)
- for (y = 0; y < (s->sps->height >> s->sps->vshift[i]); y++)
- for (x = 0; x < (s->sps->width >> s->sps->hshift[i]); x++) {
- AV_WN16(frame->frame->data[i] + y * frame->frame->linesize[i] + 2 * x,
- 1 << (s->sps->bit_depth - 1));
- }
- }
+ if (!s->sps->pixel_shift) {
+ for (i = 0; frame->frame->buf[i]; i++)
+ memset(frame->frame->buf[i]->data, 1 << (s->sps->bit_depth - 1),
+ frame->frame->buf[i]->size);
+ } else {
+ for (i = 0; frame->frame->data[i]; i++)
+ for (y = 0; y < (s->sps->height >> s->sps->vshift[i]); y++)
+ for (x = 0; x < (s->sps->width >> s->sps->hshift[i]); x++) {
+ AV_WN16(frame->frame->data[i] + y * frame->frame->linesize[i] + 2 * x,
+ 1 << (s->sps->bit_depth - 1));
+ }
+ }
}
frame->poc = poc;
--
1.9.5.msysgit.0
More information about the ffmpeg-devel
mailing list