diff options
author | Mickaƫl Raulet <mraulet@insa-rennes.fr> | 2014-07-14 16:57:45 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-15 13:25:55 +0200 |
commit | f5beda3bfd753d1fc9488583eb8be7510a333ea0 (patch) | |
tree | 505295a4493478808cc21deb43e511d34f625ea3 /libavcodec/hevc.c | |
parent | 1241eb88704f75fe9e7d1de3663aa24d4318cdab (diff) | |
download | ffmpeg-f5beda3bfd753d1fc9488583eb8be7510a333ea0.tar.gz |
hevc: move restore_tqb where it should be.
(cherry picked from commit 8fafc96a9805d11bfe32537c8f78a294a5844065)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevc.c')
-rw-r--r-- | libavcodec/hevc.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 00db01e9f9..e4e5a07eed 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -2286,33 +2286,6 @@ static int hls_nal_unit(HEVCContext *s) return nuh_layer_id == 0; } -static void restore_tqb_pixels(HEVCContext *s) -{ - int min_pu_size = 1 << s->sps->log2_min_pu_size; - int x, y, c_idx; - - for (c_idx = 0; c_idx < 3; c_idx++) { - ptrdiff_t stride = s->frame->linesize[c_idx]; - int hshift = s->sps->hshift[c_idx]; - int vshift = s->sps->vshift[c_idx]; - for (y = 0; y < s->sps->min_pu_height; y++) { - for (x = 0; x < s->sps->min_pu_width; x++) { - if (s->is_pcm[y * s->sps->min_pu_width + x]) { - int n; - int len = min_pu_size >> hshift; - uint8_t *src = &s->frame->data[c_idx][((y << s->sps->log2_min_pu_size) >> vshift) * stride + (((x << s->sps->log2_min_pu_size) >> hshift) << s->sps->pixel_shift)]; - uint8_t *dst = &s->sao_frame->data[c_idx][((y << s->sps->log2_min_pu_size) >> vshift) * stride + (((x << s->sps->log2_min_pu_size) >> hshift) << s->sps->pixel_shift)]; - for (n = 0; n < (min_pu_size >> vshift); n++) { - memcpy(dst, src, len); - src += stride; - dst += stride; - } - } - } - } - } -} - static int set_side_data(HEVCContext *s) { AVFrame *out = s->ref->frame; @@ -2528,10 +2501,6 @@ static int decode_nal_unit(HEVCContext *s, const uint8_t *nal, int length) 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 || - (s->sps->pcm.loop_filter_disable_flag && s->sps->pcm_enabled_flag)) && - s->sps->sao_enabled) - restore_tqb_pixels(s); } if (ctb_addr_ts < 0) { |