• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/libav-0.8.8/libavcodec/

Lines Matching refs:avctx

44     AVCodecContext *avctx;
97 bw = FFMIN(ZMBV_BLOCK, c->avctx->width - x);
98 bh = FFMIN(ZMBV_BLOCK, c->avctx->height - y);
101 for(ty = FFMAX(y - c->range, 0); ty < FFMIN(y + c->range, c->avctx->height - bh); ty++){
102 for(tx = FFMAX(x - c->range, 0); tx < FFMIN(x + c->range, c->avctx->width - bw); tx++){
118 static int encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf_size, void *data)
120 ZmbvEncContext * const c = avctx->priv_data;
175 for(i = 0; i < avctx->height; i++){
176 memcpy(c->work_buf + work_size, src, avctx->width);
178 work_size += avctx->width;
186 bw = (avctx->width + ZMBV_BLOCK - 1) / ZMBV_BLOCK;
187 bh = (avctx->height + ZMBV_BLOCK - 1) / ZMBV_BLOCK;
192 for(y = 0; y < avctx->height; y += ZMBV_BLOCK) {
193 bh2 = FFMIN(avctx->height - y, ZMBV_BLOCK);
194 for(x = 0; x < avctx->width; x += ZMBV_BLOCK, mv += 2) {
195 bw2 = FFMIN(avctx->width - x, ZMBV_BLOCK);
220 for(i = 0; i < avctx->height; i++){
221 memcpy(prev, src, avctx->width);
234 av_log(avctx, AV_LOG_ERROR, "Error compressing data\n");
246 static av_cold int encode_init(AVCodecContext *avctx)
248 ZmbvEncContext * const c = avctx->priv_data;
256 c->avctx = avctx;
259 c->keyint = avctx->keyint_min;
261 if(avctx->me_range > 0)
262 c->range = FFMIN(avctx->me_range, 127);
264 if(avctx->compression_level >= 0)
265 lvl = avctx->compression_level;
267 av_log(avctx, AV_LOG_ERROR, "Compression level should be 0-9, not %i\n", lvl);
273 c->comp_size = avctx->width * avctx->height + 1024 +
274 ((avctx->width + ZMBV_BLOCK - 1) / ZMBV_BLOCK) * ((avctx->height + ZMBV_BLOCK - 1) / ZMBV_BLOCK) * 2 + 4;
276 av_log(avctx, AV_LOG_ERROR, "Can't allocate work buffer.\n");
285 av_log(avctx, AV_LOG_ERROR, "Can't allocate compression buffer.\n");
288 c->pstride = FFALIGN(avctx->width, 16);
289 if ((c->prev = av_malloc(c->pstride * avctx->height)) == NULL) {
290 av_log(avctx, AV_LOG_ERROR, "Can't allocate picture.\n");
299 av_log(avctx, AV_LOG_ERROR, "Inflate init error: %d\n", zret);
303 avctx->coded_frame = (AVFrame*)&c->pic;
313 static av_cold int encode_end(AVCodecContext *avctx)
315 ZmbvEncContext * const c = avctx->priv_data;