[ffvpx] Update ffvp9/ffvp8 to 3.4.2-release

Structure of code was slightly modified so that it should be no longer necessary to re-generate the config_*.h files, greatly simplifying the resync process in the future.
This commit is contained in:
trav90 2018-04-26 16:49:15 -05:00 • committed by Roy Tam
commit d1361d3c21
183 changed files with 17773 additions and 28489 deletions

View file

@ -26,6 +26,8 @@
#ifndef AVCODEC_VP8_H
#define AVCODEC_VP8_H
#include <stdatomic.h>
#include "libavutil/buffer.h"
#include "libavutil/thread.h"
@ -91,6 +93,16 @@ typedef struct VP8Macroblock {
VP56mv bmv[16];
} VP8Macroblock;
typedef struct VP8intmv {
int x;
int y;
} VP8intmv;
typedef struct VP8mvbounds {
VP8intmv mv_min;
VP8intmv mv_max;
} VP8mvbounds;
typedef struct VP8ThreadData {
DECLARE_ALIGNED(16, int16_t, block)[6][4][16];
DECLARE_ALIGNED(16, int16_t, block_dc)[16];
@ -114,12 +126,13 @@ typedef struct VP8ThreadData {
pthread_mutex_t lock;
pthread_cond_t cond;
#endif
int thread_mb_pos; // (mb_y << 16) | (mb_x & 0xFFFF)
int wait_mb_pos; // What the current thread is waiting on.
atomic_int thread_mb_pos; // (mb_y << 16) | (mb_x & 0xFFFF)
atomic_int wait_mb_pos; // What the current thread is waiting on.
#define EDGE_EMU_LINESIZE 32
DECLARE_ALIGNED(16, uint8_t, edge_emu_buffer)[21 * EDGE_EMU_LINESIZE];
VP8FilterStrength *filter_strength;
VP8mvbounds mv_bounds;
} VP8ThreadData;
typedef struct VP8Frame {
@ -127,11 +140,6 @@ typedef struct VP8Frame {
AVBufferRef *seg_map;
} VP8Frame;
typedef struct VP8intmv {
int x;
int y;
} VP8intmv;
#define MAX_THREADS 8
typedef struct VP8Context {
VP8ThreadData *thread_data;
@ -143,15 +151,14 @@ typedef struct VP8Context {
uint16_t mb_width; /* number of horizontal MB */
uint16_t mb_height; /* number of vertical MB */
int linesize;
int uvlinesize;
ptrdiff_t linesize;
ptrdiff_t uvlinesize;
uint8_t keyframe;
uint8_t deblock_filter;
uint8_t mbskip_enabled;
uint8_t profile;
VP8intmv mv_min;
VP8intmv mv_max;
VP8mvbounds mv_bounds;
int8_t sign_bias[4]; ///< one state [0, 1] per ref frame type
int ref_count[3];
@ -275,7 +282,7 @@ typedef struct VP8Context {
*/
int mb_layout;
void (*decode_mb_row_no_filter)(AVCodecContext *avctx, void *tdata, int jobnr, int threadnr);
int (*decode_mb_row_no_filter)(AVCodecContext *avctx, void *tdata, int jobnr, int threadnr);
void (*filter_mb_row)(AVCodecContext *avctx, void *tdata, int jobnr, int threadnr);
int vp7;