summaryrefslogtreecommitdiff
Diffstat
-rw-r--r--drivers/amvdec_ports/Makefile13
-rw-r--r--drivers/amvdec_ports/aml_vcodec_adapt.c22
-rw-r--r--drivers/amvdec_ports/aml_vcodec_adapt.h3
-rw-r--r--drivers/amvdec_ports/aml_vcodec_dec.c534
-rw-r--r--drivers/amvdec_ports/aml_vcodec_dec.h39
-rw-r--r--drivers/amvdec_ports/aml_vcodec_dec_drv.c57
-rw-r--r--drivers/amvdec_ports/aml_vcodec_drv.h11
-rw-r--r--drivers/amvdec_ports/aml_vcodec_util.c18
-rw-r--r--drivers/amvdec_ports/aml_vcodec_util.h8
-rw-r--r--drivers/amvdec_ports/aml_vcodec_vfm.c9
-rw-r--r--drivers/amvdec_ports/aml_vcodec_vfm.h6
-rw-r--r--drivers/amvdec_ports/decoder/aml_h264_parser.c662
-rw-r--r--[-rwxr-xr-x]drivers/amvdec_ports/decoder/aml_h264_parser.h226
-rw-r--r--drivers/amvdec_ports/decoder/aml_hevc_parser.c1274
-rw-r--r--[-rwxr-xr-x]drivers/amvdec_ports/decoder/aml_hevc_parser.h137
-rw-r--r--drivers/amvdec_ports/decoder/aml_mjpeg_parser.c397
-rw-r--r--drivers/amvdec_ports/decoder/aml_mjpeg_parser.h163
-rw-r--r--drivers/amvdec_ports/decoder/aml_mpeg12_parser.c198
-rw-r--r--drivers/amvdec_ports/decoder/aml_mpeg12_parser.h74
-rw-r--r--drivers/amvdec_ports/decoder/aml_mpeg4_parser.c1233
-rw-r--r--drivers/amvdec_ports/decoder/aml_mpeg4_parser.h250
-rw-r--r--drivers/amvdec_ports/decoder/aml_vp9_parser.c299
-rw-r--r--[-rwxr-xr-x]drivers/amvdec_ports/decoder/aml_vp9_parser.h279
-rw-r--r--drivers/amvdec_ports/decoder/h264_parse.c389
-rw-r--r--drivers/amvdec_ports/decoder/h264_parse.h141
-rw-r--r--drivers/amvdec_ports/decoder/h264_stream.c111
-rw-r--r--drivers/amvdec_ports/decoder/h264_stream.h39
-rw-r--r--drivers/amvdec_ports/decoder/vdec_h264_if.c357
-rw-r--r--drivers/amvdec_ports/decoder/vdec_hevc_if.c477
-rw-r--r--drivers/amvdec_ports/decoder/vdec_mjpeg_if.c498
-rw-r--r--drivers/amvdec_ports/decoder/vdec_mpeg12_if.c490
-rw-r--r--drivers/amvdec_ports/decoder/vdec_mpeg4_if.c499
-rw-r--r--drivers/amvdec_ports/decoder/vdec_vp9_if.c461
-rw-r--r--[-rwxr-xr-x]drivers/amvdec_ports/decoder/vdec_vp9_trigger.h0
-rw-r--r--drivers/amvdec_ports/test/vcodec_m2m_test.c18
-rw-r--r--drivers/amvdec_ports/utils/common.c221
-rw-r--r--drivers/amvdec_ports/utils/common.h72
-rw-r--r--drivers/amvdec_ports/utils/get_bits.h590
-rw-r--r--drivers/amvdec_ports/utils/golomb.c147
-rw-r--r--drivers/amvdec_ports/utils/golomb.h500
-rw-r--r--drivers/amvdec_ports/utils/pixfmt.h470
-rw-r--r--drivers/amvdec_ports/utils/put_bits.h323
-rw-r--r--drivers/amvdec_ports/vdec_drv_base.h11
-rw-r--r--drivers/amvdec_ports/vdec_drv_if.c45
-rw-r--r--drivers/amvdec_ports/vdec_drv_if.h10
-rw-r--r--drivers/frame_provider/decoder/h264_multi/vmh264.c219
-rw-r--r--drivers/frame_provider/decoder/h265/vh265.c308
-rw-r--r--drivers/frame_provider/decoder/mjpeg/vmjpeg_multi.c334
-rw-r--r--drivers/frame_provider/decoder/mpeg12/vmpeg12_multi.c233
-rw-r--r--drivers/frame_provider/decoder/mpeg4/vmpeg4_multi.c317
-rw-r--r--drivers/frame_provider/decoder/utils/Makefile1
-rw-r--r--drivers/frame_provider/decoder/utils/vdec_input.c19
-rw-r--r--drivers/frame_provider/decoder/utils/vdec_v4l2_buffer_ops.c131
-rw-r--r--drivers/frame_provider/decoder/utils/vdec_v4l2_buffer_ops.h22
-rw-r--r--drivers/frame_provider/decoder/vp9/vvp9.c388
55 files changed, 11471 insertions, 2282 deletions
diff --git a/drivers/amvdec_ports/decoder/h264_stream.c b/drivers/amvdec_ports/decoder/h264_stream.c
deleted file mode 100644
index 3061568..0000000
--- a/drivers/amvdec_ports/decoder/h264_stream.c
+++ b/dev/null
@@ -1,111 +0,0 @@
-/*
- * drivers/amlogic/media_modules/amvdec_ports/decoder/h264_stream.c
- *
- * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program 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 General Public License for
- * more details.
- *
- */
-
-#include <linux/mm.h>
-#include <linux/slab.h>
-#include "h264_stream.h"
-
-void h264_stream_set(struct h264_stream_t *s, unsigned char *data, int size)
-{
- s->data = data;
- s->size = size;
- s->bit_pos = 7;
- s->byte_pos = 0;
-}
-
-unsigned int h264_stream_read_bits(struct h264_stream_t *s, unsigned int n)
-{
- unsigned int ret = 0;
- unsigned char b = 0;
- int i;
-
- if (n == 0)
- return 0;
-
- for (i = 0; i < n; ++i) {
- if (h264_stream_bits_remaining(s) == 0)
- ret <<= n - i - 1;
-
- b = s->data[s->byte_pos];
- if (n - i <= 32)
- ret = ret << 1 | BITAT(b, s->bit_pos);
-
- if (s->bit_pos == 0) {
- s->bit_pos = 7;
- s->byte_pos++;
- } else
- s->bit_pos--;
- }
-
- return ret;
-}
-
-unsigned int h264_stream_peek_bits(struct h264_stream_t *s, unsigned int n)
-{
- int prev_bit_pos = s->bit_pos;
- int prev_byte_pos = s->byte_pos;
- unsigned int ret = h264_stream_read_bits(s, n);
-
- s->bit_pos = prev_bit_pos;
- s->byte_pos = prev_byte_pos;
-
- return ret;
-}
-
-unsigned int h264_stream_read_bytes(struct h264_stream_t *s, unsigned int n)
-{
- unsigned int ret = 0;
- int i;
-
- if (n == 0)
- return 0;
-
- for (i = 0; i < n; ++i) {
- if (h264_stream_bytes_remaining(s) == 0) {
- ret <<= (n - i - 1) * 8;
- break;
- }
-
- if (n - i <= 4)
- ret = ret << 8 | s->data[s->byte_pos];
-
- s->byte_pos++;
- }
-
- return ret;
-}
-
-unsigned int h264_stream_peek_bytes(struct h264_stream_t *s, unsigned int n)
-{
- int prev_byte_pos = s->byte_pos;
- unsigned int ret = h264_stream_read_bytes(s, n);
-
- s->byte_pos = prev_byte_pos;
-
- return ret;
-}
-
-int h264_stream_bits_remaining(struct h264_stream_t *s)
-{
- return (s->size - s->byte_pos) * 8 + s->bit_pos;
-}
-
-int h264_stream_bytes_remaining(struct h264_stream_t *s)
-{
- return s->size - s->byte_pos;
-}
-