History

Fix dnxhd custom options, add AVClass in private context

Baptiste Coudurier committed 15 years ago

Commit d9699ea1 parent efdad9f2 files · +3 −2Browse files

Unified · Split

2 files
  1. libavcodec/dnxhdenc.c +2 −2
  2. libavcodec/dnxhdenc.h +1 −0
libavcodec/dnxhdenc.c+2−2
@@ -433,7 +433,7 @@ static int dnxhd_calc_bits_thread(AVCodecContext *avctx, void *arg, int jobnr, i · 432 unmodified lines
433 int n = dnxhd_switch_matrix(ctx, i);433 int n = dnxhd_switch_matrix(ctx, i);
434 434
435 memcpy(block, src_block, 64*sizeof(*block));435 memcpy(block, src_block, 64*sizeof(*block));
436 last_index = ctx->m.dct_quantize((MpegEncContext*)ctx, block, i, qscale, &overflow);436 last_index = ctx->m.dct_quantize(&ctx->m, block, i, qscale, &overflow);
437 ac_bits += dnxhd_calc_ac_bits(ctx, block, last_index);437 ac_bits += dnxhd_calc_ac_bits(ctx, block, last_index);
438 438
439 diff = block[0] - ctx->m.last_dc[n];439 diff = block[0] - ctx->m.last_dc[n];
@@ -478,7 +478,7 @@ static int dnxhd_encode_thread(AVCodecContext *avctx, void *arg, int jobnr, int · 38 unmodified lines
478 DCTELEM *block = ctx->blocks[i];478 DCTELEM *block = ctx->blocks[i];
479 int last_index, overflow;479 int last_index, overflow;
480 int n = dnxhd_switch_matrix(ctx, i);480 int n = dnxhd_switch_matrix(ctx, i);
481 last_index = ctx->m.dct_quantize((MpegEncContext*)ctx, block, i, qscale, &overflow);481 last_index = ctx->m.dct_quantize(&ctx->m, block, i, qscale, &overflow);
482 //START_TIMER;482 //START_TIMER;
483 dnxhd_encode_block(ctx, block, last_index, n);483 dnxhd_encode_block(ctx, block, last_index, n);
484 //STOP_TIMER("encode_block");484 //STOP_TIMER("encode_block");
libavcodec/dnxhdenc.h+1−0
@@ -39,6 +39,7 @@ typedef struct { · 38 unmodified lines
39} RCEntry;39} RCEntry;
40 40
41typedef struct DNXHDEncContext {41typedef struct DNXHDEncContext {
42 AVClass *class;
42 MpegEncContext m; ///< Used for quantization dsp functions43 MpegEncContext m; ///< Used for quantization dsp functions
43 44
44 AVFrame frame;45 AVFrame frame;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t