mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 11:19:55 +00:00
Merge commit 'a062a55d37720abc8c704aa0e8682efd3cdc9c9b'
* commit 'a062a55d37720abc8c704aa0e8682efd3cdc9c9b': hevc_parser: fix standalone build with the hevc decoder disabled Conflicts: libavcodec/Makefile libavcodec/hevc.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
commit
5be07d0206
@ -287,7 +287,7 @@ OBJS-$(CONFIG_HAP_DECODER) += hapdec.o
|
||||
OBJS-$(CONFIG_HAP_ENCODER) += hapenc.o
|
||||
OBJS-$(CONFIG_HEVC_DECODER) += hevc.o hevc_mvs.o hevc_ps.o hevc_sei.o \
|
||||
hevc_cabac.o hevc_refs.o hevcpred.o \
|
||||
hevcdsp.o hevc_filter.o hevc_parse.o
|
||||
hevcdsp.o hevc_filter.o hevc_parse.o hevc_data.o
|
||||
OBJS-$(CONFIG_HEVC_QSV_ENCODER) += qsvenc_hevc.o hevc_ps_enc.o hevc_parse.o
|
||||
OBJS-$(CONFIG_HNM4_VIDEO_DECODER) += hnm4video.o
|
||||
OBJS-$(CONFIG_HQ_HQA_DECODER) += hq_hqa.o hq_hqadata.o hq_hqadsp.o \
|
||||
@ -832,7 +832,7 @@ OBJS-$(CONFIG_GSM_PARSER) += gsm_parser.o
|
||||
OBJS-$(CONFIG_H261_PARSER) += h261_parser.o
|
||||
OBJS-$(CONFIG_H263_PARSER) += h263_parser.o
|
||||
OBJS-$(CONFIG_H264_PARSER) += h264_parser.o
|
||||
OBJS-$(CONFIG_HEVC_PARSER) += hevc_parser.o hevc_parse.o
|
||||
OBJS-$(CONFIG_HEVC_PARSER) += hevc_parser.o hevc_parse.o hevc_ps.o hevc_data.o
|
||||
OBJS-$(CONFIG_MJPEG_PARSER) += mjpeg_parser.o
|
||||
OBJS-$(CONFIG_MLP_PARSER) += mlp_parser.o mlp.o
|
||||
OBJS-$(CONFIG_MPEG4VIDEO_PARSER) += mpeg4video_parser.o h263.o \
|
||||
|
@ -427,20 +427,6 @@ static const uint8_t diag_scan2x2_inv[2][2] = {
|
||||
{ 1, 3, },
|
||||
};
|
||||
|
||||
const uint8_t ff_hevc_diag_scan4x4_x[16] = {
|
||||
0, 0, 1, 0,
|
||||
1, 2, 0, 1,
|
||||
2, 3, 1, 2,
|
||||
3, 2, 3, 3,
|
||||
};
|
||||
|
||||
const uint8_t ff_hevc_diag_scan4x4_y[16] = {
|
||||
0, 1, 0, 2,
|
||||
1, 0, 3, 2,
|
||||
1, 0, 3, 2,
|
||||
1, 3, 2, 3,
|
||||
};
|
||||
|
||||
static const uint8_t diag_scan4x4_inv[4][4] = {
|
||||
{ 0, 2, 5, 9, },
|
||||
{ 1, 4, 8, 12, },
|
||||
@ -448,44 +434,6 @@ static const uint8_t diag_scan4x4_inv[4][4] = {
|
||||
{ 6, 10, 13, 15, },
|
||||
};
|
||||
|
||||
const uint8_t ff_hevc_diag_scan8x8_x[64] = {
|
||||
0, 0, 1, 0,
|
||||
1, 2, 0, 1,
|
||||
2, 3, 0, 1,
|
||||
2, 3, 4, 0,
|
||||
1, 2, 3, 4,
|
||||
5, 0, 1, 2,
|
||||
3, 4, 5, 6,
|
||||
0, 1, 2, 3,
|
||||
4, 5, 6, 7,
|
||||
1, 2, 3, 4,
|
||||
5, 6, 7, 2,
|
||||
3, 4, 5, 6,
|
||||
7, 3, 4, 5,
|
||||
6, 7, 4, 5,
|
||||
6, 7, 5, 6,
|
||||
7, 6, 7, 7,
|
||||
};
|
||||
|
||||
const uint8_t ff_hevc_diag_scan8x8_y[64] = {
|
||||
0, 1, 0, 2,
|
||||
1, 0, 3, 2,
|
||||
1, 0, 4, 3,
|
||||
2, 1, 0, 5,
|
||||
4, 3, 2, 1,
|
||||
0, 6, 5, 4,
|
||||
3, 2, 1, 0,
|
||||
7, 6, 5, 4,
|
||||
3, 2, 1, 0,
|
||||
7, 6, 5, 4,
|
||||
3, 2, 1, 7,
|
||||
6, 5, 4, 3,
|
||||
2, 7, 6, 5,
|
||||
4, 3, 7, 6,
|
||||
5, 4, 7, 6,
|
||||
5, 7, 6, 7,
|
||||
};
|
||||
|
||||
static const uint8_t diag_scan8x8_inv[8][8] = {
|
||||
{ 0, 2, 5, 9, 14, 20, 27, 35, },
|
||||
{ 1, 4, 8, 13, 19, 26, 34, 42, },
|
||||
|
75
libavcodec/hevc_data.c
Normal file
75
libavcodec/hevc_data.c
Normal file
@ -0,0 +1,75 @@
|
||||
/*
|
||||
* HEVC shared tables
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
* FFmpeg is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* FFmpeg is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with FFmpeg; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "hevc.h"
|
||||
|
||||
const uint8_t ff_hevc_diag_scan4x4_x[16] = {
|
||||
0, 0, 1, 0,
|
||||
1, 2, 0, 1,
|
||||
2, 3, 1, 2,
|
||||
3, 2, 3, 3,
|
||||
};
|
||||
|
||||
const uint8_t ff_hevc_diag_scan4x4_y[16] = {
|
||||
0, 1, 0, 2,
|
||||
1, 0, 3, 2,
|
||||
1, 0, 3, 2,
|
||||
1, 3, 2, 3,
|
||||
};
|
||||
|
||||
const uint8_t ff_hevc_diag_scan8x8_x[64] = {
|
||||
0, 0, 1, 0,
|
||||
1, 2, 0, 1,
|
||||
2, 3, 0, 1,
|
||||
2, 3, 4, 0,
|
||||
1, 2, 3, 4,
|
||||
5, 0, 1, 2,
|
||||
3, 4, 5, 6,
|
||||
0, 1, 2, 3,
|
||||
4, 5, 6, 7,
|
||||
1, 2, 3, 4,
|
||||
5, 6, 7, 2,
|
||||
3, 4, 5, 6,
|
||||
7, 3, 4, 5,
|
||||
6, 7, 4, 5,
|
||||
6, 7, 5, 6,
|
||||
7, 6, 7, 7,
|
||||
};
|
||||
|
||||
const uint8_t ff_hevc_diag_scan8x8_y[64] = {
|
||||
0, 1, 0, 2,
|
||||
1, 0, 3, 2,
|
||||
1, 0, 4, 3,
|
||||
2, 1, 0, 5,
|
||||
4, 3, 2, 1,
|
||||
0, 6, 5, 4,
|
||||
3, 2, 1, 0,
|
||||
7, 6, 5, 4,
|
||||
3, 2, 1, 0,
|
||||
7, 6, 5, 4,
|
||||
3, 2, 1, 7,
|
||||
6, 5, 4, 3,
|
||||
2, 7, 6, 5,
|
||||
4, 3, 7, 6,
|
||||
5, 4, 7, 6,
|
||||
5, 7, 6, 7,
|
||||
};
|
Loading…
Reference in New Issue
Block a user