mirror of https://github.com/FFmpeg/FFmpeg.git
Compare commits
No commits in common. "8e90f150ebccf3f30fe139245b7d22fd6f1ee4a9" and "a677b382981a599f85943c14d6b0b5f253de7ec7" have entirely different histories.
8e90f150eb
...
a677b38298
|
|
@ -36,7 +36,6 @@
|
|||
/ffprobe
|
||||
/config.asm
|
||||
/config.h
|
||||
/config_components.asm
|
||||
/config_components.h
|
||||
/coverage.info
|
||||
/lcov/
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ OBJS = ac3_parser.o \
|
|||
get_buffer.o \
|
||||
imgconvert.o \
|
||||
jni.o \
|
||||
lcevcdec.o \
|
||||
mathtables.o \
|
||||
mediacodec.o \
|
||||
mpeg12framerate.o \
|
||||
|
|
@ -129,7 +130,6 @@ OBJS-$(CONFIG_IVIDSP) += ivi_dsp.o
|
|||
OBJS-$(CONFIG_JNI) += ffjni.o jni.o
|
||||
OBJS-$(CONFIG_JPEGTABLES) += jpegtables.o
|
||||
OBJS-$(CONFIG_LCMS2) += fflcms2.o
|
||||
OBJS-$(CONFIG_LIBLCEVC_DEC) += lcevcdec.o
|
||||
OBJS-$(CONFIG_LLAUDDSP) += lossless_audiodsp.o
|
||||
OBJS-$(CONFIG_LLVIDDSP) += lossless_videodsp.o
|
||||
OBJS-$(CONFIG_LLVIDENCDSP) += lossless_videoencdsp.o
|
||||
|
|
|
|||
|
|
@ -94,14 +94,10 @@ typedef struct DecodeContext {
|
|||
*/
|
||||
uint64_t side_data_pref_mask;
|
||||
|
||||
#if CONFIG_LIBLCEVC_DEC
|
||||
struct {
|
||||
FFLCEVCContext *ctx;
|
||||
int frame;
|
||||
int width;
|
||||
int height;
|
||||
} lcevc;
|
||||
#endif
|
||||
FFLCEVCContext *lcevc;
|
||||
int lcevc_frame;
|
||||
int width;
|
||||
int height;
|
||||
} DecodeContext;
|
||||
|
||||
static DecodeContext *decode_ctx(AVCodecInternal *avci)
|
||||
|
|
@ -1662,29 +1658,26 @@ int ff_attach_decode_data(AVFrame *frame)
|
|||
|
||||
static void update_frame_props(AVCodecContext *avctx, AVFrame *frame)
|
||||
{
|
||||
#if CONFIG_LIBLCEVC_DEC
|
||||
AVCodecInternal *avci = avctx->internal;
|
||||
DecodeContext *dc = decode_ctx(avci);
|
||||
|
||||
dc->lcevc.frame = dc->lcevc.ctx && avctx->codec_type == AVMEDIA_TYPE_VIDEO &&
|
||||
dc->lcevc_frame = dc->lcevc && avctx->codec_type == AVMEDIA_TYPE_VIDEO &&
|
||||
av_frame_get_side_data(frame, AV_FRAME_DATA_LCEVC);
|
||||
|
||||
if (dc->lcevc.frame) {
|
||||
dc->lcevc.width = frame->width;
|
||||
dc->lcevc.height = frame->height;
|
||||
if (dc->lcevc_frame) {
|
||||
dc->width = frame->width;
|
||||
dc->height = frame->height;
|
||||
frame->width = frame->width * 2 / FFMAX(frame->sample_aspect_ratio.den, 1);
|
||||
frame->height = frame->height * 2 / FFMAX(frame->sample_aspect_ratio.num, 1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static int attach_post_process_data(AVCodecContext *avctx, AVFrame *frame)
|
||||
{
|
||||
#if CONFIG_LIBLCEVC_DEC
|
||||
AVCodecInternal *avci = avctx->internal;
|
||||
DecodeContext *dc = decode_ctx(avci);
|
||||
|
||||
if (dc->lcevc.frame) {
|
||||
if (dc->lcevc_frame) {
|
||||
FrameDecodeData *fdd = frame->private_ref;
|
||||
FFLCEVCFrame *frame_ctx;
|
||||
int ret;
|
||||
|
|
@ -1699,13 +1692,13 @@ static int attach_post_process_data(AVCodecContext *avctx, AVFrame *frame)
|
|||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
frame_ctx->lcevc = av_refstruct_ref(dc->lcevc.ctx);
|
||||
frame_ctx->lcevc = av_refstruct_ref(dc->lcevc);
|
||||
frame_ctx->frame->width = frame->width;
|
||||
frame_ctx->frame->height = frame->height;
|
||||
frame_ctx->frame->format = frame->format;
|
||||
|
||||
frame->width = dc->lcevc.width;
|
||||
frame->height = dc->lcevc.height;
|
||||
frame->width = dc->width;
|
||||
frame->height = dc->height;
|
||||
|
||||
ret = avctx->get_buffer2(avctx, frame_ctx->frame, 0);
|
||||
if (ret < 0) {
|
||||
|
|
@ -1719,8 +1712,7 @@ static int attach_post_process_data(AVCodecContext *avctx, AVFrame *frame)
|
|||
fdd->post_process_opaque_free = ff_lcevc_unref;
|
||||
fdd->post_process = ff_lcevc_process;
|
||||
}
|
||||
dc->lcevc.frame = 0;
|
||||
#endif
|
||||
dc->lcevc_frame = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1968,7 +1960,7 @@ static av_cold void progress_frame_pool_free_entry_cb(AVRefStructOpaque opaque,
|
|||
av_frame_free(&progress->f);
|
||||
}
|
||||
|
||||
av_cold int ff_decode_preinit(AVCodecContext *avctx)
|
||||
int ff_decode_preinit(AVCodecContext *avctx)
|
||||
{
|
||||
AVCodecInternal *avci = avctx->internal;
|
||||
DecodeContext *dc = decode_ctx(avci);
|
||||
|
|
@ -2088,13 +2080,9 @@ av_cold int ff_decode_preinit(AVCodecContext *avctx)
|
|||
return ret;
|
||||
|
||||
if (!(avctx->export_side_data & AV_CODEC_EXPORT_DATA_ENHANCEMENTS)) {
|
||||
if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) {
|
||||
#if CONFIG_LIBLCEVC_DEC
|
||||
ret = ff_lcevc_alloc(&dc->lcevc.ctx);
|
||||
if (ret < 0 && (avctx->err_recognition & AV_EF_EXPLODE))
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
ret = ff_lcevc_alloc(&dc->lcevc);
|
||||
if (ret < 0 && (avctx->err_recognition & AV_EF_EXPLODE))
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
@ -2304,7 +2292,7 @@ int ff_hwaccel_frame_priv_alloc(AVCodecContext *avctx, void **hwaccel_picture_pr
|
|||
return 0;
|
||||
}
|
||||
|
||||
av_cold void ff_decode_flush_buffers(AVCodecContext *avctx)
|
||||
void ff_decode_flush_buffers(AVCodecContext *avctx)
|
||||
{
|
||||
AVCodecInternal *avci = avctx->internal;
|
||||
DecodeContext *dc = decode_ctx(avci);
|
||||
|
|
@ -2322,31 +2310,27 @@ av_cold void ff_decode_flush_buffers(AVCodecContext *avctx)
|
|||
dc->draining_started = 0;
|
||||
}
|
||||
|
||||
av_cold AVCodecInternal *ff_decode_internal_alloc(void)
|
||||
AVCodecInternal *ff_decode_internal_alloc(void)
|
||||
{
|
||||
return av_mallocz(sizeof(DecodeContext));
|
||||
}
|
||||
|
||||
av_cold void ff_decode_internal_sync(AVCodecContext *dst, const AVCodecContext *src)
|
||||
void ff_decode_internal_sync(AVCodecContext *dst, const AVCodecContext *src)
|
||||
{
|
||||
const DecodeContext *src_dc = decode_ctx(src->internal);
|
||||
DecodeContext *dst_dc = decode_ctx(dst->internal);
|
||||
|
||||
dst_dc->initial_pict_type = src_dc->initial_pict_type;
|
||||
dst_dc->intra_only_flag = src_dc->intra_only_flag;
|
||||
#if CONFIG_LIBLCEVC_DEC
|
||||
av_refstruct_replace(&dst_dc->lcevc.ctx, src_dc->lcevc.ctx);
|
||||
#endif
|
||||
av_refstruct_replace(&dst_dc->lcevc, src_dc->lcevc);
|
||||
}
|
||||
|
||||
av_cold void ff_decode_internal_uninit(AVCodecContext *avctx)
|
||||
void ff_decode_internal_uninit(AVCodecContext *avctx)
|
||||
{
|
||||
#if CONFIG_LIBLCEVC_DEC
|
||||
AVCodecInternal *avci = avctx->internal;
|
||||
DecodeContext *dc = decode_ctx(avci);
|
||||
|
||||
av_refstruct_unref(&dc->lcevc.ctx);
|
||||
#endif
|
||||
av_refstruct_unref(&dc->lcevc);
|
||||
}
|
||||
|
||||
static int attach_displaymatrix(AVCodecContext *avctx, AVFrame *frame, int orientation)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "config_components.h"
|
||||
|
||||
#include "libavutil/avassert.h"
|
||||
#include "libavutil/frame.h"
|
||||
#include "libavutil/imgutils.h"
|
||||
|
|
@ -26,6 +28,7 @@
|
|||
#include "decode.h"
|
||||
#include "lcevcdec.h"
|
||||
|
||||
#if CONFIG_LIBLCEVC_DEC
|
||||
static LCEVC_ColorFormat map_format(int format)
|
||||
{
|
||||
switch (format) {
|
||||
|
|
@ -246,9 +249,11 @@ static void lcevc_free(AVRefStructOpaque unused, void *obj)
|
|||
LCEVC_DestroyDecoder(lcevc->decoder);
|
||||
memset(lcevc, 0, sizeof(*lcevc));
|
||||
}
|
||||
#endif
|
||||
|
||||
static int lcevc_init(FFLCEVCContext *lcevc, void *logctx)
|
||||
{
|
||||
#if CONFIG_LIBLCEVC_DEC
|
||||
LCEVC_AccelContextHandle dummy = { 0 };
|
||||
const int32_t event = LCEVC_Log;
|
||||
|
||||
|
|
@ -267,6 +272,7 @@ static int lcevc_init(FFLCEVCContext *lcevc, void *logctx)
|
|||
return AVERROR_EXTERNAL;
|
||||
}
|
||||
|
||||
#endif
|
||||
lcevc->initialized = 1;
|
||||
|
||||
return 0;
|
||||
|
|
@ -285,6 +291,7 @@ int ff_lcevc_process(void *logctx, AVFrame *frame)
|
|||
return ret;
|
||||
}
|
||||
|
||||
#if CONFIG_LIBLCEVC_DEC
|
||||
av_assert0(frame_ctx->frame);
|
||||
|
||||
|
||||
|
|
@ -297,6 +304,7 @@ int ff_lcevc_process(void *logctx, AVFrame *frame)
|
|||
return ret;
|
||||
|
||||
av_frame_remove_side_data(frame, AV_FRAME_DATA_LCEVC);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -304,9 +312,11 @@ int ff_lcevc_process(void *logctx, AVFrame *frame)
|
|||
int ff_lcevc_alloc(FFLCEVCContext **plcevc)
|
||||
{
|
||||
FFLCEVCContext *lcevc = NULL;
|
||||
#if CONFIG_LIBLCEVC_DEC
|
||||
lcevc = av_refstruct_alloc_ext(sizeof(*lcevc), 0, NULL, lcevc_free);
|
||||
if (!lcevc)
|
||||
return AVERROR(ENOMEM);
|
||||
#endif
|
||||
*plcevc = lcevc;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -401,6 +401,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||
dst->hwaccel_flags = src->hwaccel_flags;
|
||||
|
||||
av_refstruct_replace(&dst->internal->pool, src->internal->pool);
|
||||
ff_decode_internal_sync(dst, src);
|
||||
}
|
||||
|
||||
if (for_user) {
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ cglobal put_pixels8_x2, 4,5
|
|||
pavgb m0, m2
|
||||
pavgb m1, m3
|
||||
%else
|
||||
pavgb m0, [r1]
|
||||
pavgb m1, [r1+r2]
|
||||
PAVGB m0, [r1]
|
||||
PAVGB m1, [r1+r2]
|
||||
%endif
|
||||
mova [r0], m0
|
||||
mova [r0+r2], m1
|
||||
|
|
@ -69,8 +69,8 @@ cglobal put_pixels8_x2, 4,5
|
|||
pavgb m0, m2
|
||||
pavgb m1, m3
|
||||
%else
|
||||
pavgb m0, [r1]
|
||||
pavgb m1, [r1+r2]
|
||||
PAVGB m0, [r1]
|
||||
PAVGB m1, [r1+r2]
|
||||
%endif
|
||||
add r1, r4
|
||||
mova [r0], m0
|
||||
|
|
@ -103,8 +103,8 @@ cglobal put_no_rnd_pixels8_x2, 4,5
|
|||
add r1, r4
|
||||
psubusb m0, m6
|
||||
psubusb m2, m6
|
||||
pavgb m0, m1
|
||||
pavgb m2, m3
|
||||
PAVGB m0, m1
|
||||
PAVGB m2, m3
|
||||
mova [r0], m0
|
||||
mova [r0+r2], m2
|
||||
mova m0, [r1]
|
||||
|
|
@ -115,8 +115,8 @@ cglobal put_no_rnd_pixels8_x2, 4,5
|
|||
add r1, r4
|
||||
psubusb m0, m6
|
||||
psubusb m2, m6
|
||||
pavgb m0, m1
|
||||
pavgb m2, m3
|
||||
PAVGB m0, m1
|
||||
PAVGB m2, m3
|
||||
mova [r0], m0
|
||||
mova [r0+r2], m2
|
||||
add r0, r4
|
||||
|
|
@ -143,8 +143,8 @@ cglobal %1_no_rnd_pixels8_x2_exact, 4,5
|
|||
pxor m2, m4
|
||||
pxor m1, m4
|
||||
pxor m3, m4
|
||||
pavgb m0, m1
|
||||
pavgb m2, m3
|
||||
PAVGB m0, m1
|
||||
PAVGB m2, m3
|
||||
pxor m0, m4
|
||||
pxor m2, m4
|
||||
%ifidn %1, avg
|
||||
|
|
@ -161,8 +161,8 @@ cglobal %1_no_rnd_pixels8_x2_exact, 4,5
|
|||
pxor m1, m4
|
||||
pxor m2, m4
|
||||
pxor m3, m4
|
||||
pavgb m0, m1
|
||||
pavgb m2, m3
|
||||
PAVGB m0, m1
|
||||
PAVGB m2, m3
|
||||
pxor m0, m4
|
||||
pxor m2, m4
|
||||
%ifidn %1, avg
|
||||
|
|
@ -198,16 +198,16 @@ cglobal put_pixels8_y2, 4,5
|
|||
movu m1, [r1+r2]
|
||||
movu m2, [r1+r4]
|
||||
add r1, r4
|
||||
pavgb m0, m1
|
||||
pavgb m1, m2
|
||||
PAVGB m0, m1
|
||||
PAVGB m1, m2
|
||||
mova [r0+r2], m0
|
||||
mova [r0+r4], m1
|
||||
movu m1, [r1+r2]
|
||||
movu m0, [r1+r4]
|
||||
add r0, r4
|
||||
add r1, r4
|
||||
pavgb m2, m1
|
||||
pavgb m1, m0
|
||||
PAVGB m2, m1
|
||||
PAVGB m1, m0
|
||||
mova [r0+r2], m2
|
||||
mova [r0+r4], m1
|
||||
add r0, r4
|
||||
|
|
@ -235,8 +235,8 @@ cglobal put_no_rnd_pixels8_y2, 4,5
|
|||
mova m2, [r1+r4]
|
||||
add r1, r4
|
||||
psubusb m1, m6
|
||||
pavgb m0, m1
|
||||
pavgb m1, m2
|
||||
PAVGB m0, m1
|
||||
PAVGB m1, m2
|
||||
mova [r0+r2], m0
|
||||
mova [r0+r4], m1
|
||||
mova m1, [r1+r2]
|
||||
|
|
@ -244,8 +244,8 @@ cglobal put_no_rnd_pixels8_y2, 4,5
|
|||
add r0, r4
|
||||
add r1, r4
|
||||
psubusb m1, m6
|
||||
pavgb m2, m1
|
||||
pavgb m1, m0
|
||||
PAVGB m2, m1
|
||||
PAVGB m1, m0
|
||||
mova [r0+r2], m2
|
||||
mova [r0+r4], m1
|
||||
add r0, r4
|
||||
|
|
@ -271,8 +271,8 @@ cglobal %1_no_rnd_pixels8_y2_exact, 4,5
|
|||
movu m2, [r1+r2]
|
||||
pxor m1, m3
|
||||
pxor m2, m3
|
||||
pavgb m0, m1
|
||||
pavgb m1, m2
|
||||
PAVGB m0, m1
|
||||
PAVGB m1, m2
|
||||
pxor m0, m3
|
||||
pxor m1, m3
|
||||
%ifidn %1, avg
|
||||
|
|
@ -285,8 +285,8 @@ cglobal %1_no_rnd_pixels8_y2_exact, 4,5
|
|||
movu m0, [r1+r4]
|
||||
pxor m1, m3
|
||||
pxor m0, m3
|
||||
pavgb m2, m1
|
||||
pavgb m1, m0
|
||||
PAVGB m2, m1
|
||||
PAVGB m1, m0
|
||||
pxor m2, m3
|
||||
pxor m1, m3
|
||||
%ifidn %1, avg
|
||||
|
|
@ -325,11 +325,11 @@ cglobal avg_pixels8_x2, 4,5
|
|||
pavgb m0, m1
|
||||
pavgb m2, m3
|
||||
%else
|
||||
pavgb m0, [r1+1]
|
||||
pavgb m2, [r1+r2+1]
|
||||
PAVGB m0, [r1+1], m3, m5
|
||||
PAVGB m2, [r1+r2+1], m4, m5
|
||||
%endif
|
||||
pavgb m0, [r0]
|
||||
pavgb m2, [r0+r2]
|
||||
PAVGB m0, [r0], m3, m5
|
||||
PAVGB m2, [r0+r2], m4, m5
|
||||
add r1, r4
|
||||
mova [r0], m0
|
||||
mova [r0+r2], m2
|
||||
|
|
@ -341,13 +341,13 @@ cglobal avg_pixels8_x2, 4,5
|
|||
pavgb m0, m1
|
||||
pavgb m2, m3
|
||||
%else
|
||||
pavgb m0, [r1+1]
|
||||
pavgb m2, [r1+r2+1]
|
||||
PAVGB m0, [r1+1], m3, m5
|
||||
PAVGB m2, [r1+r2+1], m4, m5
|
||||
%endif
|
||||
add r0, r4
|
||||
add r1, r4
|
||||
pavgb m0, [r0]
|
||||
pavgb m2, [r0+r2]
|
||||
PAVGB m0, [r0], m3, m5
|
||||
PAVGB m2, [r0+r2], m4, m5
|
||||
mova [r0], m0
|
||||
mova [r0+r2], m2
|
||||
add r0, r4
|
||||
|
|
@ -377,20 +377,20 @@ cglobal avg_pixels8_y2, 4,5
|
|||
movu m1, [r1+r2]
|
||||
movu m2, [r1+r4]
|
||||
add r1, r4
|
||||
pavgb m0, m1
|
||||
pavgb m1, m2
|
||||
pavgb m0, [r0+r2]
|
||||
pavgb m1, [r0+r4]
|
||||
PAVGB m0, m1
|
||||
PAVGB m1, m2
|
||||
PAVGB m0, [r0+r2]
|
||||
PAVGB m1, [r0+r4]
|
||||
mova [r0+r2], m0
|
||||
mova [r0+r4], m1
|
||||
movu m1, [r1+r2]
|
||||
movu m0, [r1+r4]
|
||||
pavgb m2, m1
|
||||
pavgb m1, m0
|
||||
PAVGB m2, m1
|
||||
PAVGB m1, m0
|
||||
add r0, r4
|
||||
add r1, r4
|
||||
pavgb m2, [r0+r2]
|
||||
pavgb m1, [r0+r4]
|
||||
PAVGB m2, [r0+r2]
|
||||
PAVGB m1, [r0+r4]
|
||||
mova [r0+r2], m2
|
||||
mova [r0+r4], m1
|
||||
add r0, r4
|
||||
|
|
@ -423,12 +423,12 @@ cglobal %1%3_pixels8_xy2, 4,5,5
|
|||
punpcklbw m0, m1
|
||||
pmaddubsw m0, m4
|
||||
%ifidn %3, _no_rnd
|
||||
paddw m2, m3
|
||||
paddw m2, m0
|
||||
paddusw m2, m3
|
||||
paddusw m2, m0
|
||||
psrlw m2, 2
|
||||
%else
|
||||
paddw m2, m0
|
||||
pmulhrsw m2, m3
|
||||
paddusw m2, m0
|
||||
pmulhrsw m2, [pw_8192]
|
||||
%endif
|
||||
%ifidn %1, avg
|
||||
movh m1, [r0+r4]
|
||||
|
|
@ -445,12 +445,12 @@ cglobal %1%3_pixels8_xy2, 4,5,5
|
|||
punpcklbw m2, m1
|
||||
pmaddubsw m2, m4
|
||||
%ifidn %3, _no_rnd
|
||||
paddw m0, m3
|
||||
paddw m0, m2
|
||||
paddusw m0, m3
|
||||
paddusw m0, m2
|
||||
psrlw m0, 2
|
||||
%else
|
||||
paddw m0, m2
|
||||
pmulhrsw m0, m3
|
||||
paddusw m0, m2
|
||||
pmulhrsw m0, [pw_8192]
|
||||
%endif
|
||||
%ifidn %1, avg
|
||||
movh m1, [r0+r4]
|
||||
|
|
@ -485,8 +485,8 @@ cglobal %1%3_pixels16_xy2, 4,5,8
|
|||
punpcklbw m4, m7
|
||||
punpckhbw m1, m7
|
||||
punpckhbw m5, m7
|
||||
paddw m4, m0
|
||||
paddw m5, m1
|
||||
paddusw m4, m0
|
||||
paddusw m5, m1
|
||||
xor r4, r4
|
||||
add r1, r2
|
||||
.loop:
|
||||
|
|
@ -498,18 +498,18 @@ cglobal %1%3_pixels16_xy2, 4,5,8
|
|||
punpcklbw m2, m7
|
||||
punpckhbw m1, m7
|
||||
punpckhbw m3, m7
|
||||
paddw m0, m2
|
||||
paddw m1, m3
|
||||
paddw m4, m6
|
||||
paddw m5, m6
|
||||
paddw m4, m0
|
||||
paddw m5, m1
|
||||
paddusw m0, m2
|
||||
paddusw m1, m3
|
||||
paddusw m4, m6
|
||||
paddusw m5, m6
|
||||
paddusw m4, m0
|
||||
paddusw m5, m1
|
||||
psrlw m4, 2
|
||||
psrlw m5, 2
|
||||
%ifidn %1, avg
|
||||
mova m3, [r0+r4]
|
||||
packuswb m4, m5
|
||||
pavgb m4, m3
|
||||
PAVGB m4, m3
|
||||
%else
|
||||
packuswb m4, m5
|
||||
%endif
|
||||
|
|
@ -524,18 +524,18 @@ cglobal %1%3_pixels16_xy2, 4,5,8
|
|||
punpcklbw m4, m7
|
||||
punpckhbw m3, m7
|
||||
punpckhbw m5, m7
|
||||
paddw m4, m2
|
||||
paddw m5, m3
|
||||
paddw m0, m6
|
||||
paddw m1, m6
|
||||
paddw m0, m4
|
||||
paddw m1, m5
|
||||
paddusw m4, m2
|
||||
paddusw m5, m3
|
||||
paddusw m0, m6
|
||||
paddusw m1, m6
|
||||
paddusw m0, m4
|
||||
paddusw m1, m5
|
||||
psrlw m0, 2
|
||||
psrlw m1, 2
|
||||
%ifidn %1, avg
|
||||
mova m3, [r0+r4]
|
||||
packuswb m0, m1
|
||||
pavgb m0, m3
|
||||
PAVGB m0, m3
|
||||
%else
|
||||
packuswb m0, m1
|
||||
%endif
|
||||
|
|
@ -567,8 +567,8 @@ cglobal %1_pixels16_xy2, 4,5,%2
|
|||
movu m3, [r1+r4+1]
|
||||
pmaddubsw m2, m5
|
||||
pmaddubsw m3, m5
|
||||
paddw m0, m2
|
||||
paddw m1, m3
|
||||
paddusw m0, m2
|
||||
paddusw m1, m3
|
||||
pmulhrsw m0, [pw_8192]
|
||||
pmulhrsw m1, [pw_8192]
|
||||
%ifidn %1, avg
|
||||
|
|
@ -587,8 +587,8 @@ cglobal %1_pixels16_xy2, 4,5,%2
|
|||
movu m1, [r1+r4+1]
|
||||
pmaddubsw m0, m5
|
||||
pmaddubsw m1, m5
|
||||
paddw m2, m0
|
||||
paddw m3, m1
|
||||
paddusw m2, m0
|
||||
paddusw m3, m1
|
||||
pmulhrsw m2, [pw_8192]
|
||||
pmulhrsw m3, [pw_8192]
|
||||
%ifidn %1, avg
|
||||
|
|
|
|||
Loading…
Reference in New Issue