Removing legacy compatibility layer.
Change-Id: I6fdcea0e0faf42386dd2b8f972a3b3fb2c21b2c7
This commit is contained in:
parent
0ecc75c819
commit
9cdaa3d72e
@ -33,8 +33,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define VPX_CODEC_DISABLE_COMPAT 1
|
||||
|
||||
#include "vpx/vp8dx.h"
|
||||
#include "vpx/vpx_decoder.h"
|
||||
|
||||
|
@ -56,8 +56,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define VPX_CODEC_DISABLE_COMPAT 1
|
||||
|
||||
#include "vpx/vp8dx.h"
|
||||
#include "vpx/vpx_decoder.h"
|
||||
|
||||
|
@ -43,8 +43,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define VPX_CODEC_DISABLE_COMPAT 1
|
||||
|
||||
#include "vpx/vp8dx.h"
|
||||
#include "vpx/vpx_decoder.h"
|
||||
|
||||
|
@ -47,7 +47,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define VPX_CODEC_DISABLE_COMPAT 1
|
||||
#include "vpx/vp8cx.h"
|
||||
#include "vpx/vpx_encoder.h"
|
||||
|
||||
|
@ -29,9 +29,7 @@
|
||||
// -----------------
|
||||
// For decoders, you only have to include `vpx_decoder.h` and then any
|
||||
// header files for the specific codecs you use. In this case, we're using
|
||||
// vp8. The `VPX_CODEC_DISABLE_COMPAT` macro can be defined to ensure
|
||||
// strict compliance with the latest SDK by disabling some backwards
|
||||
// compatibility features. Defining this macro is encouraged.
|
||||
// vp8.
|
||||
//
|
||||
// Initializing The Codec
|
||||
// ----------------------
|
||||
@ -81,8 +79,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define VPX_CODEC_DISABLE_COMPAT 1
|
||||
|
||||
#include "vpx/vp8dx.h"
|
||||
#include "vpx/vpx_decoder.h"
|
||||
|
||||
|
@ -28,9 +28,7 @@
|
||||
// -----------------
|
||||
// For encoders, you only have to include `vpx_encoder.h` and then any
|
||||
// header files for the specific codecs you use. In this case, we're using
|
||||
// vp8. The `VPX_CODEC_DISABLE_COMPAT` macro can be defined to ensure
|
||||
// strict compliance with the latest SDK by disabling some backwards
|
||||
// compatibility features. Defining this macro is encouraged.
|
||||
// vp8.
|
||||
//
|
||||
// Getting The Default Configuration
|
||||
// ---------------------------------
|
||||
@ -101,7 +99,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define VPX_CODEC_DISABLE_COMPAT 1
|
||||
#include "vpx/vpx_encoder.h"
|
||||
|
||||
#include "./tools_common.h"
|
||||
|
@ -52,7 +52,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define VPX_CODEC_DISABLE_COMPAT 1
|
||||
#include "vpx/vpx_encoder.h"
|
||||
|
||||
#include "./tools_common.h"
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include "third_party/libyuv/include/libyuv/scale.h"
|
||||
#include "third_party/libyuv/include/libyuv/cpu_id.h"
|
||||
|
||||
#define VPX_CODEC_DISABLE_COMPAT 1
|
||||
#include "vpx/vpx_encoder.h"
|
||||
#include "vpx/vp8cx.h"
|
||||
|
||||
|
@ -50,7 +50,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define VPX_CODEC_DISABLE_COMPAT 1
|
||||
#include "vpx/vp8cx.h"
|
||||
#include "vpx/vpx_encoder.h"
|
||||
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define VPX_CODEC_DISABLE_COMPAT 1
|
||||
#include "./vpx_config.h"
|
||||
#include "vpx_ports/vpx_timer.h"
|
||||
#include "vpx/vp8cx.h"
|
||||
|
1
libs.mk
1
libs.mk
@ -531,7 +531,6 @@ libs.doxy: $(CODEC_DOC_SRCS)
|
||||
@echo " [CREATE] $@"
|
||||
@rm -f $@
|
||||
@echo "INPUT += $^" >> $@
|
||||
@echo "PREDEFINED = VPX_CODEC_DISABLE_COMPAT" >> $@
|
||||
@echo "INCLUDE_PATH += ." >> $@;
|
||||
@echo "ENABLED_SECTIONS += $(sort $(CODEC_DOC_SECTIONS))" >> $@
|
||||
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#define VPX_DISABLE_CTRL_TYPECHECKS 1
|
||||
#define VPX_CODEC_DISABLE_COMPAT 1
|
||||
#include "./vpx_config.h"
|
||||
#include "vpx/svc_context.h"
|
||||
#include "vpx/vp8cx.h"
|
||||
|
@ -64,40 +64,6 @@ extern "C" {
|
||||
VPX_IMG_FMT_I44416 = VPX_IMG_FMT_I444 | VPX_IMG_FMT_HIGHBITDEPTH
|
||||
} vpx_img_fmt_t; /**< alias for enum vpx_img_fmt */
|
||||
|
||||
#if !defined(VPX_CODEC_DISABLE_COMPAT) || !VPX_CODEC_DISABLE_COMPAT
|
||||
#define IMG_FMT_PLANAR VPX_IMG_FMT_PLANAR /**< \deprecated Use #VPX_IMG_FMT_PLANAR */
|
||||
#define IMG_FMT_UV_FLIP VPX_IMG_FMT_UV_FLIP /**< \deprecated Use #VPX_IMG_FMT_UV_FLIP */
|
||||
#define IMG_FMT_HAS_ALPHA VPX_IMG_FMT_HAS_ALPHA /**< \deprecated Use #VPX_IMG_FMT_HAS_ALPHA */
|
||||
|
||||
/*!\brief Deprecated list of supported image formats
|
||||
* \deprecated New code should use #vpx_img_fmt
|
||||
*/
|
||||
#define img_fmt vpx_img_fmt
|
||||
/*!\brief alias for enum img_fmt.
|
||||
* \deprecated New code should use #vpx_img_fmt_t
|
||||
*/
|
||||
#define img_fmt_t vpx_img_fmt_t
|
||||
|
||||
#define IMG_FMT_NONE VPX_IMG_FMT_NONE /**< \deprecated Use #VPX_IMG_FMT_NONE */
|
||||
#define IMG_FMT_RGB24 VPX_IMG_FMT_RGB24 /**< \deprecated Use #VPX_IMG_FMT_RGB24 */
|
||||
#define IMG_FMT_RGB32 VPX_IMG_FMT_RGB32 /**< \deprecated Use #VPX_IMG_FMT_RGB32 */
|
||||
#define IMG_FMT_RGB565 VPX_IMG_FMT_RGB565 /**< \deprecated Use #VPX_IMG_FMT_RGB565 */
|
||||
#define IMG_FMT_RGB555 VPX_IMG_FMT_RGB555 /**< \deprecated Use #VPX_IMG_FMT_RGB555 */
|
||||
#define IMG_FMT_UYVY VPX_IMG_FMT_UYVY /**< \deprecated Use #VPX_IMG_FMT_UYVY */
|
||||
#define IMG_FMT_YUY2 VPX_IMG_FMT_YUY2 /**< \deprecated Use #VPX_IMG_FMT_YUY2 */
|
||||
#define IMG_FMT_YVYU VPX_IMG_FMT_YVYU /**< \deprecated Use #VPX_IMG_FMT_YVYU */
|
||||
#define IMG_FMT_BGR24 VPX_IMG_FMT_BGR24 /**< \deprecated Use #VPX_IMG_FMT_BGR24 */
|
||||
#define IMG_FMT_RGB32_LE VPX_IMG_FMT_RGB32_LE /**< \deprecated Use #VPX_IMG_FMT_RGB32_LE */
|
||||
#define IMG_FMT_ARGB VPX_IMG_FMT_ARGB /**< \deprecated Use #VPX_IMG_FMT_ARGB */
|
||||
#define IMG_FMT_ARGB_LE VPX_IMG_FMT_ARGB_LE /**< \deprecated Use #VPX_IMG_FMT_ARGB_LE */
|
||||
#define IMG_FMT_RGB565_LE VPX_IMG_FMT_RGB565_LE /**< \deprecated Use #VPX_IMG_FMT_RGB565_LE */
|
||||
#define IMG_FMT_RGB555_LE VPX_IMG_FMT_RGB555_LE /**< \deprecated Use #VPX_IMG_FMT_RGB555_LE */
|
||||
#define IMG_FMT_YV12 VPX_IMG_FMT_YV12 /**< \deprecated Use #VPX_IMG_FMT_YV12 */
|
||||
#define IMG_FMT_I420 VPX_IMG_FMT_I420 /**< \deprecated Use #VPX_IMG_FMT_I420 */
|
||||
#define IMG_FMT_VPXYV12 VPX_IMG_FMT_VPXYV12 /**< \deprecated Use #VPX_IMG_FMT_VPXYV12 */
|
||||
#define IMG_FMT_VPXI420 VPX_IMG_FMT_VPXI420 /**< \deprecated Use #VPX_IMG_FMT_VPXI420 */
|
||||
#endif /* VPX_CODEC_DISABLE_COMPAT */
|
||||
|
||||
/**\brief Image Descriptor */
|
||||
typedef struct vpx_image {
|
||||
vpx_img_fmt_t fmt; /**< Image Format */
|
||||
@ -121,13 +87,6 @@ extern "C" {
|
||||
#define VPX_PLANE_U 1 /**< U (Chroma) plane */
|
||||
#define VPX_PLANE_V 2 /**< V (Chroma) plane */
|
||||
#define VPX_PLANE_ALPHA 3 /**< A (Transparency) plane */
|
||||
#if !defined(VPX_CODEC_DISABLE_COMPAT) || !VPX_CODEC_DISABLE_COMPAT
|
||||
#define PLANE_PACKED VPX_PLANE_PACKED
|
||||
#define PLANE_Y VPX_PLANE_Y
|
||||
#define PLANE_U VPX_PLANE_U
|
||||
#define PLANE_V VPX_PLANE_V
|
||||
#define PLANE_ALPHA VPX_PLANE_ALPHA
|
||||
#endif
|
||||
unsigned char *planes[4]; /**< pointer to the top left pixel for each plane */
|
||||
int stride[4]; /**< stride between rows for each plane */
|
||||
|
||||
|
1
vpxdec.c
1
vpxdec.c
@ -24,7 +24,6 @@
|
||||
#include "./args.h"
|
||||
#include "./ivfdec.h"
|
||||
|
||||
#define VPX_CODEC_DISABLE_COMPAT 1
|
||||
#include "vpx/vpx_decoder.h"
|
||||
#include "vpx_ports/mem_ops.h"
|
||||
#include "vpx_ports/vpx_timer.h"
|
||||
|
12
y4minput.c
12
y4minput.c
@ -1041,12 +1041,12 @@ int y4m_input_fetch_frame(y4m_input *_y4m, FILE *_fin, vpx_image_t *_img) {
|
||||
c_w *= bytes_per_sample;
|
||||
c_h = (_y4m->pic_h + _y4m->dst_c_dec_v - 1) / _y4m->dst_c_dec_v;
|
||||
c_sz = c_w * c_h;
|
||||
_img->stride[PLANE_Y] = _img->stride[PLANE_ALPHA] =
|
||||
_img->stride[VPX_PLANE_Y] = _img->stride[VPX_PLANE_ALPHA] =
|
||||
_y4m->pic_w * bytes_per_sample;
|
||||
_img->stride[PLANE_U] = _img->stride[PLANE_V] = c_w;
|
||||
_img->planes[PLANE_Y] = _y4m->dst_buf;
|
||||
_img->planes[PLANE_U] = _y4m->dst_buf + pic_sz;
|
||||
_img->planes[PLANE_V] = _y4m->dst_buf + pic_sz + c_sz;
|
||||
_img->planes[PLANE_ALPHA] = _y4m->dst_buf + pic_sz + 2 * c_sz;
|
||||
_img->stride[VPX_PLANE_U] = _img->stride[VPX_PLANE_V] = c_w;
|
||||
_img->planes[VPX_PLANE_Y] = _y4m->dst_buf;
|
||||
_img->planes[VPX_PLANE_U] = _y4m->dst_buf + pic_sz;
|
||||
_img->planes[VPX_PLANE_V] = _y4m->dst_buf + pic_sz + c_sz;
|
||||
_img->planes[VPX_PLANE_ALPHA] = _y4m->dst_buf + pic_sz + 2 * c_sz;
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user