mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/cavs: Only keep what is needed from IDCTDSP-API
Namely ScanTable.permutated. The rest of the IDCTDSP-API is unused as cavs has its own idct. Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
b1bcff3ac0
commit
250d556343
@ -792,15 +792,14 @@ int ff_cavs_init_top_lines(AVSContext *h)
|
|||||||
av_cold int ff_cavs_init(AVCodecContext *avctx)
|
av_cold int ff_cavs_init(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
AVSContext *h = avctx->priv_data;
|
AVSContext *h = avctx->priv_data;
|
||||||
|
uint8_t permutation[64];
|
||||||
|
|
||||||
ff_blockdsp_init(&h->bdsp);
|
ff_blockdsp_init(&h->bdsp);
|
||||||
ff_h264chroma_init(&h->h264chroma, 8);
|
ff_h264chroma_init(&h->h264chroma, 8);
|
||||||
ff_idctdsp_init(&h->idsp, avctx);
|
|
||||||
ff_videodsp_init(&h->vdsp, 8);
|
ff_videodsp_init(&h->vdsp, 8);
|
||||||
ff_cavsdsp_init(&h->cdsp);
|
ff_cavsdsp_init(&h->cdsp);
|
||||||
ff_init_scantable_permutation(h->idsp.idct_permutation,
|
ff_init_scantable_permutation(permutation, h->cdsp.idct_perm);
|
||||||
h->cdsp.idct_perm);
|
ff_permute_scantable(h->permutated_scantable, ff_zigzag_direct, permutation);
|
||||||
ff_init_scantable(h->idsp.idct_permutation, &h->scantable, ff_zigzag_direct);
|
|
||||||
|
|
||||||
h->avctx = avctx;
|
h->avctx = avctx;
|
||||||
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
|
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
|
||||||
|
@ -22,12 +22,16 @@
|
|||||||
#ifndef AVCODEC_CAVS_H
|
#ifndef AVCODEC_CAVS_H
|
||||||
#define AVCODEC_CAVS_H
|
#define AVCODEC_CAVS_H
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "libavutil/frame.h"
|
||||||
#include "libavutil/mem_internal.h"
|
#include "libavutil/mem_internal.h"
|
||||||
|
|
||||||
|
#include "avcodec.h"
|
||||||
#include "cavsdsp.h"
|
#include "cavsdsp.h"
|
||||||
#include "blockdsp.h"
|
#include "blockdsp.h"
|
||||||
#include "h264chroma.h"
|
#include "h264chroma.h"
|
||||||
#include "idctdsp.h"
|
|
||||||
#include "get_bits.h"
|
#include "get_bits.h"
|
||||||
#include "videodsp.h"
|
#include "videodsp.h"
|
||||||
|
|
||||||
@ -166,7 +170,6 @@ typedef struct AVSContext {
|
|||||||
AVCodecContext *avctx;
|
AVCodecContext *avctx;
|
||||||
BlockDSPContext bdsp;
|
BlockDSPContext bdsp;
|
||||||
H264ChromaContext h264chroma;
|
H264ChromaContext h264chroma;
|
||||||
IDCTDSPContext idsp;
|
|
||||||
VideoDSPContext vdsp;
|
VideoDSPContext vdsp;
|
||||||
CAVSDSPContext cdsp;
|
CAVSDSPContext cdsp;
|
||||||
GetBitContext gb;
|
GetBitContext gb;
|
||||||
@ -220,7 +223,7 @@ typedef struct AVSContext {
|
|||||||
int qp_fixed;
|
int qp_fixed;
|
||||||
int pic_qp_fixed;
|
int pic_qp_fixed;
|
||||||
int cbp;
|
int cbp;
|
||||||
ScanTable scantable;
|
uint8_t permutated_scantable[64];
|
||||||
|
|
||||||
/** intra prediction is done with un-deblocked samples
|
/** intra prediction is done with un-deblocked samples
|
||||||
they are saved here before deblocking the MB */
|
they are saved here before deblocking the MB */
|
||||||
|
@ -521,7 +521,7 @@ static inline int dequant(AVSContext *h, int16_t *level_buf, uint8_t *run_buf,
|
|||||||
{
|
{
|
||||||
int round = 1 << (shift - 1);
|
int round = 1 << (shift - 1);
|
||||||
int pos = -1;
|
int pos = -1;
|
||||||
const uint8_t *scantab = h->scantable.permutated;
|
const uint8_t *scantab = h->permutated_scantable;
|
||||||
|
|
||||||
/* inverse scan and dequantization */
|
/* inverse scan and dequantization */
|
||||||
while (--coeff_num >= 0) {
|
while (--coeff_num >= 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user